A343606 Row n gives the lexicographically earliest edge coloring of the complete graph K_n with no monochromatic triangle.
0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 2, 0, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 0, 2, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 1, 2, 0, 2, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 2, 0, 2, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 1, 1
Offset: 0
Examples
Rows n = 0 and n = 1 have length n(n-1)/2 = 0, since the empty graph K_0 and the singleton graph K_1 have no edges. Starting with n = 2, the graph K_n has a positive number n(n-1)/2 of edges: n | Coloring of edges (1,2) = AB, (1,3) = AC, (2,3) = BC, ..., (n-1,n) = YZ ---+------------------------------------------------------------------------ 2 | 0 (The only non-diagonal element, in row/col. 2 of the color matrix.) 3 | 0; 0, 1 (Rows 2 and 3 of the subdiagonal part of the color matrix.) 4 | 0; 0, 1; 1, 0, 0 (Rows 2, 3 and 4 below the diagonal of that matrix.) 5 | 0; 0, 1; 1, 0, 1; 1, 1, 0, 0 6 | 0; 0, 1; 0, 1, 2; 0, 2, 1, 1; 1, 0, 0, 0, 0 7 | 0; 0, 1; 0, 1, 2; 0, 2, 1, 1; 1, 0, 0, 0, 0; 1, 0, 0, 0, 0, 2 8 | ...; 2, 0, 0, 0, 0, 1, 1 (where ... = row 7) 9 | ...; 2, 0, 0, 0, 0, 1, 2; 2, 0, 0, 0, 0, 2, 1, 1 10 | ...; 2, 0, 0, 0, 0, 1, 2; 2, 0, 0, 0, 1, 2, 1, 1; 2, 2, 1, 1, 0, 2, 1, 1, 0 11 | ...; 2, 0, 0, 0, 1, 1, 2; 2, 0, 0, 0, 2, 2, 1, 1; 2, 2, 1, 2, 0, 2, 1, 1, 0 | ; 2, 2, 2, 1, 0, 2, 1, 0, 0, 1 The graph K_2 consists of only one edge with color 0. The graph K_3 is a triangle, two edges get color 0, the third one color 1. The graph K_4 is a square with its two diagonals; the edges AB, AC, BC, AD, BD and CD get colors 0, 0, 1, 1, 0 and 0, respectively. The given solution for n = 5 can be extended to a solution for n = 6 by appending [0, 1, 2, 0, 2]. This solution comes lexicographically later because edges AD, BD, CD (row 4/col. 4 of the "color matrix") are colored (1, 0, 1) instead of (0, 1, 2), but uses only 2 colors for all edges not adjacent to the last vertex F.
Crossrefs
Programs
-
PARI
row(n)={ local(C=vector(n*(n-1)/2), k, i=matrix(n, n, i, j, if(i
= k, if(C[k]++
Comments