ADVANCED ALGORITHMS Lecture 25: Intractability 1 ANNOUNCEMENTS HW - - PowerPoint PPT Presentation

advanced algorithms
SMART_READER_LITE
LIVE PREVIEW

ADVANCED ALGORITHMS Lecture 25: Intractability 1 ANNOUNCEMENTS HW - - PowerPoint PPT Presentation

ADVANCED ALGORITHMS Lecture 25: Intractability 1 ANNOUNCEMENTS HW 6 is out due on Friday, December 7 Project final deadline: Wednesday, December 5 2gth Nov class on Thursday No mostly review Next week 9 2 LAST WEEK G k


slide-1
SLIDE 1

ADVANCED ALGORITHMS

Lecture 25: Intractability

1

slide-2
SLIDE 2

ANNOUNCEMENTS

➤ HW 6 is out — due on Friday, December 7 ➤ Project final deadline: Wednesday, December 5

2

No

class on Thursday

2gth Nov

9

Next week

mostly review

slide-3
SLIDE 3

LAST WEEK

3

➤ Complexity of decision problems — limits on time/space of

computation

➤ Classes P and NP ➤ NP — non-deterministic polynomial time; problems for which a YES

instance has a “witness/certificate” that can be efficiently verified.

➤ E.g., typical puzzle, circuit satisfiability, checking if number is prime ➤ Cook-Levin theorem: every problem in NP is “basically” SAT

Independents

G

k

Of

polynomial time

pT

fiak

slide-4
SLIDE 4

RECAP — NP

4

Verifier

(polynomial time) witness w

using independent set problem

as running example

I

prover

i

If

I

is

aYES instance

F a witness certificate w

that

can

convince verifier that I

is

a YESinstance

If

I

is

a No

instance

prover

cannot convince

verifier that I

is

a YES instance

slide-5
SLIDE 5

SATISFIABILITY

PROBLEM SAT

F l

I l I I

I

inputs

X

X

X n

7IF

Problem

Given the circuit

do there exist inputs

Xi

s t

the output

2

is TRUE l

Cook

mm

Anyproblem imNP

canbe

encoded

asSAT

slide-6
SLIDE 6

E

Independent set

can be

encoded

as f SAT

7

tf

t

I

ta

M

I

l

l

X

Xz

Xi

Xj

Xn

engotindmoset

  • I

l

l

  • Easylo cheek

circuit returns 1 iff

a

3k of

the bits

are T

AND

b for any edge ij

either xi

f

  • r

nj

F

Reduction

managed to cast

IS

as

an

instance of SAT

slide-7
SLIDE 7

RECAP — NP

5

Verifier

(polynomial time) witness w Idea behind Cook/Levin theorem: encode verifier as circuit, witness as variables

2

slide-8
SLIDE 8

REDUCTIONS BETWEEN PROBLEMS

6

➤ Intuitive idea: if problem A can be solved in polynomial time, so can

problem B

➤ Map instances of A —> instances of B while “preserving” answer

CTm

if

SAT has a poly

time algorithm

so doesindSet

A

idµy

I

i

iE

slide-9
SLIDE 9

time

slide-10
SLIDE 10

REDUCTIONS BETWEEN PROBLEMS

7

Garay Johnson

p

Sauppose

SAT

reduces to P

slide-11
SLIDE 11

COOK/LEVIN THEOREM AN EXAMPLE OF REDUCTION

8

Theory

Any problem in NP has

an efficient

reduction to SAT

Is

provingthat SAT reducesto P

the onlyway of showing

P is

hard

Factoring

2 ProblemP

slide-12
SLIDE 12

NP, NP-HARD AND NP-COMPLETE

9

Indset

SAT

Lp

CookLevin

then

IIP

Set of all problems that have

a poly lime

reduction to

SAT

problemQE NP

Q SpsAT

NP

hard

problem 9 is NP hard if SAT EpQ

NP compete

problem 9

is NP complete if Q CNPand

Qu

NP hard

ie

Q E PSAT

SAT Ep Q

h rd

alls

slide-13
SLIDE 13

pep hard

2

Halting

problem graph

isomorphism

E

na

Chess

  • Ht

matching

slide-14
SLIDE 14

NP, NP-HARD AND NP-COMPLETE

10

slide-15
SLIDE 15

GOAL

11

➤ See how to prove that a problem is NP complete — will use only a

couple of examples

➤ What about approximation?

slide-16
SLIDE 16

3-SAT

12

➤ 3-SAT: special case of circuit satisfiability.

IndsetEp'sAT Goat find some problems sat

SAT Ep

problem

Problem

x

xn

boolean variables

Clauses

C

i

Cm

LORT

ft't

OR

I C

Xi

V Xia V Ti

either var or

t

neglvar

Formula of

C A C A

Acm

AND

CHE

fol

slide-17
SLIDE 17

fol

TEH

ti

ERI

ERI

ORD

I l

l

1

X

Xz

X n

3

does there exist

an

assignmentofTIF

to

ni

s t

f

is True

theorem

SAT Ep

3 5

I

  • f SAT

I of 3 SAT

if I

is

a YES instance

so is

It

u

NO

I

n

ii

i

mum

7 g n

n

I h

g isTRUE

slide-18
SLIDE 18

3-SAT IS NP COMPLETE

13

n

g

Rule

i

2

can be written

as

E

hCzh

ft

AZ

nZg E

Z

II

Eg

V

Jeff Erickson's notes

slide-19
SLIDE 19

INDEPENDENT SET

14

slide-20
SLIDE 20

INDEPENDENT SET

15

slide-21
SLIDE 21

APPROXIMATION

16

➤ Fundamental question: do NP-complete problems have good

approximation algorithms? (saw many examples)

➤ Are there limits to approximation?

slide-22
SLIDE 22

PCP THEOREM

17

➤ “Gap inducing reductions” ➤ SAT —> GAP-3-SAT

slide-23
SLIDE 23

GAP PRESERVING REDUCTIONS

18

➤ 3-SAT —> Independent set

slide-24
SLIDE 24

GAP AMPLIFICATION

19