CSCI 2670 Introduction to Theory of Computing November 29, 2005.

Slides:



Advertisements
Similar presentations
Complexity Classes: P and NP
Advertisements

1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
Department of Computer Science & Engineering
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
Lecture 21 NP-complete problems
Great Theoretical Ideas in Computer Science for Some.
CSE373: Data Structures & Algorithms Lecture 24: The P vs. NP question, NP-Completeness Nicki Dell Spring 2014 CSE 373 Algorithms and Data Structures 1.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Discrete Structures & Algorithms The P vs. NP Question EECE 320.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Mount Holyoke College 2 The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )
NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Fall The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
The Theory of NP-Completeness
Submitted by : Estrella Eisenberg Yair Kaufman Ohad Lipsky Riva Gonen Shalom.
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
CS 310 – Fall 2006 Pacific University CS310 P vs NP the steel cage death match Section 7.2 November 29, 2006.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Complements of Languages in NP Osama Awwad Department of Computer Science Western Michigan University July 13, 2015.
Complexity Theory: The P vs NP question Lecture 28 (Dec 4, 2007)
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
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.
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
1 1. Draw the machine schema for a TM which when started with input 001 halts with abbb on the tape in our standard input format. 2. Suppose you have an.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
CSCI 2670 Introduction to Theory of Computing November 23, 2004.
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.
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
COMPSCI 102 Introduction to Discrete Mathematics.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
COMPSCI 102 Introduction to Discrete Mathematics.
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NP-Complete problems.
P Vs NP Turing Machine. Definitions - Turing Machine Turing Machine M has a tape of squares Each Square is capable of storing a symbol from set Γ (including.
CSCI 2670 Introduction to Theory of Computing November 17, 2005.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 7 Time Complexity Some slides are in courtesy.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
Computational Complexity Shirley Moore CS4390/5390 Fall 2013 August 27, 2013.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
April 13 th Class Notes Hw# 5 will be worth 50 points and it will be posted tonight or tomorrow.
Complexity ©D.Moshkovitz 1 Our First NP-Complete Problem The Cook-Levin theorem A B C.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
NP-Completeness A problem is NP-complete if: It is in NP
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
CSC 4170 Theory of Computation The class NP Section 7.3.
CS154, Lecture 13: P vs NP.
Our First NP-Complete Problem
Instructor: Aaron Roth
Presentation transcript:

CSCI 2670 Introduction to Theory of Computing November 29, 2005

Agenda Today –More on the class NP

November 29, 2005 Announcement

November 29, 2005 The class NP Definition: A verifier for a language A is an algorithm V, where A={w|V accepts for some string c} The string c is called a certificate of membership in A. Definition: NP is the class of languages that have polynomial-time verifiers.

November 29, 2005 Who wants $1,000,000? In May, 2000, the Clay Mathematics Institute named seven open problems in mathematics the Millennium Problems –Anyone who solves any of these problems will receive $1,000,000 –Proving whether or not P equals NP is one of these problems

November 29, 2005 What we know NP PcoNP

November 29, 2005 What we don’t know NP PcoNP Are there any problems here?

November 29, 2005 Solving NP problems The best-known methods for solving problems in NP that are not known to be in P take exponential time –Brute force search

November 29, 2005 NP-completeness A problem C is NP-complete if finding a polynomial-time solution for C would imply P=NP Definition: A language B is NP-complete if it satisfies two conditions: 1.B is in NP, and 2.Every A in NP is polynomial time reducible to B

November 29, 2005 An NP-complete problem A formula is Boolean if each of its variables can be assigned the values TRUE (1) or FALSE (0) A Boolean formula is satisfiable if there is some assignment of values that results in the formula evaluating to TRUE SAT: Is a given Boolean formula satisfiable? SAT is NP-complete –We will go over the proof next week

November 29, 2005 Examples (x  y)  (  x  y) –Satisfiable – e.g., x = y = 1 ((x  y)  (  x  z))  ((  x  y)  (  y  z)) –Satisfiable – e.g., x = 0, y = z = 1 ((x  y)  (  x  z))  ((x  y)  (  y  z)) –Unsatisfiable

November 29, 2005 Proving a problem is NP-complete A problem C is NP-complete if finding a polynomial-time solution for C would imply P=NP If a polynomial-time solution is found for C, then that solution can be used to find a polynomial-time solution for any other problem in NP –What does this remind you of? –Reductions!

November 29, 2005 Reductions and NP-completeness If we can prove an NP-complete problem C can be polynomially reduced to a problem A, then we’ve shown A is NP-complete –A polynomial-time solution to A would provide a polynomial-time solution to C, which would imply P=NP

November 29, 2005 Polynomial functions Definition: A function f:Σ *  Σ * is a polynomial time computable function if some polynomial time Turing machine M exists that halts with just f(w) on its tape, when started on any input w.

November 29, 2005 Polynomial reductions Definition: Language A is polynomial- time reducible to language B, written A ≤ P B, if a polynomial time computable function f:Σ *  Σ * exists, where for every w w  A iff f(w)  B f f

November 29, 2005 Reductions & NP-completeness Theorem: If A ≤ P B and B  P, then A  P. Proof: Let M be the polynomial time algorithm that decides B and let f be the polynomial reduction from A to B. Consider the TM N N = “On input w 1.Compute f(w) 2.Run M on f(w) and output M’s result” Then N decides A in polynomial time.

November 29, 2005 Implications of NP-completeness Theorem: If B is NP-complete and B  P, then P = NP. Theorem: If B is NP-complete and B≤ P C for some C in NP, then C is NP- complete

November 29, 2005 Showing a problem in NP-complete Two steps to proving a problem L is NP-complete –Show the problem is in NP Demonstrate there is a polynomial time verifier for the problem –Show some NP-complete problem can be polynomially reduced to L

November 29, 2005 NP-completeness proof LPATH = { | G is a graph with nodes a and b and a simple path of length k from a to b} –A simple path has no repeated nodes We will use the fact that the following language is NP-complete –UHAMPATH = { | G is a graph with a Hamiltonian path from a to b} A Hamiltonian path visits each node exactly once

November 29, 2005 LPATH is NP-complete First show LPATH is in NP –Can we verify a solution to LPATH in polynomial time? Yes Check the certificate is a simple length-k path from a to b

November 29, 2005 Reduction from UHAMPATH R = “On input, where G = is a graph with nodes a and b 1.If |V| ≤ 1 reject 2.Check if is in LPATH”

November 29, 2005 Two questions Need to demonstrate that is in UHAMPATH iff is in LPATH –This is clear from the definitions of UHAMPATH and LPATH Need to demonstrate that the reduction is in polynomial time –The reduction takes O(|V|) time (to evaluate |V|

November 29, 2005 Insight We know (because I said so) that UHAMPATH is NP-complete –Therefore, a polynomial time solution to UHAMPATH would imply P = NP We showed that we can convert UHAMPATH to LPATH in polynomial time –Therefore, a polynomial solution to LPATH would provide a polynomial solution to UHAMPATH LPATH must be NP-complete

November 29, 2005 Summary To show a language L is NP-complete 1.Demonstrate L is in NP 2.Find a language C that is known to be NP-complete 3.Create a function f from C to L 4.Demonstrate that if x is in C then f(x) is in L 5.Demonstrate that if f(x) is in L then x is in C 6.Demonstrate f is computable in polynomial time