LGI2P Research Center Coloration des graphes de reines LGI2P Ecole des Mines d’Alès.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

Constraint Satisfaction Problems
Generalization and Specialization of Kernelization Daniel Lokshtanov.
Query Optimization of Frequent Itemset Mining on Multiple Databases Mining on Multiple Databases David Fuhry Department of Computer Science Kent State.
Graph Isomorphism Algorithms and networks. Graph Isomorphism 2 Today Graph isomorphism: definition Complexity: isomorphism completeness The refinement.
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
The Theory of NP-Completeness
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
Rajat K. Pal. Chapter 3 Emran Chowdhury # P Presented by.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
1 Shira Zucker Ben-Gurion University of the Negev Advisors: Prof. Daniel Berend Prof. Ephraim Korach Anticoloring for Toroidal Grids.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Toward NP-Completeness: Introduction Almost all the algorithms we studies so far were bounded by some polynomial in the size of the input, so we call them.
Clique Cover Cook’s Theorem 3SAT and Independent Set
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Hardness Results for Problems
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Tractable Symmetry Breaking Using Restricted Search Trees Colva M. Roney-Dougal, Ian P. Gent, Tom Kelsey, Steve Linton Presented by: Shant Karakashian.
Fixed Parameter Complexity Algorithms and Networks.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Artificial Intelligence Lecture 9. Outline Search in State Space State Space Graphs Decision Trees Backtracking in Decision Trees.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Introduction to Job Shop Scheduling Problem Qianjun Xu Oct. 30, 2001.
Lecture 22 More NPC problems
Lecture 2: General Problem-Solving Methods. Greedy Method Divide-and-Conquer Backtracking Dynamic Programming Graph Traversal Linear Programming Reduction.
CS 312: Algorithm Analysis Lecture #32: Intro. to State-Space Search This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
1 N -Queens via Relaxation Labeling Ilana Koreh ( ) Luba Rashkovsky ( )
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Course: Logic Programming and Constraints
Memory Allocation of Multi programming using Permutation Graph By Bhavani Duggineni.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
The Dominating Set and its Parametric Dual  the Dominated Set  Lan Lin prepared for theory group meeting on June 11, 2003.
CP Summer School Modelling for Constraint Programming Barbara Smith 3. Symmetry, Viewpoints.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
LIMITATIONS OF ALGORITHM POWER
Exponential time algorithms Algorithms and networks.
Chapter 13 Backtracking Introduction The 3-coloring problem
CSCE350 Algorithms and Data Structure Lecture 21 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
Algorithms for hard problems Introduction Juris Viksna, 2015.
February 11, 2016Introduction to Artificial Intelligence Lecture 6: Search in State Spaces II 1 State-Space Graphs There are various methods for searching.
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
PC-Trees Based on a paper by Hsu and McConnell. Talk Outline We Define the consecutive ones and circular ones problems We show PQ Trees – the traditional.
Hard Problems Some problems are hard to solve.  No polynomial time algorithm is known.  E.g., NP-hard problems such as machine scheduling, bin packing,
CHAPTER 7 Determinant s. Outline - Permutation - Definition of the Determinant - Properties of Determinants - Evaluation of Determinants by Elementary.
The NP class. NP-completeness
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Part VI NP-Hardness.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Design and Analysis of Algorithm
NP-Completeness Yin Tat Lee
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Applied Combinatorics, 4th Ed. Alan Tucker
NP-Completeness Yin Tat Lee
Constraint satisfaction problems
Backtracking and Branch-and-Bound
The Theory of NP-Completeness
Unit –VII Coping with limitations of algorithm power.
Constraint satisfaction problems
Presentation transcript:

LGI2P Research Center Coloration des graphes de reines LGI2P Ecole des Mines d’Alès

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 Rule for moving the queen on the chessboard Each queen controls: 1 column 1 row 2 diagonals

4 Graph definition  1 square of the chessboard  vertex  2 squares controlled by the same queen  edge

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 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 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)

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 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 Intox…

11 Intox…

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 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 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 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 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 Question (2)  Are there n independent sets with exactly n vertices which do not cover themselves ?

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 Avoiding many equivalent coloring permutations n squares belonging to a same clique are colored once for all:

20 Computing IS by backtracking  Enumeration : backtracking

21 A CSP with n variables (corresponding to a n squares)  Spreading of the independent sets for Queen-10 2

22 Branching on the smallest domain variable  Non overlapping constraints propagation  The search space size is decreasing geometrically

23 First result n = 10 : no solution 7000 seconds   (10) = 11

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 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 Efficient Filtering (experimentally)  At the root of the search tree this independent set is excluded from the search space

27 Efficient Filtering (experimentally)  Search space reduction

28 Efficient Filtering (experimentally)  At each level : 4 more constraints

29 First Results : complete method   (10) no solution 1 second (maximum depth of backtrack in the search tree : 5 rather than 10)   (12)  solutions 6963 seconds (exhaustive search)   (14)  14 1 solution en 142 hours (search aborted after one week)

30 Interest of filtering  Comparative results on n=12

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 Certificate for n = 12

33 Certificate for n = 12

34 Certificate for n = 12

35 Certificate for n = 12

36 Exact but incomplete method  Assumption on the distribution of the colors on the chessboard  Enumerate several independent sets at the same time

37 Geometric operator (1) n = 2  p  symmetry H Search tree depth: n/2  (22)  22

38 Geometric operator (1) n = 2  p  symmetry H Search tree depth: n/2  (22)  22

39 Geometric operator (1) n = 2  p  symmetry H Search tree depth: n/2  (22)  22

40 Geometric operator (2) n = 3  p  central symmetry Search tree depth: (n/2) - 1  (15)  15

41 Geometric operator (2) n = 3  p  central symmetry Search tree depth: (n/2) - 1  (15)  15

42 Geometric operator (2) n = 3  p  central symmetry Search tree depth: (n/2) - 1  (15)  15

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 Geometric operator (3) n = ( 4  p ) + 1   /2 rotations: R, R 2 et R 3 Search tree depth: (n/4) - 1  (21)  21

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 Geometric operator (3) n = ( 4  p ) + 1   /2 rotations: R, R 2 et R 3 Search tree depth: (n/4) - 1  (21)  21

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 Geometric operator (3) n = ( 4  p ) + 1   /2 rotations: R, R 2 et R 3 Search tree depth: (n/4) - 1  (21)  21

49 Geometric operator (4) n = ( 4  p )  symmetries H & V Search tree depth: (n/4)  (32)  32

50 Geometric operator (4) n = ( 4  p )  symmetries H & V Search tree depth: (n/4)  (32)  32

51 Geometric operator (4) n = ( 4  p )  symmetries H & V Search tree depth: (n/4)  (32)  32

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)  sec.  (14)  14 5 sec.  (22)  sec.  (15)  sec.  (24)  sec.  (16)  16 1 sec.  (28)  sec.  (18)  sec.  (32)  sec. … 1024 vertices

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 The 26 letters of the alphabet are enough for coloring the 26 X 26 chessboard

55 26 = ( 3 x 2 ) + …

56 26 = ( 5 x 4 ) + ( 3 x 2 )

57  (26) = sec. (better than 1,400,000)

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 X(30)=30 cpu 2965 sec.

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 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 Remark An independent set with 12 vertices for n=12

63 … remains an independent set for n = Remark

64 Idea … replacing 1 square that uses 1 color by 5 2 squares that use only 5 colors...

65 Idea …  (5  12) =  (60) = 60...

66 Complementary Diagonals

67 Polynomial formula for n no multiple of 2 or 3 r(i,j)  ( 2.i + j ) modulo p  complementary diagonals

68 Characteristic of Complementary Diagonals

69 Characteristic of Complementary Diagonals

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 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 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  (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 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 Publications Comptes Rendus Mathématiques de l’Académie des Sciences, Paris, Elsevier, Ser. I 342 (2006) p “Coloration des graphes de reines”. Journal of Heuristics (2004), 10 : p : “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 , p : “Algorithmes complet et incomplet pour la coloration des graphes de reines”.