Richard Anderson Lecture 28 NP Completeness

Slides:



Advertisements
Similar presentations
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Advertisements

CSCI 256 Data Structures and Algorithm Analysis Lecture 22 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Hardness Results for Problems
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 27.
Lecture 22 More NPC problems
CSEP 521 Applied Algorithms Richard Anderson Lecture 10 NP Completeness.
1 3-COLOURING: Input: Graph G Question: Does there exist a way to 3-colour the vertices of G so that adjacent vertices are different colours? 1.What could.
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
28.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
NPC.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
More NP-Complete and NP-hard Problems
More NP-complete problems
P & NP.
Chapter 10 NP-Complete Problems.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Polynomial-Time Reduction
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness (36.4-5) P: yes and no in pt NP: yes in pt NPH  NPC
Richard Anderson Lecture 25 Min Cut Applications and NP-Completeness
NP-Completeness Yin Tat Lee
CS21 Decidability and Tractability
Intro to Theory of Computation
Intro to Theory of Computation
CS154, Lecture 16: More NP-Complete Problems; PCPs
ICS 353: Design and Analysis of Algorithms
More NP-complete Problems
Richard Anderson Lecture 25 NP-Completeness
NP-Completeness Proofs
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 28 Coping with NP-Completeness
Richard Anderson Lecture 29 NP-Completeness
Chapter 34: NP-Completeness
Chapter 8 NP and Computational Intractability
1. for (i=0; i < n; i+=2) if (A[i] > A[i+1]) swap(A[i], A[i+1])
Richard Anderson Lecture 30 NP-Completeness
Richard Anderson Lecture 27 NP Completeness
CS 3343: Analysis of Algorithms
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
CS21 Decidability and Tractability
CSE 6408 Advanced Algorithms.
NP-Completeness Yin Tat Lee
Prove this problem is in NP
CS154, Lecture 16: More NP-Complete Problems; PCPs
Richard Anderson Lecture 27 Survey of NP Complete Problems
Richard Anderson Lecture 25 NP Completeness
Instructor: Aaron Roth
Lecture 23 NP-Hard Problems
Presentation transcript:

Richard Anderson Lecture 28 NP Completeness CSE 421 Algorithms Richard Anderson Lecture 28 NP Completeness

Announcements Final Exam HW 10, due Friday, 1:30 pm This weeks topic Monday, December 12, 2:30-4:20 pm, EE1 003 Closed book, closed notes Practice final and answer key available HW 10, due Friday, 1:30 pm This weeks topic NP-completeness Reading: 8.1-8.8: Skim the chapter, and pay more attention to particular points emphasized in class

Algorithms vs. Lower bounds Algorithmic Theory What we can compute I can solve problem X with resources R Proofs are almost always to give an algorithm that meets the resource bounds

Lower bounds How do you show that something can’t be done? Establish evidence that a whole bunch of smart people can’t do something! Lower bounds How do you show that something can’t be done?

Theory of NP Completeness Most significant mathematical theory associated with computing

The Universe NP-Complete NP P

Polynomial Time P: Class of problems that can be solved in polynomial time Corresponds with problems that can be solved efficiently in practice Right class to work with “theoretically”

Polynomial time reductions Y Polynomial Time Reducible to X Solve problem Y with a polynomial number of computation steps and a polynomial number of calls to a black box that solves X Notations: Y <P X

Lemma Suppose Y <P X. If X can be solved in polynomial time, then Y can be solved in polynomial time.

Lemma Suppose Y <P X. If Y cannot be solved in polynomial time, then X cannot be solved in polynomial time.

Sample Problems Independent Set Graph G = (V, E), a subset S of the vertices is independent if there are no edges between vertices in S 1 2 3 5 4 6 7

Vertex Cover Vertex Cover Graph G = (V, E), a subset S of the vertices is a vertex cover if every edge in E has at least one endpoint in S 1 2 3 5 4 6 7

Decision Problems Theory developed in terms of yes/no problems Independent set Given a graph G and an integer K, does G have an independent set of size at least K Vertex cover Given a graph G and an integer K, does the graph have a vertex cover of size at most K.

IS <P VC Lemma: A set S is independent iff V-S is a vertex cover To reduce IS to VC, we show that we can determine if a graph has an independent set of size K by testing for a Vertex cover of size n - K

Satisfiability Given a boolean formula, does there exist a truth assignment to the variables to make the expression true

Definitions Boolean variable: x1, …, xn Term: xi or its negation !xi Clause: disjunction of terms t1 or t2 or … tj Problem: Given a collection of clauses C1, . . ., Ck, does there exist a truth assignment that makes all the clauses true (x1 or !x2), (!x1 or !x3), (x2 or !x3)

3-SAT Each clause has exactly 3 terms Variables x1, . . ., xn Clauses C1, . . ., Ck Cj = (tj1 or tj2 or tj3) Fact: Every instance of SAT can be converted in polynomial time to an equivalent instance of 3-SAT

Theorem: 3-SAT <P IS Build a graph that represents the 3-SAT instance Vertices yi, zi with edges (yi, zi) Truth setting Vertices uj1, uj2, and uj3 with edges (uj1, uj2), (uj2,uj3), (uj3, uj1) Truth testing Connections between truth setting and truth testing: If tjl = xi, then put in an edge (ujl, zi) If tjl = !xi, then put in an edge (ujl, yi)

Example C1 = x1 or x2 or !x3 C2 = x1 or !x2 or x3 C3 = !x1 or x2 or x3

Thm: 3-SAT instance is satisfiable iff there is an IS of size n + k