more np complete problems l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
More NP-complete Problems PowerPoint Presentation
Download Presentation
More NP-complete Problems

Loading in 2 Seconds...

play fullscreen
1 / 30

More NP-complete Problems - PowerPoint PPT Presentation


  • 165 Views
  • Uploaded on

More NP-complete Problems. Theorem:. (proven in previous class). If: Language is NP-complete Language is in NP is polynomial time reducible to. Then: is NP-complete. Using the previous theorem, we will prove that 2 problems are NP-complete:. Vertex-Cover.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'More NP-complete Problems' - maille


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
more np complete problems

More NP-complete Problems

Prof. Busch - LSU

slide2

Theorem:

(proven in previous class)

If: Language is NP-complete

Language is in NP

is polynomial time reducible to

Then: is NP-complete

Prof. Busch - LSU

slide3

Using the previous theorem,

we will prove that 2 problems

are NP-complete:

Vertex-Cover

Hamiltonian-Path

Prof. Busch - LSU

vertex cover
Vertex Cover

Vertex cover of a graph

is a subset of nodes such that every edge

in the graph touches one node in

Example:

S = red nodes

Prof. Busch - LSU

slide5

Size of vertex-cover

is the number of nodes in the cover

Example:

|S|=4

Prof. Busch - LSU

slide6

Corresponding language:

VERTEX-COVER = { :

graph contains a vertex cover

of size }

Example:

Prof. Busch - LSU

slide7

VERTEX-COVER is NP-complete

Theorem:

Proof:

1.VERTEX-COVER is in NP

Can be easily proven

2. We will reduce in polynomial time

3CNF-SAT to VERTEX-COVER

(NP-complete)

Prof. Busch - LSU

slide8

Let be a 3CNF formula

with variables

and clauses

Example:

Clause 2

Clause 3

Clause 1

Prof. Busch - LSU

slide9

Formula can be converted

to a graph such that:

is satisfied

if and only if

Contains a vertex cover

of size

Prof. Busch - LSU

slide10

Clause 2

Clause 3

Clause 1

Variable Gadgets

nodes

Clause Gadgets

nodes

Clause 2

Clause 3

Clause 1

Prof. Busch - LSU

slide11

Clause 2

Clause 3

Clause 1

Clause 2

Clause 3

Clause 1

Prof. Busch - LSU

slide12

First direction in proof:

If is satisfied,

then contains a vertex cover of size

Prof. Busch - LSU

slide13

Example:

Satisfying assignment

We will show that contains

a vertex cover of size

Prof. Busch - LSU

slide15

Select one satisfying literal in each clause gadget

and include the remaining literals in the cover

Prof. Busch - LSU

slide16

This is a vertex cover since every edge is

adjacent to a chosen node

Prof. Busch - LSU

slide17

Explanation for general case:

Edges in variable gadgets

are incident to at least one node in cover

Prof. Busch - LSU

slide18

Edges in clause gadgets

are incident to at least one node in cover,

since two nodes are chosen in a clause gadget

Prof. Busch - LSU

slide19

Every edge connecting variable gadgets

and clause gadgets is one of three types:

Type 1

Type 2

Type 3

All adjacent to nodes in cover

Prof. Busch - LSU

slide20

Second direction of proof:

If graph contains a vertex-cover

of size

then formula is satisfiable

Prof. Busch - LSU

slide21

Example:

Prof. Busch - LSU

slide22

To include “internal’’ edges to gadgets,

and satisfy

exactly one literal in each variable gadget is chosen

chosen out of

exactly two nodes in each clause gadget is chosen

chosen out of

Prof. Busch - LSU

slide23

For the variable assignment choose the

literals in the cover from variable gadgets

Prof. Busch - LSU

slide24

is satisfied with

since the respective literals satisfy the clauses

Prof. Busch - LSU

slide25

HAMILTONIAN-PATH

is NP-complete

Theorem:

Proof:

1.HAMILTONIAN-PATH is in NP

Can be easily proven

2. We will reduce in polynomial time

3CNF-SAT to HAMILTONIAN-PATH

(NP-complete)

Prof. Busch - LSU

slide26

Gadget for

variable

the directions

change

Prof. Busch - LSU

slide27

Gadget for

variable

Prof. Busch - LSU