. . . x 1 x 1 x 2 x 2 x 3 x 3 x n x n 31 32 3-satisfiability - - PowerPoint PPT Presentation

x 1 x 1 x 2 x 2 x 3 x 3 x n x n 31 32 3 satisfiability
SMART_READER_LITE
LIVE PREVIEW

. . . x 1 x 1 x 2 x 2 x 3 x 3 x n x n 31 32 3-satisfiability - - PowerPoint PPT Presentation

Graph 3-colorability Graph 3-colorability 3-COLOR . Given a graph, is there a way to color the vertices 3-COLOR . Given a graph, is there a way to color the vertices red, green, and blue so that no adjacent vertices have the same color? red,


slide-1
SLIDE 1

29

Graph 3-colorability

3-COLOR. Given a graph, is there a way to color the vertices

red, green, and blue so that no adjacent vertices have the same color?

yes instance

30

Graph 3-colorability

3-COLOR. Given a graph, is there a way to color the vertices

red, green, and blue so that no adjacent vertices have the same color?

yes instance 3-COLOR. Given a graph, is there a way to color the vertices

red, green, and blue so that no adjacent vertices have the same color?

31

Graph 3-colorability

no instance

32

3-satisfiability reduces to graph 3-colorability

  • Claim. 3-SAT P 3-COLOR.
  • Pf. Given 3-SAT instance , we construct an instance of 3-COLOR

that is 3-colorable if and only if is satisfiable. Construction. (i) Create one vertex for each literal and 3 vertices (ii) Connect in a triangle and connect each literal to B. (iii) Connect each literal to its negation. (iv) For each clause, attach a 6-vertex gadget [details to follow].

F T B F T B B

x1 ¬x1 x2 ¬x2 x3 ¬x3 xn ¬xn

. . .

F B

true false base

T

slide-2
SLIDE 2

33

3-satisfiability reduces to graph 3-colorability

  • Claim. If graph is 3-colorable then is satisfiable..

Pf.

  • Consider assignment where corresponds to false and to true .
  • (ii) [triangle] ensures each literal is true or false.

F B

true false base

x1 ¬x1 x2 ¬x2 x3 ¬x3 xn ¬xn

. . .

T F T

34

3-satisfiability reduces to graph 3-colorability

  • Claim. If graph is 3-colorable then is satisfiable..
  • Pf. Suppose graph is 3-colorable.
  • Consider assignment where corresponds to false and to true .
  • (ii) [triangle] ensures each literal is true or false.
  • (iii) ensures a literal and its negation are opposites.

x1 ¬x1 x2 ¬x2 x3 ¬x3 xn ¬xn

. . .

F B

true false base

T F T

35

3-satisfiability reduces to graph 3-colorability

  • Claim. If graph is 3-colorable then is satisfiable.

Pf.

  • Consider assignment where corresponds to false and to true .
  • (ii) [triangle] ensures each literal is true or false.
  • (iii) ensures a literal and its negation are opposites.
  • (iv) [gadget] ensures at least one literal in each clause is true.

T F B

6-node gadget true false

(x1 ¬x2 x3) x1 ¬x2 x3

F T stay tuned

36

3-satisfiability reduces to graph 3-colorability

  • Claim. If graph is 3-colorable then is satisfiable.

Pf.

  • Consider assignment where corresponds to false and to true .
  • (ii) [triangle] ensures each literal is true or false.
  • (iii) ensures a literal and its negation are opposites.
  • (iv) [gadget] ensures at least one literal in each clause is true.

Therefore, is satisfiable.

T F B

6-node gadget true false

x1 ¬x2 x3

?? F F

(x1 ¬x2 x3)

T

slide-3
SLIDE 3

37

3-satisfiability reduces to graph 3-colorability

  • Claim. If is satisfiable then graph is 3-colorable.

Pf.

  • Color nodes corresponding to false literals T and to true literals F .

x1 ¬x2 x3 (x1 ¬x2 x3)

at least one in each clause

38

3-satisfiability reduces to graph 3-colorability

  • Claim. If is satisfiable then graph is 3-colorable.

Pf.

  • Color nodes corresponding to false literals T and to true literals F .
  • Color vertex below one T vertex F , and vertex below that B .

T

x1 ¬x2 x3

39

3-satisfiability reduces to graph 3-colorability

  • Claim. If is satisfiable then graph is 3-colorable.

Pf.

  • Color nodes corresponding to false literals T and to true literals F .
  • Color vertex below one T vertex F , and vertex below that B .
  • Color remaining middle row vertices B .

T

x1 ¬x2 x3 (x1 ¬x2 x3)

40

3-satisfiability reduces to graph 3-colorability

  • Claim. If is satisfiable then graph is 3-colorable.

Pf.

  • Color nodes corresponding to false literals T and to true literals F .
  • Color vertex below one T vertex F , and vertex below that B .
  • Color remaining middle row vertices B .
  • Color remaining bottom vertices T or F as forced.

Works for all gadgets, so graph is 3-colorable.

x1 ¬x2 x3 (x1 ¬x2 x3)

slide-4
SLIDE 4

41

3-satisfiability reduces to graph 3-colorability

  • Claim. 3-SAT P 3-COLOR.
  • Pf. Given 3-SAT instance , we construct an instance of 3-COLOR

that is 3-colorable if and only if is satisfiable. Construction. (i) Create one vertex for each literal. (ii) Create 3 new vertices T, F, and B; connect them in a triangle, and connect each literal to B. (iii) Connect each literal to its negation. (iv) For each clause, attach a gadget of 6 vertices and 13 edges Conjecture: No polynomial-time algorithm for 3-SAT Implication: No polynomial-time algorithm for 3-COLOR. Reminder Construction is not intended for use, just to prove 3-COLOR difficult

42

designing algorithms proving limits classifying problems polynomial-time reductions NP-completeness

43

More Poly-Time Reductions

3-SAT 3DM VERTEX COVER HAM-CYCLE CLIQUE INDEPENDENT SET 3-COLOR PLANAR-3-COLOR EXACT COVER HAM-PATH SUBSET-SUM PARTITION INTEGER PROGRAMMING KNAPSACK Dick Karp '85 Turing award

3-SAT reduces to 3-COLOR

TSP BIN-PACKING

Conjecture: no poly-time algorithm for 3-SAT. (and hence none of these problems)

46

Implications of Karp + Cook

3-SAT 3DM VERTEX COVER HAM-CYCLE CLIQUE INDEPENDENT SET 3-COLOR PLANAR-3-COLOR EXACT COVER HAM-PATH SUBSET-SUM PARTITION INTEGER PROGRAMMING KNAPSACK

3-SAT reduces to 3-COLOR

TSP BIN-PACKING

Conjecture: no poly-time algorithm for 3-SAT. (and hence none of these problems)

3-COLOR reduces to 3-SAT

All of these problems poly-reduce to one another!

slide-5
SLIDE 5

47

Poly-Time Reductions: Implications

48

Poly-Time Reductions: Implications

49

Poly-Time Reductions: Implications