The Complexity of Grid Coloring

Similar documents
The Complexity of Grid Coloring

More NP-Complete Problems

Rectangle Free Coloring of Grids

SAT, NP, NP-Completeness

NP-Completeness Part II

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

Comp487/587 - Boolean Formulas

Maximum 3-SAT as QUBO

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

Propositional and First-Order Logic

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

Artificial Intelligence and Creativity Two Requirements to Solve an Extremely Complex Coloring Problem

NP and NP Completeness

Lecture 4 Scribe Notes

NP-Completeness Part II

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Chapter 9. PSPACE: A Class of Problems Beyond NP. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

NP-Hardness reductions

Model Checking Lower Bounds for Simple Graphs. Michael Lampis KTH Royal Institute of Technology

NP-Completeness Part II

MAT 300 Midterm Exam Summer 2017

9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete

CSCI3390-Lecture 17: A sampler of NP-complete problems

Chapter 26: Comparing Counts (Chi Square)

Essential facts about NP-completeness:

1. Introduction Recap

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.

1 Reductions and Expressiveness

Week 3: Reductions and Completeness

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office?

Complete Sets of Hamiltonian Circuits for Classification of Documents

CSE 135: Introduction to Theory of Computation NP-completeness

9. PSPACE 9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete

Show that the following problems are NP-complete

Recap from Last Time

About the impossibility to prove P NP or P = NP and the pseudo-randomness in NP

How it Began. How can you divide and distribute 5 muffins to 3 students so that every student gets 5 3. where nobody gets a tiny sliver?

NP Completeness and Approximation Algorithms

Introduction to Computational Complexity

Non-Deterministic Time

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle

1 Computational problems

NP-Completeness. Until now we have been designing algorithms for specific problems

Lecture 24 : Even more reductions

INTRO TO COMPUTATIONAL COMPLEXITY

Classes of Problems. CS 461, Lecture 23. NP-Hard. Today s Outline. We can characterize many problems into three classes:

Supplementary exercises in propositional logic

CS21 Decidability and Tractability

Introduction to Solving Combinatorial Problems with SAT

COP 4531 Complexity & Analysis of Data Structures & Algorithms

NP-Complete Problems. More reductions

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

Admin NP-COMPLETE PROBLEMS. Run-time analysis. Tractable vs. intractable problems 5/2/13. What is a tractable problem?

Design and Analysis of Algorithms

1 Propositional Logic

CS103 Handout 22 Fall 2012 November 30, 2012 Problem Set 9

Algorithms: COMP3121/3821/9101/9801

Rectangle Free Coloring of Grids

CISC 4090 Theory of Computation

1.1 P, NP, and NP-complete

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming

CSCI3390-Lecture 16: NP-completeness

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

Lecture 20: conp and Friends, Oracles in Complexity Theory

NP and Computational Intractability

Intro to Theory of Computation

Decidability of WS1S and S1S (An Exposition) Exposition by William Gasarch-U of MD

Harvard CS 121 and CSCI E-121 Lecture 22: The P vs. NP Question and NP-completeness

Introduction to Advanced Results

NP Complete Problems. COMP 215 Lecture 20

Similar Shapes and Gnomons

VLSI CAD: Lecture 4.1. Logic to Layout. Computational Boolean Algebra Representations: Satisfiability (SAT), Part 1

Independence and chromatic number (and random k-sat): Sparse Case. Dimitris Achlioptas Microsoft

Lecture 18: More NP-Complete Problems

NP-problems continued

COMP 382. Unit 10: NP-Completeness

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

Warm-Up Problem. Is the following true or false? 1/35

CS151 Complexity Theory. Lecture 4 April 12, 2017

Talk Science Professional Development

LOGIC PROPOSITIONAL REASONING

Propositional Logic: Evaluating the Formulas

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

Lower and Upper Bound Results for Hard Problems Related to Finite Automata

Limitations of Algorithm Power

INTRO TO MATH PROGRAMMING MA/OR 504, FALL 2015 LECTURE 11

Formal definition of P

CS21 Decidability and Tractability

Algorithm Design and Analysis

SAT-Solvers: propositional logic in action

SAT, Coloring, Hamiltonian Cycle, TSP

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

No Harder Than. We want these transformations to effectively be a problem-hardness version of #, which we will call No Harder Than.

Complexity: moving from qualitative to quantitative considerations

P, NP, NP-Complete, and NPhard

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

Time to learn about NP-completeness!

Transcription:

The Complexity of Grid Coloring Daniel Apon U of MD William Gasarch U of MD Kevin Lawler Permanent

Grid Coloring Notation: If n N then [n] is the set {1,..., n}. Definition G n,m is the grid [n] [m]. 1. G n,m is c-colorable if there is a c-coloring of G n,m such that no rectangle has all four corners the same color. 2. χ(g n,m ) is the least c such that G n,m is c-colorable.

Examples A FAILED 2-Coloring of G 4,4 R B B R B R R B B B R R R R R B A 2-Coloring of G 4,4 R B B R B R R B B B R R R B R B

Example: a 3-Coloring of G(10,10) EXAMPLE: A 3-Coloring of G 10,10 R R R R B B G G B G R B B G R R R G G B G R B G R B B R R G G B R B B R G R G R R B G G G B G B R R G R B B G G R B B R B G R B G B R G R B B B G R R G B G B R G G G R B R B B R B B G B R B G R R G G It is known that CANNOT 2-color G 10,10. Hence χ(g 10,10 ) = 3.

Obstruction Sets Fenner-Gasarch-Glover-Purewall [FGGP] showed: 1. For all c there exists OBS c, a finite set of grids, such that G n,m is c-colorable iff no element of OBS c is inside G m,n. 2. FGGP have a proof which shows OBS c 2c 2. 3. If OBS c is known then the set of c-colorable grids is completely characterized.

OBS-2 and OBS-3 Known FGGP showed OBS 2 = {G 3,7, G 5,5, G 7,3 } OBS 3 = {G 4,19, G 5,16, G 7,13, G 10,11, G 11,10, G 13,7, G 16,5, G 19,4 } 2-colorability table. C for Colorable, U for Uncolorability. 2 3 4 5 6 7 2 C C C C C C 3 C C C C C U 4 C C C C C U 5 C C C U U U 6 C C C U U U 7 C U U U U U

4-Colorability 1. FGGP did not (as of 2009) determine OBS 4. 2. FGGP had reasons to think G 17,17 is 4-colorable but they did not have a 4-coloring. 3. In 2009 Gasarch offered a prize of $289.00 for the first person to email him a 4-coloring of G 17,17. 4. Brian Hayes, Scientific American Math Editor, popularized the challenge.

Challenge Was Hard 1. Lots of people worked on it. 2. No progress. 3. Finally solved in 2012 by Bernd Steinbach and Christian Posthoff [SP]. Clever, and SAT-solver, but did not generalize. 4. They and others also found colorings that lead to OBS 4 = { } G 5,41, G 6,31, G 7,29, G 9,25, G 18,23, G 11,22, G 13,21, G 17,19, G 41,5, G 31,6, G 29,7, G 25,9, G 23,18, G 22,11, G 21,13, G 19,17

Is Grid Coloring Hard? We view this two ways: 1. Is there an NP-complete problem lurking here somewhere? YES! 2. Is there a Prop Statement about Grid Coloring whose resolution proof requires exp size? YES!

Part I of Talk NP Completeness of GCE THERE IS AN NP-COMPLETE PROBLEM LURKING!

Grid Coloring Hard!-NP stuff 1. Let c, N, M N. A partial mapping χ of N M to {1,..., c} is a extendable to a c-coloring if there is an extension of χ to a total mapping which is a c-coloring of N M. 2. GCE is NP-complete! GCE = {(N, M, c, χ) χ is extendable}.

GCE is NP-complete φ(x 1,..., x n ) = C 1 C m is a 3-CNF formula. We determine N, M, c and a partial c-coloring χ of N M such that φ 3-SAT iff (N, M, c, χ) GCE

Forcing a Color to Only Appear Once in Main Grid G G R G G G G G G G G G G G G G G can only appear once in the main grid, where it is, but what about R? (The double lines are not part of the construction. They are there to separate the main grid from the rest.)

Forcing a Color to Only Appear Once in Main Grid R G R G R R G R G R G R G R G G G G G G G G G R G R R R R R R R R G can only appear once in the main grid, where it is. R cannot appear anywhere in the main grid.

Using Variables D means that the color is some distinct, unique color. D D D D D D D D D D D x 1 D D D D D D D D T F x 1 D D D D D D T F T F x 1 D D D D T F T F D D x 1 D D T F T F D D D D x 1 T F T F D D D D D D x 1 T F D D D D D D D D The labeled x 1, x 1 are not part of the grid. They are visual aids.

Coding a Clause C 1 = L 1 L 2 L 3. Where L 1, L 2, L 3 are literals (vars or their negations). D T T.... L 1 D F. L 2.... L 3 F D. The L 1, L 2, L 3 are not part of the grid. They are visual aids.......

Coding a Clause More Readable C 1 = L 1 L 2 L 3. One can show that D T T L 1 D F L 2 L 3 F D If put any of TTT, TTF, TFT, FTT, FFT, FTF, TFF in first column then can extend to full coloring. If put FFF in first column then cannot extend to a full coloring.

Example: (F,F,T) C 1 = L 1 L 2 L 3. The * is forced to be T. D T T L 1 F D F L 2 F L 3 T F D

Example: (F,F,T) C 1 = L 1 L 2 L 3. The * is forced to be F. D T T L 1 F D F L 2 F T L 3 T F D

Example: (F,F,T) C 1 = L 1 L 2 L 3. D T T L 1 F D F L 2 F F T L 3 T F D

Other Assignments 1. We did (F, F, T ). 2. (F, T, F ), (T, F, F ) are similar. 3. (F, T, T ), (T, F, T ), (T, T, F ), (T, T, T ) are easier.

Cannot Use (F,F,F) C 1 = L 1 L 2 L 3. Want that (F, F, F ) CANNOT be extended to a coloring. D T T L 1 F D F L 2 F L 3 F F D The * s are forced to be T.

Cannot Use (F,F,F) D T T L 1 F D F L 2 F T T L 3 F F D There is a mono rectangle of T s. NOT a valid coloring!

Put it all Together Do the above for all variables and all clauses to obtain the result that GRID EXT is NP-complete!

Big Example (x 1 x 2 x 3 ) (x 2 x 3 x 4 ) (x 1 x 3 x 4 ) C 1 C 1 C 2 C 2 C 3 C 3 D D D D D D D D D D D T T T T T T x 4 D D D D D D D D T F D D D D D F x 4 D D D D D D D D T F D D D F D D x 3 D D D D D D T F D D D D D D D D x 3 D D D D T F T F D D D D D D x 3 D D D D T F D D D D D F D D x 2 D D T F D D D D D D D D F D D D x 2 D D T F D D D D D D D D D D x 1 T F D D D D D D D D D D D D F D x 1 T F D D D D D D D D F D D D D D

Does this Explain why the Challenge was Hard? 1. MAYBE NOT: GCE is Fixed Parameter Tractable: For fixed c GCE c is in time O(N 2 M 2 + 2 O(c4) ). But for c = 4 this is huge! 2. MAYBE NOT: Our result says nothing about the case where the grid is originally all blank.

Open Questions 1. Improve Fixed Parameter Tractable algorithm. 2. NPC results for mono squares? Other shapes? 3. Show that {(n, m, c) : G n,m is c-colorable } is hard. If n, m in unary then sparse set, not NPC New framework for hardness needed. If n, m binary then not in NP. Could try to prove NEXP-complete. But we the difficulty of the problem is not with the grid being large, but with the number-of-possibilities being large.