lot s of np complete problems
play

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


  1. Lot’s 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 1979. The big 7 The Big Daddy • Basic core of known NP-complete • SATISFIABILITY problems. – INSTANCE – Basis for beginner in chosing a problem for • A set of U boolean variables and a collection C of boolean clauses over U reduction – PROBLEM • Is there a satisfying truth assignment for C? – From Garey and Johnson. – The one that started it all! The other 6 The other 6 • 3-SATISFIABILITY (3-SAT) • 3-DIMENSIONAL MATCHING (3DM) – INSTANCE: – INSTANCE: • A set M ⊆ (W x X x Y) where W, X, Y are disjoint • Collection C = {c 1 ,c 2 , …, c m } of boolean clauses on a finite set of boolean variables U such that each c i sets having the same number of elements contains exactly 3 variables. – PROBLEM – PROBLEM: • Does M contain a matching • Is there a truth assignment for U that satisfies all – A subset M’ ⊆ M such that M’ has the same size as M and clauses of C no 2 elements in M’ agree in any coordinate. 1

  2. The other 6 The other 6 • VERTEX COVER • CLIQUE – INSTANCE: – INSTANCE: • A Graph G = (V,E) and integer k ≤ |V| • A Graph G = (V,E) and integer k ≤ |V| – PROBLEM: – PROBLEM: • Is there a vertex cover of size k or less on G • Does G contain a clique of size k or more. – Subset of vertices V’ such that for each edge {u,v}, at – A subset of vertices, V’ such that every 2 vertices in V’ least one of u and v belongs to V’ are joined by an edge The other 6 The other 6 • HAMILTONIAN CIRCUIT (HC) • PARTITION – INSTANCE: – INSTANCE: • A finite set A and a “size function” s(a) a ∈ A • A Graph G = (V,E) – PROBLEM: – PROBLEM: • Is there a subset A’ ⊆ A such that • Does G contain a hamiltonian circuit ∑ ∑ – An ordering of all vertices <v 1 ,v 2 , …, v n > such that {v i , v j } = ( ) ( ) s a s a is an edge and {v n , v 1 } is an edge. ∈ ∈ − ' ' a A a A A The big 7 Problem Categories • Graph Theory SAT • Network Design • Sets and Partitions, 3-SAT • Storage and Retrieval – Database Related Problems, Data Storage, Sparse 3DM VC Matrix Compression • Sequence and Scheduling HC PARTITION CLIQUE – Multiprocessor Scheduling • Mathematical Programming – Linear Programming 2

  3. Favorite NP-Complete Problems Problem Categories • Algebra and Number Theory • Traveling Salesman • Games and Puzzles – INSTANCE • Logic • A finite set of “cities” C = { c 1 , c 2 , …, c n } • A distance function d: C 2 → N – SAT, 3SAT – d( c i , c j ) = distance between c i and c j • Automata and Languages • Upper bounds B • Program Optimization – PROBLEM – Program Equivalences • Is there a “tour” of all cities such that the distance • Other traveled will be less than B? Some NP-Complete Problems Some NP-Complete Problems • NDFA inequivalence • Traveling Salesman – INSTANCE – PROBLEM • Two nondeterministic finite automata A 1 and A 2 • Said another way, is there an ordering of the cities having the same input language Σ . <c i1 , c i2 , …, c in > such that – PROBLEM − • Do A 1 and A 2 recognize different languages? 1 n ∑ + ≤ ( , ) ( , ) d c c d c c B – NOTE + 1 1 ii ii in i • Can be done in polynomial time if A 1 and A 2 are = i 1 deterministic. Some NP-Complete Problems Some NP-Complete Problems • Inequivalence of Programs with • Inequivalence of Programs with Assignments Assignments – INSTANCE – PROBLEM • Finite set of X variables • Is there an initial assignment of a value from V for each variable such that the two programs will yield • Two programs P 1 and P 2 different final results? – Each a sequence of the form x 0 = (x1 == x 2 ) ?x 3 : x 4 • A value set V which defines possible values for each variable. 3

  4. Some NP-Complete Problems Some NP-Complete Problems • Crossword Puzzle Construction • You want more? – INSTANCE • A finite set W ⊆ Σ * of words – “Computers and Intractability” by Michael R. • An n by n matrix A consisting of 1’s and 0’s Garey and David S. Johnson. – PROBLEM • Can an n by n crossword puzzle be built up including all words from W and blank squares – Questions? consisting of the “0” cells in A? Summary of Complexity Classes Summary of Complexity Classes • P – set of decision problems solvable by deterministic algorithms in polynomial time • NP NP – Set of decision problems solvable by non- deterministic algorithms in polynomial time. P • Certainly P is a subset of NP Summary of Complexity Classes NP-Complete and P • NP-Hard • The (sad) world of NP – Problems L such that any problem in NP reduces to L • NP-Complete NP-complete – Problems both in NP and NP-Hard NP – SAT P • Note that SAT is in P iff P = NP • No one has proven: – SAT is in P Is there something in After 40 years of research…nobody – SAT cannot be in P here? knows 4

  5. Quick road to Theory Fame Other classes • Find a deterministic polynomial algorithm • Co-NP for ANY problem in NP-complete… – Complement of NP – And you’ve found one for all • P/NP SPACE – In fact, it will show that P = NP. – based on amount of space (tape) used by TM • Classes based on Randomization – Allows TM to make random choices • They’ll be naming buildings after you before you are dead! • See Chapter 11 for details or take Algorithms! Where to next? The Theory Hall of Fame • Stephen Cole Kleene • Language Design / Compiler Construction – Regular expressions & FAs – 4003-580 Language Processors • Noam Chomsky – 4003-560 Compiler Construction Lab (if – The grammar guy offered again) • W. Ogden • Complexity & Computation – Pumping Lemma for CFLs • Kurt Godel – 4003-481 Complexity and Computability – Kicked off study of computability – 4003-515 Analysis of Algorithms • Alan Turing – Turing Machines The Theory Hall of Fame The Theory Hall of Fame • Alonzo Church • YOU – Unlimited support for TMs – If you find a polynomial solution to any • Emil Post problem in NP-complete! – 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 5

  6. So There You Have It! Next Time • Final exam review • I bet you thought I forgot! • Thursday, Nov 18 th : Final exam – What is a language? – 70-3435 – What is a class of languages? – 8:00am – 10:00am – Closed book – 1 page study guide okay. • Thanks for playing. • Now time for Course Evaluations 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend