1 of 198

NP-Completeness ‘n’ Such

Matthew Andres Moreno

direct complaints to: Dr. Josh Nahum

CSE 431 Fall 2021

2 of 198

PREVIOUSLY ON

3 of 198

Wait what????

  • Intuition: reductions are not symmetric
    • “Reduced to” at least as hard as “reduced from”
  • P (polynomial problems) are “easy” (rice parable)
  • NP Problems are easy to check
    • Decision problems with certificates that can be verified in polynomial time
  • Not all NP Problems are “hard”
    • For example, “Does there exist a number larger than 42?”
  • Technique: reductions via Subway & Olive Garden

4 of 198

(direct all complaints to Dr. Josh Nahum)

5 of 198

EPISODE 6: Meet 3 Sat

“a problem only a mother mathematician could love”

6 of 198

3 Sat: Boolean Notation Refresher

=> “OR

∧ => “AND

¬ => “NOT”

=> “CONTAINED

WITHIN”

x1 => variable

^^ can be �“TRUE” or “FALSE”

7 of 198

3 Sat: Boolean Notation Refresher

x1 (x2 x3)

x1 = FALSE

x2 = FALSE

x2 = TRUE

8 of 198

3 Sat: Boolean Notation Refresher

x1 (x2 x3)

x1 = FALSE

x2 = FALSE

x2 = TRUE

What does this evaluate to?

9 of 198

3-Sat intuition: basically, “You Pick n™℠®©

“CARBS”

“CAFFEINE”

“SUGAR”

3 items

10 of 198

3-Sat intuition: basically, “You Pick n™℠®©

3 items

“Menu 0”

“Menu 1”

“Menu 2”

“Menu n

...

item a

item b

item c

11 of 198

3-Sat intuition: basically, “You Pick n™℠®©

3 items

“Menu 0”

“Menu 1”

“Menu 2”

“Menu n

...

item a

item b

item c

How to solve & what runtime?

12 of 198

3-Sat intuition: “You Pick n™℠®© => “Panera-SAT”

3 items

“Menu 0”

“Menu 1”

“Menu 2”

“Menu n

...

item a

item b

item c

NOT

NOT

NOT

NOT

13 of 198

14 of 198

3-Sat intuition: “You Pick n™℠®© => “Panera-SAT”

3 items

“Menu 0”

“Menu 1”

“Menu 2”

“Menu n

...

item a

item b

item c

NOT

NOT

NOT

NOT

15 of 198

3-Sat intuition: “You Pick n™℠®© => “Panera-SAT”

“Menu 0”

“Menu 1”

“Menu 2”

“Menu n

item a

item b

item c

NOT

NOT

NOT

NOT

...

16 of 198

3-Sat intuition: “You Pick n™℠®© => “Panera-SAT”

“Menu 0”

“Menu 1”

“Menu 2”

“Menu n

item a

item b

item c

NOT

NOT

...

NOT

NOT

17 of 198

3-Sat, more formally

x1

x3

¬x1

x4

x1

x3

x3

¬x2

¬x4

...

x1

¬x3

x2

clause 1

clause 2

clause 3

clause n

18 of 198

3-Sat, even more formally

b1

b2

b3

a1

a2

a3

ai, bi, … ∈ {x1,x2, … ,xm,¬x1,¬x2, … ,¬xm}

...

c1

c2

c3

n1

n2

n3

clause 1

clause 2

clause 3

clause n

19 of 198

3-Sat is a Decision Problem

  • Decision: Does a set of values x1,x2, … ,xm exist such that the 3-Sat expression can be True?
    • aka such that at least one statement within each clause is true

20 of 198

3-Sat is a Decision Problem

  • Decision: Does a set of values x1,x2, … ,xm exist such that the 3-Sat expression can be True?
    • aka such that at least one statement within each clause is true

(x1∨x2∨x3) ∧ (¬x1∨¬x2∨¬x3)

Satisfiable?

21 of 198

3-Sat is a Decision Problem

  • Decision: Does a set of values x1,x2, … ,xm exist such that the 3-Sat expression can be True?
    • aka such that at least one statement within each clause is true

(x1x1x1) ∧ (¬x1∨¬x1∨¬x1)

Satisfiable?

22 of 198

3-Sat is a Decision Problem

  • Decision: Does a set of values x1,x2, … ,xm exist such that the 3-Sat expression can be True?
    • aka such that at least one statement within each clause is true

(x1∨x1∨x1) ∧ (¬x1∨¬x1∨¬x1)

Satisfiable?

23 of 198

3-Sat is a Decision Problem

  • Decision: Does a set of values x1,x2, … ,xm exist such that the 3-Sat expression can be True?
    • aka such that at least one statement within each clause is true

What does a certificate look like for 3 sat?

24 of 198

3-Sat is a Decision Problem

  • Decision: Does a set of values x1,x2, … ,xm exist such that the 3-Sat expression can be True?
    • aka such that at least one statement within each clause is true

How long does it take to verify a 3 sat certificate?

25 of 198

3-Sat is a Decision Problem

  • Decision: Does a set of values x1,x2, … ,xm exist such that the 3-Sat expression can be True?
    • aka such that at least one statement within each clause is true

Is 3 sat a NP problem?

26 of 198

Why is 3-Sat Hard? https://math.stackexchange.com/a/1445847

27 of 198

Why is 3-Sat Hard? https://math.stackexchange.com/a/1445847

OR

28 of 198

Why is 3-Sat Hard? https://math.stackexchange.com/a/1445847

29 of 198

Why is 3-Sat Hard? https://math.stackexchange.com/a/1445847

✅ blue hand

✅ blue hand

✅ blue hand

30 of 198

Why is 3-Sat Hard? https://math.stackexchange.com/a/1445847

✅ blue hand

✅ blue hand

✅ blue hand

n bears, how many possibilities?

31 of 198

Why is 3-Sat Hard? https://math.stackexchange.com/a/1445847

Clause a

Clause b

Clause n

...

😭

😭

32 of 198

Why is 3-Sat Hard? https://math.stackexchange.com/a/1445847

Clause a

Clause b

Clause n

...

😭

😭

33 of 198

Why is 3-Sat Hard? https://math.stackexchange.com/a/1445847

x1 x2 x3 …. xm

¬ ¬ ¬ ¬

Clause a

Clause b

Clause n

...

34 of 198

EPISODE 6: Meet Integer Programming

“another problem only a mother mathematician could love”

35 of 198

36 of 198

37 of 198

ig: @marioparty

38 of 198

ig: @marioparty

Objective: Maximize

39 of 198

ig: @marioparty

Objective: Maximize

constraint :’(

40 of 198

ig: @marioparty

decision problem

constraint :’(

Objective: Maximize

41 of 198

ig: @marioparty

decision problem

constraint :’(

Objective: Maximize

Skrt skrt

42 of 198

ig: @marioparty

decision problem

constraint :’(

Objective: Maximize

Constraint

x ≥ 1

y ≥ 0

x + y ≤ 3

Objective

2y

Threshold

3

x and y must be integers, constraints must be ≤ or ≥

43 of 198

ig: @marioparty

decision problem

constraint :’(

Objective: Maximize

Constraint

x ≥ 1

y ≥ 0

x + y ≤ 3

Objective

2y

Threshold

3

x and y must be integers

Mario Brah’s chomped?

44 of 198

ig: @marioparty

decision problem

constraint :’(

Objective: Maximize

Constraint

x ≥ 1

y ≥ 0

x + y ≤ 3

Objective

2y

Threshold

3

x and y must be integers

What is the certificate?

45 of 198

ig: @marioparty

decision problem

constraint :’(

Objective: Maximize

Constraint

x ≥ 1

y ≥ 0

x + y ≤ 3

Objective

2y

Threshold

3

x and y must be integers

Runtime to verify?

46 of 198

ig: @marioparty

decision problem

constraint :’(

Objective: Maximize

Constraint

x ≥ 1

y ≥ 0

x + y ≤ 3

Objective

2y

Threshold

3

x and y must be integers

Integer programming in NP?

47 of 198

Why is integer programming hard?

48 of 198

EPISODE 6: In Which (To No One’s Surprise) We Reduce 3 Sat to Integer Programming

49 of 198

Next Up: Someting More Hardcore

Integer Programming=>

Reduction

In

Return

Conversion

Out

3 Sat =>

50 of 198

Next Up: Someting More Hardcore

51 of 198

Step 1: Converting Booleans to Integers

  • Use 0 for “FALSE” and 1 for “TRUE
  • Allow integer variables to only be 0 or 1

  • constraint: 0 ≤ vi ≤ 1

52 of 198

Step 1: Converting Booleans to Integers

Use 0 for “FALSE” and 1 for “TRUE

Allow integer variables to only be 0 or 1

What two constraints on vi?

53 of 198

Step 1: Converting Booleans to Integers

  • Use 0 for “FALSE” and 1 for “TRUE
  • Allow integer variables to only be 0 or 1

  • constraint: 0 ≤ vi ≤ 1

54 of 198

Step 2: How to Represent Negation?

  • We have variables vi but we also need ¬vi’s
  • Idea: for each vi make a corresponding ui
  • ui represents ¬vi
  • Need exactly one of ui and vi to be TRUE
  • Constraint: ui + vi = 1

55 of 198

Step 2: How to Represent Negation?

  • We have variables vi but we also need ¬vi’s
  • Idea: for each vi make a corresponding ui
  • ui represents ¬vi
  • Need exactly one of ui and vi to be TRUE
  • Constraint: ui + vi = 1

How to represent constraint w/ ≤ and ≥?

56 of 198

Step 2: How to Represent Negation?

  • We have variables vi but we also need ¬vi’s
  • Idea: for each vi make a corresponding ui
  • ui represents ¬vi
  • Need exactly one of ui and vi to be TRUE
  • Constraint: 1 ≤ ui + vi 1

57 of 198

Step 3: Enforcing Clause Satisfaction

  • Example Clause C: (v1∨¬v2v3)
  • Each clause needs at least one TRUE

58 of 198

Step 3: Enforcing Clause Satisfaction

  • Example Clause C: (v1∨¬v2v3)
  • Each clause needs at least one TRUE

How to enforce at least one “TRUEin integer programming analog?

59 of 198

Step 3: Enforcing Clause Satisfaction

  • Example Clause C: (v1∨¬v2v3)
  • Each clause needs at least one TRUE
  • Integer Programming constraint:

v1+u2+v31

60 of 198

Step 3: Enforcing Clause Satisfaction

  • Example Clause C: (v1∨¬v2v3)
  • Each clause needs at least one TRUE
  • Integer Programming constraint:

c1+c2+c31

61 of 198

Step 4: ∧’s between clauses?

  • Example Clause Ci: (v1∨¬v2v3) ✅

  • 3SAT: C1 C2Cn

62 of 198

Step 4: ∧’s between clauses?

  • Example Clause Ci: (v1∨¬v2v3) ✅

  • 3SAT: C1 C2Cn

Is 3SAT solved?

63 of 198

Constraint

0 ≤ vi1

64 of 198

Constraint

0 ≤ vi1

1 ≤ ui + vi 1

65 of 198

Constraint

0 ≤ vi1

1 ≤ ui + vi 1

c1+c2+c3≥ 1

66 of 198

Constraint

0 ≤ vi1

1 ≤ ui + vi 1

c1+c2+c3≥ 1

Objective

doesn’t matter

Threshold

doesn’t matter

if satisfied, then 3SAT satisfied

67 of 198

Constraint

0 ≤ vi1

1 ≤ ui + vi 1

c1+c2+c3≥ 1

Objective

doesn’t matter

Threshold

doesn’t matter

there’s no chance chain chomp can get Mario if it can’t satisfy constraints…

if satisfied, then 3SAT satisfied

68 of 198

Constraint

0 ≤ vi1

1 ≤ ui + vi 1

c1+c2+c3≥ 1

Objective

42

Threshold

42

there’s no chance Chain Chomp can get Mario if it can’t satisfy constraints…

if Chain Chomp satisfies constraints let it get Mario automatically.

if satisfied, then 3SAT satisfied

69 of 198

Integer Programming=>

Reduction

In

Return

Conversion

Out

3 Sat =>

70 of 198

Integer Programming=>

Reduction

In

Return

Conversion

Out

3 Sat =>

What does this tell us about integer programming relative to 3 SAT?

71 of 198

EPISODE 6: Cook-Levin Theorem

72 of 198

73 of 198

74 of 198

Every problem in NP is just SAT in disguise

75 of 198

No problem in NP is harder than SAT

Every problem in NP is just SAT in disguise

76 of 198

Cook-Levin Theorem

77 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

78 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

79 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

80 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

*bonk

81 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

82 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

yeeeeees

83 of 198

Cook-Levin Theorem (Hurr Durr Edition)

*bonk

:( :( :(

NP

home

work

:( :( :(

84 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

Mr. Baxter

85 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

Mr. Baxter

86 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

87 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

88 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

89 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

but

mooooooooooooom

90 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

that’ll take

exponential time :( :(

91 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

92 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

93 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

94 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

95 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

~~ skreert

vroooom

vroom

96 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

97 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

98 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

99 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

100 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

101 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

102 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

103 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

104 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

105 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

106 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

An answer that will open the lock

107 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

p

o

p

An answer that will open the lock

108 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

p

o

p

An answer that will open the lock

109 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

p

o

p

An answer that will open the lock

What else did Doge Jr. just find???

110 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

p

o

p

ANY ANSWER THAT OPENS THE LOCK IS ALSO AN ANSWER TO THE NP HOMEWORK!!!!!!!

An answer that will open the lock

111 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

instead of solving the NP problem, Doge Jr. can inspect the lock’s mechanism

&

reverse engineer a correct solution that will open the lock

p

o

p

112 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

any problem in NP

113 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

any problem in NP

its polynomial time verifier

114 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

any problem in NP

its polynomial time verifier

certificate

115 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

any problem in NP

its polynomial time verifier

certificate

(opens for correct certificates)

116 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

any problem in NP

its polynomial time verifier

certificate

(opens for correct certificates)

SAT!?!?!!!1!

117 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

any problem in NP

its polynomial time verifier

certificate

(opens for correct certificates)

SAT!?!?!!!1!

Hence, solving SAT can “unlock” any NP problem

118 of 198

Cook-Levin Theorem (Hurr Durr Edition)

one small detail, how big of a SAT?

SAT

119 of 198

Cook-Levin Theorem (Hurr Durr Edition)

one small detail, how big of a SAT?

SAT

SAT

??????

VS.

??????

120 of 198

Cook-Levin Theorem (Hurr Durr Edition)

one small detail, how big of a SAT?

SAT

SAT size in P

SAT

SAT size bigger than P

??????

VS.

??????

121 of 198

Cook-Levin Theorem (Hurr Durr Edition)

polynomial

verifier

122 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

polynomial

verifier

123 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

nk memory

polynomial

verifier

124 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

nk memory

. STATE at Time 0 .

polynomial

verifier

125 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

nk memory

OR!

AND!

. STATE at Time 0 .

polynomial

verifier

126 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

nk memory

OR!

AND!

. STATE at Time 0 .

polynomial

verifier

NOT!

STATE at Time 0

. STATE at Time 1 .

127 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

nk memory

OR!

AND!

. STATE at Time 0 .

polynomial

verifier

NOT!

STATE at Time 0

. STATE at Time 1 .

OR!

AND!

NOT!

OR!

AND!

NOT!

. STATE at Time 2 .

128 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

nk memory

OR!

AND!

. STATE at Time 0 .

polynomial

verifier

NOT!

STATE at Time 0

. STATE at Time 1 .

OR!

AND!

NOT!

OR!

AND!

NOT!

. STATE at Time 2 .

OR!

AND!

NOT!

. STATE at Time nk .

129 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

nk memory

OR!

AND!

. STATE at Time 0 .

polynomial

verifier

NOT!

STATE at Time 0

. STATE at Time 1 .

OR!

AND!

NOT!

OR!

AND!

NOT!

. STATE at Time 2 .

OR!

AND!

NOT!

. STATE at Time nk .

~ nk x nk OR’s AND’s & NOT’S

130 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

nk memory

OR!

AND!

. STATE at Time 0 .

polynomial

verifier

NOT!

STATE at Time 0

. STATE at Time 1 .

OR!

AND!

NOT!

OR!

AND!

NOT!

. STATE at Time 2 .

OR!

AND!

NOT!

. STATE at Time nk .

~ nk x nk OR’s AND’s & NOT’S

~ n2k OR’s AND’s & NOT’S

131 of 198

Cook-Levin Theorem (Hurr Durr Edition)

nk time

nk memory

OR!

AND!

. STATE at Time 0 .

polynomial

verifier

NOT!

STATE at Time 0

. STATE at Time 1 .

OR!

AND!

NOT!

OR!

AND!

NOT!

. STATE at Time 2 .

OR!

AND!

NOT!

. STATE at Time nk .

~ nk x nk OR’s AND’s & NOT’S

~ n2k OR’s AND’s & NOT’S

n2k still polynomial…

so we have a reasonable sized SAT lock mechanism!

132 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

p

o

p

instead of solving the NP problem, Doge Jr. can inspect the lock’s mechanism

&

reverse engineer a correct SAT solution that will open the lock

133 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

p

o

p

* oh and the SAT mechanism isn’t redic big

instead of solving the NP problem, Doge Jr. can inspect the lock’s mechanism

&

reverse engineer a correct SAT solution that will open the lock*

134 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

p

o

p

135 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

p

o

p

No problem in NP is harder than SAT

136 of 198

Cook-Levin Theorem (Hurr Durr Edition)

:( :( :(

NP

home

work

:( :( :(

p

o

p

No problem in NP is harder than SAT

(because we can just reverse engineer the

verifier instead of doing our NP homework)

137 of 198

EPISODE 6: NP Completeness

138 of 198

NP

. SAT .

Cook-levin theorem

139 of 198

NP

. SAT .

Cook-levin theorem

No problem in NP is harder than SAT

140 of 198

The Adventures of Reduction-Doo

141 of 198

The Adventures of Reduction-Doo

… and many more!

142 of 198

The Adventures of Reduction-Doo

… and many more!

AT LEAST

AS HARD AS SAT

AT LEAST

AS HARD AS SAT

AT LEAST

AS HARD AS SAT

143 of 198

monkeys

in a barrel

144 of 198

reductions

monkeys

in a barrel

145 of 198

NP

. SAT .

🤠

146 of 198

NP

. SAT .

REDUCTION

🤠

147 of 198

NP

. SAT .

REDUCTION

🤠

148 of 198

NP

. SAT .

REDUCTION

149 of 198

NP

. SAT .

REDUCTION

150 of 198

NP

. SAT .

NP-Complete

REDUCTION

151 of 198

NP

. SAT .

NP-Complete

REDUCTION

152 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

153 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

P

154 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

155 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

SORTING

156 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

SORTING

157 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

BEST CHESS MOVE

SORTING

158 of 198

NP

. 3 SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

SORTING

CHESS

159 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

SORTING

CHESS

INTEGER PROGRAMMING

160 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

SORTING

CHESS

INT PROGRAM

161 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

SORTING

CHESS

INT PROGRAM

SHORTEST GRAPH PATH

(DJIEKSTRA)

162 of 198

NP

. SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

SORTING

CHESS

INT PROGRAM

DJIEKSTRA’S

163 of 198

Last Piece of Vocab:

164 of 198

Last Piece of Vocab:

NP-Complete

+

0w0-TIME

165 of 198

Last Piece of Vocab:

NP-Complete

+

0w0-TIME

=

NP-HARD

NP-HARD

166 of 198

NP-HARD

167 of 198

How to Prove Something’s NP-Complete

NP-HARD

168 of 198

How to Prove Something’s NP-Complete

NP-HARD

  • Attach monkey

169 of 198

How to Prove Something’s NP-Complete

NP-HARD

  • Attach monkey

=> NP-HARD

170 of 198

How to Prove Something’s NP-Complete

NP-HARD

  • Attach monkey

=> NP-HARD

171 of 198

How to Prove Something’s NP-Complete

NP-HARD

  • Attach monkey

=> NP-HARD

What else?

172 of 198

How to Prove Something’s NP-Complete

NP-HARD

  • Attach monkey

=> NP-HARD

173 of 198

How to Prove Something’s NP-Complete

NP-HARD

  • Attach monkey

=> NP-HARD

Our monkey could be in 0w0-TIME !!!!!

174 of 198

How to Prove Something’s NP-Complete

NP-HARD

  • Attach monkey

=> NP-HARD

2. Polynomial Certificate Checker

175 of 198

How to Prove Something’s NP-Complete

NP-HARD

  • Attach monkey

=> NP-HARD

=> in NP

2. Polynomial Certificate Checker

176 of 198

EPISODE 7: P ?= NP

177 of 198

NP

. 3 SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

178 of 198

NP

. 3 SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

179 of 198

NP

. 3 SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

180 of 198

NP

. 3 SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

181 of 198

NP

. 3 SAT .

🤠

NP-Complete

😴

😳

P

0w0-TIME

What does this mean about sat?

182 of 198

Reduction

In

Return

Conversion

Out

Sat =>

in P

183 of 198

Solvable in Polynomial Time=>

Reduction

In

Return

Conversion

Out

Sat =>

in P

184 of 198

Solvable in Polynomial Time=>

Reduction

In

Return

Conversion

Out

Sat =>

in P

Solvable in Polynomial Time=>

185 of 198

Solvable in Polynomial Time=>

Reduction

In

Return

Conversion

Out

Sat =>

in P

Solvable in Polynomial Time=>

186 of 198

Solvable in Polynomial Time=>

Reduction

In

Return

Conversion

Out

Sat =>

in P

Solvable in Polynomial Time=>

187 of 198

Solvable in Polynomial Time=>

Reduction

In

Return

Conversion

Out

Sat =>

in P

Solvable in Polynomial Time=>

Why is there a flaming 0w0 on this slide?

188 of 198

Solvable in Polynomial Time=>

Reduction

In

Return

Conversion

Out

Sat =>

in P

Solvable in Polynomial Time=>

Why is there a flaming 0w0 on this slide?

189 of 198

Cook-levin theorem

No problem in NP is harder than SAT

190 of 198

Cook-levin theorem

No problem in NP is harder than SAT

Sat is solvable in polynomial time

191 of 198

Cook-levin theorem

Sat is solvable in polynomial time

all of NP is solvable in polynomial time

No problem in NP is harder than SAT

192 of 198

Solvable in Polynomial Time=>

Reduction

in P

all of NP is solvable in polynomial time

193 of 198

Solvable in Polynomial Time=>

Reduction

in P

all of NP is solvable in polynomial time

P = NP

194 of 198

Solvable in Polynomial Time=>

Reduction

in P

all of NP is solvable in polynomial time

P = NP

195 of 198

Solvable in Polynomial Time=>

Reduction

in P

all of NP is solvable in polynomial time

P = NP

196 of 198

Solvable in Polynomial Time=>

Reduction

in P

P = NP -> all of NP is no longer hopelessly hard

1 MILLION DOLLARS

CURE CANCER

BREAK ENCRYPTION

BEAT CANDY CRUSH

etc etc

(or maybe

not)

197 of 198

P ?= NP

????????????????????????????????????????????????????????????????????????????

Does verifiable polynomial time imply solvable in polynomial time?

If P=NP, then the world would be a profoundly different place than we usually assume it to be. There would be no special value in “creative leaps,” no fundamental gap between solving a problem and recognizing the solution once it's found. Everyone who could appreciate a symphony would be Mozart; everyone who could follow a step-by-step argument would be Gauss; everyone who could recognize a good investment strategy would be Warren Buffett.

– Scott Aaronson – Michael Scott

198 of 198

Wait what????

  • 3SAT is like “Panera You Pick n”
  • Integer programming is like Chain Chomp
  • We reduced 3SAT to integer programming
    • Integer programming is at least as hard as 3SAT
  • Cook Levin Theorem
    • Doge Jr. using SAT to reverse engineer the lock to any NP problem
    • No problem is harder than just picking its SAT lock
  • NP-Complete
    • Using a barrel of reductions from SAT to other problems
  • P?=NP
    • Reducing any NP-Complete problem to polynomial time reduces all NP-Complete problems
    • Does verifiable polynomial time imply solvable in polynomial time?