Lots of NP Complete Problems When confronted with trying to show a - - PDF document

lot s of np complete problems
SMART_READER_LITE
LIVE PREVIEW

Lots of NP Complete Problems When confronted with trying to show a - - PDF document

Lots of NP Complete Problems When confronted with trying to show a problem is NP-Complete NP-Complete Problems There are lots to chose from which to perform a reduction. Garey and Johnson lists over 300 (and that was printed in


slide-1
SLIDE 1

1

NP-Complete Problems Lot’s of NP Complete Problems

  • When confronted with trying to show a

problem is NP-Complete

– There are lots to chose from which to perform a reduction. – Garey and Johnson lists over 300 (and that was printed in 1979.

The big 7

  • Basic core of known NP-complete

problems.

– Basis for beginner in chosing a problem for reduction – From Garey and Johnson.

The Big Daddy

  • SATISFIABILITY

– INSTANCE

  • A set of U boolean variables and a collection C of

boolean clauses over U

– PROBLEM

  • Is there a satisfying truth assignment for C?

– The one that started it all!

The other 6

  • 3-SATISFIABILITY (3-SAT)

– INSTANCE:

  • Collection C = {c1,c2, …, cm } of boolean clauses on

a finite set of boolean variables U such that each ci contains exactly 3 variables.

– PROBLEM:

  • Is there a truth assignment for U that satisfies all

clauses of C

The other 6

  • 3-DIMENSIONAL MATCHING (3DM)

– INSTANCE:

  • A set M ⊆ (W x X x Y) where W, X, Y are disjoint

sets having the same number of elements

– PROBLEM

  • Does M contain a matching

– A subset M’ ⊆ M such that M’ has the same size as M and no 2 elements in M’ agree in any coordinate.

slide-2
SLIDE 2

2

The other 6

  • VERTEX COVER

– INSTANCE:

  • A Graph G = (V,E) and integer k ≤ |V|

– PROBLEM:

  • Is there a vertex cover of size k or less on G

– Subset of vertices V’ such that for each edge {u,v}, at least one of u and v belongs to V’

The other 6

  • CLIQUE

– INSTANCE:

  • A Graph G = (V,E) and integer k ≤ |V|

– PROBLEM:

  • Does G contain a clique of size k or more.

– A subset of vertices, V’ such that every 2 vertices in V’ are joined by an edge

The other 6

  • HAMILTONIAN CIRCUIT (HC)

– INSTANCE:

  • A Graph G = (V,E)

– PROBLEM:

  • Does G contain a hamiltonian circuit

– An ordering of all vertices <v1,v2, …, vn> such that {vi, vj} is an edge and {vn, v1} is an edge.

The other 6

  • PARTITION

– INSTANCE:

  • A finite set A and a “size function” s(a) a ∈A

– PROBLEM:

  • Is there a subset A’ ⊆ A such that

∑ ∑

∈ − ∈

=

' '

) ( ) (

A a A A a

a s a s

The big 7

SAT 3-SAT 3DM VC PARTITION HC CLIQUE

Problem Categories

  • Graph Theory
  • Network Design
  • Sets and Partitions,
  • Storage and Retrieval

– Database Related Problems, Data Storage, Sparse Matrix Compression

  • Sequence and Scheduling

– Multiprocessor Scheduling

  • Mathematical Programming

– Linear Programming

slide-3
SLIDE 3

3

Problem Categories

  • Algebra and Number Theory
  • Games and Puzzles
  • Logic

– SAT, 3SAT

  • Automata and Languages
  • Program Optimization

– Program Equivalences

  • Other

Favorite NP-Complete Problems

  • Traveling Salesman

– INSTANCE

  • A finite set of “cities” C = { c1, c2, …, cn }
  • A distance function d: C2 →N

– d( ci, cj ) = distance between ci and cj

  • Upper bounds B

– PROBLEM

  • Is there a “tour” of all cities such that the distance

traveled will be less than B?

Some NP-Complete Problems

  • Traveling Salesman

– PROBLEM

  • Said another way, is there an ordering of the cities

<ci1, ci2, …, cin> such that

B c c d c c d

i in ii n i ii

≤ +

+ − =

) , ( ) , (

1 1 1 1

Some NP-Complete Problems

  • NDFA inequivalence

– INSTANCE

  • Two nondeterministic finite automata A1 and A2

having the same input language Σ.

– PROBLEM

  • Do A1 and A2 recognize different languages?

– NOTE

  • Can be done in polynomial time if A1 and A2 are

deterministic.

Some NP-Complete Problems

  • Inequivalence of Programs with

Assignments

– INSTANCE

  • Finite set of X variables
  • Two programs P1 and P2

– Each a sequence of the form x0 = (x1 == x2 ) ?x3 : x4

  • A value set V which defines possible values for each

variable.

Some NP-Complete Problems

  • Inequivalence of Programs with

Assignments

– PROBLEM

  • Is there an initial assignment of a value from V for

each variable such that the two programs will yield different final results?

slide-4
SLIDE 4

4

Some NP-Complete Problems

  • Crossword Puzzle Construction

– INSTANCE

  • A finite set W ⊆ Σ* of words
  • An n by n matrix A consisting of 1’s and 0’s

– PROBLEM

  • Can an n by n crossword puzzle be built up

including all words from W and blank squares consisting of the “0” cells in A?

Some NP-Complete Problems

  • You want more?

– “Computers and Intractability” by Michael R. Garey and David S. Johnson. – Questions?

Summary of Complexity Classes

  • P

– set of decision problems solvable by deterministic algorithms in polynomial time

  • NP

– Set of decision problems solvable by non- deterministic algorithms in polynomial time.

  • Certainly P is a subset of NP

Summary of Complexity Classes

P NP

Summary of Complexity Classes

  • NP-Hard

– Problems L such that any problem in NP reduces to L

  • NP-Complete

– Problems both in NP and NP-Hard – SAT

  • Note that SAT is in P iff P = NP
  • No one has proven:

– SAT is in P – SAT cannot be in P

NP-Complete and P

  • The (sad) world of NP

P NP Is there something in here? After 40 years of research…nobody knows NP-complete

slide-5
SLIDE 5

5

Quick road to Theory Fame

  • Find a deterministic polynomial algorithm

for ANY problem in NP-complete…

– And you’ve found one for all – In fact, it will show that P = NP.

  • They’ll be naming buildings after you

before you are dead!

Other classes

  • Co-NP

– Complement of NP

  • P/NP SPACE

– based on amount of space (tape) used by TM

  • Classes based on Randomization

– Allows TM to make random choices

  • See Chapter 11 for details or take Algorithms!

Where to next?

  • Language Design / Compiler Construction

– 4003-580 Language Processors – 4003-560 Compiler Construction Lab (if

  • ffered again)
  • Complexity & Computation

– 4003-481 Complexity and Computability – 4003-515 Analysis of Algorithms

The Theory Hall of Fame

  • Stephen Cole Kleene

– Regular expressions & FAs

  • Noam Chomsky

– The grammar guy

  • W. Ogden

– Pumping Lemma for CFLs

  • Kurt Godel

– Kicked off study of computability

  • Alan Turing

– Turing Machines

The Theory Hall of Fame

  • Alonzo Church

– Unlimited support for TMs

  • Emil Post

– Post Correspondence Problem

  • H.G. Rice

– Decision problems for TMs

  • Stephen Cook

– NP-completeness

  • Aho, Hopcraft, and Ullman

– Bell Labs guys – work on programming language

The Theory Hall of Fame

  • YOU

– If you find a polynomial solution to any problem in NP-complete!

slide-6
SLIDE 6

6

So There You Have It!

  • I bet you thought I forgot!

– What is a language? – What is a class of languages?

  • Thanks for playing.

Next Time

  • Final exam review
  • Thursday, Nov 18th : Final exam

– 70-3435 – 8:00am – 10:00am – Closed book – 1 page study guide okay.

  • Now time for Course Evaluations