solving graph coloring problems with abstraction and...

33
Solving Graph Coloring Problems with Abstraction and Symmetry Avi Itzhakov Department of Computer Science, Ben Gurion University Joint work with: Michael Codish, Michael Frank and Alice Miller

Upload: ngokiet

Post on 20-Mar-2018

222 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Solving Graph Coloring Problems with Abstraction and Symmetry

Avi ItzhakovDepartment of Computer Science,Ben Gurion University

Joint work with: Michael Codish, Michael Frankand Alice Miller

Page 2: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Main Problem

• Is it possible to color the edges of the complete graph on 30 vertices, with 3 colors (green,blue and red) and avoid 𝐾4, 𝐾3, 𝐾3 ?

Page 3: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Main Problem

• Is it possible to color the edges of the complete graph on 30 vertices, with 3 colors (green,blue and red) and avoid 𝐾4, 𝐾3, 𝐾3 ?

Solution for this problem = Solving a 50 years open instance

Page 4: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Multicolor Ramsey

• The multicolor Ramsey number 𝑅(𝑟1, 𝑟2, … , 𝑟𝑘) is the size of the minimal complete graph such that every edge-coloring with k colors contains a monochromatic complete sub-graph 𝐾𝑟𝑖 for some color i.

R(3,3,3;16) coloring(No 𝐾3, 𝐾3, 𝐾3 subgraphs)

|𝑅 3,3,3; 16 | = 2

𝑅 3,3,3 = 17

Page 5: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Ramsey is Hard

• Determining a Ramsey number is hard [Burr 1986]

• Common approach: using CSP/SAT. – We used BEE. An encoder/compiler from

constraints to CNF using Minisat as underlying sat solver

• The open instances remain open

Page 6: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Our Approach

• 𝑅(4,3,3) was conjectured to be the smallest Ramsey instance that will be solved “soon”

30 ≤ 𝑅 4,3,3 ≤ 31 [K. Piwakowski and S. Radzisowsky 2001]

• We focus on searching 𝑅(4,3,3; 30) coloring:– If there exists a coloring then 𝑅 4,3,3 = 31

– Otherwise 𝑅 4,3,3 = 30

Page 7: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Outline

• Introduction & Motivation

• Embedding

• SAT/CSP Encoding

• The Method

• Results

Page 8: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Notation

• In our context:

– Graph = complete graph 𝐾𝑛– Coloring = edge coloring

2

43

1

graphAdjacency matrix

0 2 3 2232

013

102

320

Color degree tuple of vertex 1 = (0,2,1)

Page 9: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Embedding

• Let G be a 𝑅(4,3,3; 30) coloring

• Assume 𝑣 ∈ 𝑉(𝐺) has color degrees (14,8,7)

v

… … …

𝐺2𝐺1

𝐺3𝐺1

14 8 7

𝐺

𝐾14 𝐾8 𝐾7

Page 10: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Embedding

• Let G be a 𝑅(4,3,3; 30) coloring

• Assume 𝑣 ∈ 𝑉(𝐺) has color degrees (14,8,7)

• 𝐺1 contains green 𝐾3 𝐺 contains green 𝐾4

v

… … …

𝐺2𝐺1

𝐺3𝐺1

14 8 7

𝐺

𝐺1

𝐾14 𝐾8 𝐾7

Page 11: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Embedding

• Let G be a 𝑅(4,3,3; 30) coloring

• Assume 𝑣 ∈ 𝑉(𝐺) has color degrees (14,8,7)

v

… … …

𝐺2𝐺1

𝐺3𝐺1

14 8 7

𝐺

𝐺1

𝐾14 𝐾8 𝐾7

Observation : 𝐺 ∈ 𝑅 4,3,3; 30 ⇒ 𝐺1∈ 𝑅(3,3,3; 14)

Page 12: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Embedding

• Let G be a 𝑅(4,3,3; 30) coloring

• Assume 𝑣 ∈ 𝑉(𝐺) has color degrees (14,8,7)

• Similarly, 𝐺2 contains red 𝐾2 𝐺 contains red 𝐾3𝐺3 contains pink 𝐾2 𝐺 contains pink 𝐾3

v

… … …

𝐺2𝐺1

𝐺3𝐺1

14 8 7

𝐺

𝐺1

𝐾14 𝐾8 𝐾7

Page 13: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Embedding

• Let G be a 𝑅(4,3,3; 30) coloring

• Assume 𝑣 ∈ 𝑉(𝐺) has color degrees (14,8,7)

v

… … …

𝐺1

14 8 7

𝐺

𝐾16 𝐾8 𝐾5

Observation :𝐺 ∈ 𝑅 4,3,3; 30 ⇒ 𝐺1 ∈ 𝑅(3,3,3; 14), 𝐺2 ∈ 𝑅 4,2,3; 8 , 𝐺3 ∈ 𝑅(4,3,2; 7)

𝐺1 ∈ 𝑅(3,3,3; 14) 𝐺2 ∈ 𝑅(4,2,3; 8) 𝐺3 ∈ 𝑅(4,3,2; 7)

Page 14: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Embedding

• One of the embedding cases for color degree (14,8,7):

𝐺3

𝐺2

𝐺1

|R(3,3,3;14)| =115

|R(4,2,3;8)| =3

|R(4,3,2;7)| =9

3105 instances

𝑣

14 8 7

Page 15: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Embedding - Summarize

• Reduces the search space

• Solve different cases in parallel

Page 16: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Outline

• Introduction & Motivation

• Embedding

• SAT/CSP Encoding

• The Method

• Results

Page 17: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

SAT/CSP Encoding• Represent the coloring A as adjacency matrix

– 𝑎𝑖,𝑗 = 𝑐𝑜𝑙𝑜𝑟 𝑜𝑓 𝑒𝑑𝑔𝑒 𝑖, 𝑗

𝑎𝑖,𝑗0

0

K colors undirected No self loops

Page 18: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

SAT/CSP Encoding (Cont’d)

• No monochromatic 𝐾3 subgraph

• No monochromatic 𝐾4 subgraph

Page 19: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

SAT/CSP Encoding (Cont’d)

Note: all constraints are straightforward to prescribe as CNF. This is done by BEE

Page 20: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Outline

• Introduction & Motivation

• Embedding

• SAT/CSP Encoding

• The Method

• Results

Page 21: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Known Results for R(4,3,3; 30)

Possible color degrees for a 𝑅 4,3,3; 30 coloring

(16,8,5)

(16,7,6)

(15,8,6)

(15,7,7)

(14,8,7)

(13,8,8)

[K. Piwakowski and S. Radzisowsky]

Page 22: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

The Method

• For each possible embedding, we use a SAT solver in an attempt to find a coloring for R(4,3,3;30).

• The solving is done in parallel.

instancessubgraphs𝑣1 𝑑𝑒𝑔𝑟𝑒𝑒𝑠

54|𝑅(4,3,2; 5)| = 9|𝑅(4,2,3; 8)| = 3|𝑅(3,3,3; 16)| = 2(16,8,5)

270|𝑅(4,3,2; 6) = 15|𝑅(4,2,3; 7)| = 9|𝑅(3,3,3; 16)| = 2(16,7,6)

90|𝑅(4,2,3; 6)| = 15|𝑅(4,2,3; 8)| = 3|𝑅(3,3,3; 15)| = 2(15,8,6)

162|𝑅(4,2,3; 7)| = 9|𝑅(4,2,3; 7)| = 9|𝑅(3,3,3; 15)| = 2(15,7,7)

3105|𝑅(4,2,3; 7)| = 9|𝑅(4,2,3; 8)| = 3|𝑅(3,3,3; 14)| = 115(14,8,7)

?|𝑅(4,2,3; 8)| = 3|𝑅(4,2,3; 8)| = 3|𝑹(𝟑, 𝟑, 𝟑; 𝟏𝟑)| = ?(13,8,8)

Page 23: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Results (Part 1)

• Solving all cases except (13,8,8)

• All of them are unsatisfiable

Page 24: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

What is Missing to find the exact 𝑅(4,3,3) number

𝐺3

𝐺2

𝐺1

|R(3,3,3;13)| =?

|R(4,2,3;8)| =3

|R(4,3,2;8)| =3

? instances

(13,8,8) case:

Page 25: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Computing R(3,3,3;13) Colorings

• First try: straightforward encoding with symmetry breaking [Codish et al. 2013] – no success

Unsat

Page 26: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Abstraction- Degree Matrix

• Same as degree sequence for colorings

2

43

1

012

111

111

012

3

3

3

3

Degree matrix Degree sequence

Page 27: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Results (Part 2) -Computing 𝑅(3,3,3; 13)

• Find all colorings per degree matrix

• Reduce isomorphic colorings

Page 28: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Completing the search for 𝑅(4,3,3; 30)

|R(3,3,3;13)|= 78,892

|R(4,2,3;8)| =3

|R(4,3,2;8)| =3

710,028 instances

(13,8,8) case:

𝐺3

𝐺2

𝐺1

Page 29: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Completing the search for 𝑅(4,3,3; 30)

• Actually only 78,892 cases

𝑐𝑜𝑛𝑠𝑡𝑟𝑎𝑖𝑛𝑡𝑠:1) 𝐴, 𝐵, 𝐶 ∈ 1,22) 𝐴 ≠ 𝐵

approximation

R(4,2,3;8) colorings

Page 30: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Results for (13,8,8) case

• 78,890 from 78892 finished

• All unsatisfiable

Time required per instance

Page 31: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Discussion

• Proofs based on UNSAT results present a verification problem

• Gaining confidence in the results

– Apply the software on satisfiable instances

– We independently reproduce unpublished results

Page 32: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Positive Example

• A R(4,3,3;29) coloring has been observed [Kalbfleisch 1966]

• Our software finds a R(4,3,3;29) coloring isomorphic to this one

Page 33: Solving Graph Coloring Problems with Abstraction and …sysrun.haifa.il.ibm.com/hrl/cspsat2015/papers/solving_graph.pdf · Solving Graph Coloring Problems with Abstraction and Symmetry

Conclusion

• Abstraction and Symmetry are essential ingredient when modeling hard combinatorial problems

• 𝑅 3,3,3; 13 = 78,892

• 𝑅 4,3,3 = 30 (two more instances remain…)