Download presentation
Presentation is loading. Please wait.
Published byJewel Lang Modified over 9 years ago
1
LGI2P Research Center Coloration des graphes de reines michel.vasquez@mines-ales.fr LGI2P Ecole des Mines d’Alès
2
2 Outline About the Queen Graph Coloring Problem Definition Conjecture ? A Complete Algorithm Reformulation of the coloring problem Efficient filtering A Geometric Based Heuristic Geometric Operators Results synthesis Coloring Extension
3
3 Rule for moving the queen on the chessboard Each queen controls: 1 column 1 row 2 diagonals
4
4 Graph definition 1 square of the chessboard vertex 2 squares controlled by the same queen edge
5
5 Graph definition: from chessboard to queen graph a queen graph instance G(V,E) with : V n 2 vertices and E n 3 edges
6
6 The Queen Graph Coloring Problem: definition Given a chessboard, what is the minimum number of colors required to cover it without clash between two queens of the same color ?
7
7 The Queen Graph Coloring Problem: what we know The chromatic number of Queen-7 2 is 7 : (7) 7 (and (n) n if n is prime with 2 and 3) 1234567 4567123 7123456 3456712 6712345 2345671 5671234
8
8 Conjecture ? The chromatic number of the Queen Graph is equal to n if and only if n is prime with 2 and 3 M. Gardner, 1969 : The Unexpected Hanging and Other Mathematical Diversions, Simon and Schuster, New York.
9
9 Conjecture ? The chromatic number of the Queen Graph is equal to n if and only if n is prime with 2 and 3 E. Y. Gik, 1983 : Shakhmaty i matematika, Bibliotechka Kvant, vol. 24, Nauka, Moscow. The chromatic number of the Queen Graph is equal to n if and only if n is prime with 2 and 3
10
10 Intox…
11
11 Intox…
12
12 Until 2003 no result are available for the queen graph chromatic number when n is greater than 9 and n is multiple of 2 or 3
13
13 Outline About the Queen Graph Coloring Problem A Complete Algorithm Reformulation of the coloring problem Efficient filtering A Geometric Based Heuristic Geometric Operators Results synthesis Coloring Extension
14
14 Property (1) The n rows, the n columns and the 2 main diagonals are cliques with n vertices of the Queen-n 2 graph (n) n
15
15 Question (1) For a given n, is (n) equal to n ? saying it differently Is there a partition of the Queen-n 2 graph in n independent sets ?
16
16 Property (2) A stable set cannot contain more than n vertices To answer yes to question (1) and cover n n squares : each independent set must contain at least n vertices
17
17 Question (2) Are there n independent sets with exactly n vertices which do not cover themselves ?
18
18 General Algorithm Step 1) Enumerate the independent sets with n vertices (n queens that do not attack themselves) Step 2) Find n among them which do not intersect (solve the CSP)
19
19 Avoiding many equivalent coloring permutations n squares belonging to a same clique are colored once for all:
20
20 Computing IS by backtracking Enumeration : backtracking
21
21 A CSP with n variables (corresponding to a n squares) Spreading of the independent sets for Queen-10 2
22
22 Branching on the smallest domain variable Non overlapping constraints propagation The search space size is decreasing geometrically
23
23 First result n = 10 : no solution 7000 seconds (10) = 11
24
24 Filtering (principle) Consider the cliques of the graph constituted by the uncolored vertices If such a clique contains k vertices then you need at least k colors (i.e. k independent sets) to complete the process
25
25 Efficient Filtering (computationally) Diagonals constitute cliques (and are easy to handle): for a given diagonal there is at most one vertex that can come from a specific stable set, at level k of the search tree, diagonals must contain less than n-k empty squares Delete all the independent sets that do not verify this condition
26
26 Efficient Filtering (experimentally) At the root of the search tree this independent set is excluded from the search space
27
27 Efficient Filtering (experimentally) Search space reduction
28
28 Efficient Filtering (experimentally) At each level : 4 more constraints
29
29 First Results : complete method (10) no solution 1 second (maximum depth of backtrack in the search tree : 5 rather than 10) (12) 12 454 solutions 6963 seconds (exhaustive search) (14) 14 1 solution en 142 hours (search aborted after one week)
30
30 Interest of filtering Comparative results on n=12
31
31 Outline About the Queen Graph Coloring Problem Definition Intox/Conjecture ? A Complete Algorithm Reformulation of the coloring problem Efficient filtering A Geometric Based Heuristic Geometric Operators Results synthesis Coloring Extension
32
32 Certificate for n = 12
33
33 Certificate for n = 12
34
34 Certificate for n = 12
35
35 Certificate for n = 12
36
36 Exact but incomplete method Assumption on the distribution of the colors on the chessboard Enumerate several independent sets at the same time
37
37 Geometric operator (1) n = 2 p symmetry H Search tree depth: n/2 (22) 22
38
38 Geometric operator (1) n = 2 p symmetry H Search tree depth: n/2 (22) 22
39
39 Geometric operator (1) n = 2 p symmetry H Search tree depth: n/2 (22) 22
40
40 Geometric operator (2) n = 3 p central symmetry Search tree depth: (n/2) - 1 (15) 15
41
41 Geometric operator (2) n = 3 p central symmetry Search tree depth: (n/2) - 1 (15) 15
42
42 Geometric operator (2) n = 3 p central symmetry Search tree depth: (n/2) - 1 (15) 15
43
43 Geometric operator (3) n = ( 4 p ) + 1 /2 rotations: R, R 2 et R 3 Search tree depth: (n/4) - 1 (21) 21
44
44 Geometric operator (3) n = ( 4 p ) + 1 /2 rotations: R, R 2 et R 3 Search tree depth: (n/4) - 1 (21) 21
45
45 Geometric operator (3) n = ( 4 p ) + 1 /2 rotations: R, R 2 et R 3 Search tree depth: (n/4) - 1 (21) 21
46
46 Geometric operator (3) n = ( 4 p ) + 1 /2 rotations: R, R 2 et R 3 Search tree depth: (n/4) - 1 (21) 21
47
47 Geometric operator (3) n = ( 4 p ) + 1 /2 rotations: R, R 2 et R 3 Search tree depth: (n/4) - 1 (21) 21
48
48 Geometric operator (3) n = ( 4 p ) + 1 /2 rotations: R, R 2 et R 3 Search tree depth: (n/4) - 1 (21) 21
49
49 Geometric operator (4) n = ( 4 p ) symmetries H & V Search tree depth: (n/4) (32) 32
50
50 Geometric operator (4) n = ( 4 p ) symmetries H & V Search tree depth: (n/4) (32) 32
51
51 Geometric operator (4) n = ( 4 p ) symmetries H & V Search tree depth: (n/4) (32) 32
52
52 Results synthesis New results for the graphs counting more than ………………… 81 vertices (10) 11 1 sec. (20) 20 1 sec. (12) 12 1 sec. (21) 21 30844 sec. (14) 14 5 sec. (22) 22 233404 sec. (15) 15 4897 sec. (24) 24 10 sec. (16) 16 1 sec. (28) 28 1316 sec. (18) 18 2171 sec. (32) 32 73000 sec. … 1024 vertices
53
53 Results synthesis Some improvements : fixing the first stable set (and its symmetric set) according to other certificates, branching heuristic, … (26) 26 1,400,000 seconds
54
54 The 26 letters of the alphabet are enough for coloring the 26 X 26 chessboard
55
55 26 = ( 3 x 2 ) + …
56
56 26 = ( 5 x 4 ) + ( 3 x 2 )
57
57 (26) = 26 2216 sec. (better than 1,400,000)
58
58 30 = ( 6 x 4 ) + ( 3 x 2 ) “Too long” still more heuristic Evaluate the nodes by counting the number of edges in the no colored sub graph Partial branching : at each level of the search tree take only the best node among 10
59
59 X(30)=30 cpu 2965 sec.
60
60 Results synthesis Nous avons 13 contre exemples qui prouvent que n n’a pas besoin d’être premier avec 6 pour que (n) n
61
61 Outline About the Queen Graph Coloring Problem Definition Intox/Conjecture ? A Complete Algorithm Reformulation of the coloring problem Efficient filtering A Geometric Based Heuristic Geometric Operators Results synthesis Coloring Extension
62
62 Remark An independent set with 12 vertices for n=12
63
63 … remains an independent set for n = 24... Remark
64
64 Idea … replacing 1 square that uses 1 color by 5 2 squares that use only 5 colors...
65
65 Idea … (5 12) = (60) = 60...
66
66 Complementary Diagonals
67
67 Polynomial formula for n no multiple of 2 or 3 r(i,j) ( 2.i + j ) modulo p complementary diagonals
68
68 Characteristic of Complementary Diagonals
69
69 Characteristic of Complementary Diagonals
70
70 Coloring Extension Formula If (n) n and if p is prime with 2 and 3 then (np) np given a coloring C(i,j) for the chessboard n n r(i,j) ( 2i + j ) modulo p R(i,j) = r(i,j) + p C(i/p,j/p) (elementary algebra in the ring /p )
71
71 Coloring Extension Formula R(i,j) = r(i,j) + p.C(i/p,j/p) If R(i,j) = R(i’,j) r(i,j) + p.C(i/p,j/p) = r(i,j) + p.C(i’/p,j/p) r(i,j)=r(i’,j) and C(i/p,j/p)= C(i’/p,j/p) because r < p i=i’ modulo p because 2 is prime with p ( recall : r(i,j) 2i+j ) and i/p=i’/p because C is a coloration and we are on the same column then i = i’
72
72 Coloring Extension Formula R(i,j) = r(i,j) + p.C(i/p,j/p) Exercise Prove the same kind of results for lines and diagonals
73
73 (60) (5 12) 5 12 60, (70) (5 14) 5 14 70, (75) (5 15) 5 15 75, (84) (7 12) 7 12 84, … (2010) (67 30) 67 30 2010 …
74
74 Conclusion We know that (n) n for n 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 30 and 32 We know that there is an infinity of integers n that are multiples of 2 or 3 such that (n) n Is (n) n n 11 ? But we don’t know, today, the value of (27)
75
75 Publications Comptes Rendus Mathématiques de l’Académie des Sciences, Paris, Elsevier, Ser. I 342 (2006) p 157-160. “Coloration des graphes de reines”. Journal of Heuristics (2004), 10 : p 407-413 : “New Results on Queen Graph Coloring Problem”. ECAI'04, 16 th European Conference on Artificial Intelligence, Valencia, Spain, August 22-27, 2004 : “Complete and Incomplete Algorithms for the Queen Graph Coloring Problem”. Programmation en logique avec contraintes, JFPLC 2004, Hermes Science, ISBN 2-7462-0937-3, p 239-252 : “Algorithmes complet et incomplet pour la coloration des graphes de reines”.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.