CSE 421 Algorithms Richard Anderson Lecture 29 Complexity Theory NP-Complete P.

Slides:



Advertisements
Similar presentations
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
Advertisements

1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
02/01/11CMPUT 671 Lecture 11 CMPUT 671 Hard Problems Winter 2002 Joseph Culberson Home Page.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
1 NP-Completeness Objectives: At the end of the lesson, students should be able to: 1. Differentiate between class P, NP, and NPC 2. Reduce a known NPC.
Transitivity of  poly Theorem: Let ,  ’, and  ’’ be three decision problems such that   poly  ’ and  ’  poly  ’’. Then  poly  ’’. Proof:
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
The Theory of NP-Completeness
Time Complexity.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
1 The Theory of NP-Completeness 2 NP P NPC NP: Non-deterministic Polynomial P: Polynomial NPC: Non-deterministic Polynomial Complete P=NP? X = P.
Complexity Classes Kang Yu 1. NP NP : nondeterministic polynomial time NP-complete : 1.In NP (can be verified in polynomial time) 2.Every problem in NP.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
MCS312: NP-completeness and Approximation Algorithms
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
CSEP 521 Applied Algorithms Richard Anderson Lecture 10 NP Completeness.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
COMPSCI 102 Introduction to Discrete Mathematics.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Unit 9: Coping with NP-Completeness
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Lecture 12 P and NP Introduction to intractability Class P and NP Class NPC (NP-complete)
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NPC.
Optimization/Decision Problems Optimization Problems – An optimization problem is one which asks, “What is the optimal solution to problem X?” – Examples:
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
CSE 421 Algorithms Richard Anderson Lecture 28 Survey of NP Complete Problems NP-Complete P.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
Chapter 10 NP-Complete Problems.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Lecture 2-2 NP Class.
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
Richard Anderson Lecture 26 NP-Completeness
Lecture 5 NP Class.
Great Ideas in Computing Complexity Theory
Intro to Theory of Computation
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 28 Coping with NP-Completeness
Richard Anderson Lecture 29 NP-Completeness
Richard Anderson Lecture 29 Complexity Theory
Richard Anderson Lecture 30 NP-Completeness
Chapter 11 Limitations of Algorithm Power
Richard Anderson Lecture 27 NP Completeness
Richard Anderson Lecture 26 NP-Completeness
The Theory of NP-Completeness
Richard Anderson Lecture 27 Survey of NP Complete Problems
Richard Anderson Lecture 25 NP Completeness
Presentation transcript:

CSE 421 Algorithms Richard Anderson Lecture 29 Complexity Theory NP-Complete P

Announcements Final exam, –Monday, December 14, 2:30-4:20 pm –Comprehensive (2/3 post midterm, 1/3 pre midterm) Review session –Friday, 3:30 – 5:00 pm. More 220 Online course evaluations available

NP Complete Problems 1.Circuit Satisfiability 2.Formula Satisfiability a.3-SAT 3.Graph Problems a.Independent Set b.Vertex Cover c.Clique 4.Path Problems a.Hamiltonian cycle b.Hamiltonian path 5.Partition Problems a.Three dimensional matching b.Exact cover 6.Graph Coloring 7.Number problems a.Subset sum 8.Integer linear programming 9.Scheduling with release times and deadlines

Karp’s 21 NP Complete Problems

A final NP completeness result: Graph Coloring NP-Complete –Graph K-coloring –Graph 3-coloring Polynomial –Graph 2-Coloring

Z 3-SAT < P 3 Colorability Y TF B XY Z X Truth Setting Gadget Clause Testing Gadget XT Z F Y

What we don’t know P vs. NP NP-Complete P P = NP

If P != NP, is there anything in between Yes, Ladner [1975] Problems not known to be in P or NP Complete –Factorization –Discrete Log –Graph Isomorphism Solve g k = b over a finite group

Coping with NP Completeness Approximation Algorithms –Christofides algorithm for TSP (Undirected graphs satisfying triangle inequality) Solution guarantees on greedy algorithms –Bin packing

Coping with NP-Completeness Branch and Bound –Euclidean TSP

Coping with NP-Completeness Local Search –Modify solution until a local minimum is reached Interchange algorithm for TSP Recoloring algorithms –Simulated annealing

Complexity Theory Computational requirements to recognize languages Models of Computation Resources Hierarchies Regular Languages Context Free Languages Decidable Languages All Languages

Time complexity P: (Deterministic) Polynomial Time NP: Non-deterministic Polynomial Time EXP: Exponential Time

Space Complexity Amount of Space (Exclusive of Input) L: Logspace, problems that can be solved in O(log n) space for input of size n PSPACE, problems that can be required in a polynomial amount of space

So what is beyond NP?

NP vs. Co-NP Given a Boolean formula, is it true for some choice of inputs Given a Boolean formula, is it true for all choices of inputs

Problems beyond NP Exact TSP, Given a graph with edge lengths and an integer K, does the minimum tour have length K Minimum circuit, Given a circuit C, is it true that there is no smaller circuit that computes the same function a C

Polynomial Hierarchy Level 1 –  X 1  (X 1 ),  X 1  (X 1 ) Level 2 –  X 1  X 2  (X 1,X 2 ),  X 1  X 2  (X 1,X 2 ) Level 3 –  X 1  X 2  X 3  (X 1,X 2,X 3 ),  X 1  X 2  X 3  (X 1,X 2,X 3 )

Polynomial Space Quantified Boolean Expressions –  X 1  X 2  X 3...  X n-1  X n  (X 1,X 2,X 3 …X n-1 X n ) Space bounded games –Competitive Facility Location Problem Counting problems –The number of Hamiltonian Circuits in a graph