An association scheme with d classes on the set X is a set of d graphs G 1,…,Gd with vertex set X such that

if x and y are distinct elements of X, there is exactly one graph Gi in which xy is an edge,

for all x and y from X, and for all i and j from {1,…, d}, the number of elements z such that xz ∈ E(Gi ) and yz ∈ E(Gj ) is determined by the graph Gk in which xy lies.