Umans Complexity Theory Lectures Lecture 2a: Reductions & Completeness.

Slides:



Advertisements
Similar presentations
Complexity Classes: P and NP
Advertisements

INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
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.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Great Theoretical Ideas in Computer Science for Some.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
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 )
CS21 Decidability and Tractability
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
CS151 Complexity Theory Lecture 1 March 30, 2015.
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
CS151 Complexity Theory Lecture 1 March 30, 2004.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Chapter 11: Limitations of Algorithmic Power
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
Clique Cover Cook’s Theorem 3SAT and Independent Set
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
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.
1. 2 Lecture outline Basic definitions: Basic definitions: P, NP complexity classes P, NP complexity classes the notion of a certificate. the notion of.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
Computability & Complexity II Chris Umans Caltech.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Umans Complexity Theory Lectures Lecture 1c: Robust Time & Space Classes.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
Fall 2013 CMU CS Computational Complexity Lecture 2 Diagonalization, 9/12/2013.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
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.
Umans Complexity Theory Lectures Lecture 1b: Turing Machines & Halting Problem.
1 1. Which of these sequences correspond to Hamilton cycles in the graph? (a) (b) (c) (d) (e)
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
 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 Yin Tat Lee
CS21 Decidability and Tractability
Intro to Theory of Computation
CS151 Complexity Theory Lecture 2 April 5, 2017.
Lecture 24 NP-Complete Problems
Computability & Complexity I
NP-completeness The Chinese University of Hong Kong Fall 2008
CS21 Decidability and Tractability
CS21 Decidability and Tractability
NP-Completeness Yin Tat Lee
NP-Completeness Lecture for CS 302.
Umans Complexity Theory Lectures
CSE 589 Applied Algorithms Spring 1999
CS151 Complexity Theory Lecture 1 April 2, 2019.
Lecture 23 NP-Hard Problems
Presentation transcript:

Umans Complexity Theory Lectures Lecture 2a: Reductions & Completeness

2 Complexity Classes Back to complexity classes: –TIME(T(n)) = languages decidable by a multi- tape TM in at most T(n) steps, where n is the input length, and T :N → N –SPACE(S(n)) = languages decidable by a multi-tape TM that touches at most S(n) squares of its work tapes, where n is the input length, and S :N → N Note: P =  k >= 1 TIME(n k )

3 Interlude In an ideal world, given language L –state an algorithm deciding L –prove that no algorithm does better we are pretty good at part 1 we are currently completely helpless when it comes to part 2, for most problems that we care about

4 Interlude in place of part 2 we can –relate the difficulty of problems to each other via reductions –prove that a problem is a “hardest” problem in a complexity class via completeness powerful, successful surrogate for lower bounds

5 Reductions reductions are the main tool for relating problems to each other given two languages L 1 and L 2 we say “L 1 reduces to L 2 ” and we write “L 1 ≤ L 2 ” to mean: –there exists an efficient (for now, poly-time) algorithm that computes a function f s.t. x  L 1 implies f(x)  L 2 x  L 1 implies f(x)  L 2

6 Reductions positive use: given new problem L 1 reduce it to L 2 that we know to be in P. Conclude L 1 in P (how?) –e.g. bipartite matching ≤ max flow –formalizes “L 1 as easy as L 2 ” yes no yes no L1L1 L2L2 f f

7 Reductions negative use: given new problem L 2 reduce L 1 (that we believe not to be in P) to it. Conclude L 2 not in P if L 1 not in P (how?) –e.g. satisfiability ≤ graph 3-coloring –formalizes “L 2 as hard as L 1 ” yes no yes no L1L1 L2L2 f f

8 Reductions Example reduction: –3SAT = { φ : φ is a 3-CNF Boolean formula that has a satisfying assignment } (3-CNF = AND of OR of ≤ 3 literals) –IS = { (G, k) | G is a graph with an independent set V’ → V of size ≥ k } (ind. set = set of vertices no two of which are connected by an edge)

9 Ind. Set is NP-complete The reduction f: given φ = (x  y   z)  (  x  w  z)  …  (…) we produce graph G φ : x y zz  x x wz one triangle for each of m clauses edge between every pair of contradictory literals set k = m …

10 Reductions φ = (x  y   z)  (  x  w  z)  …  (…) Claim: φ has a satisfying assignment if and only if G has an independent set of size at least k –proof? Conclude that 3SAT ≤ IS. x y zz  x x wz …

11 Completeness complexity class C language L is C-complete if –L is in C –every language in C reduces to L very important concept formalizes “L is hardest problem in complexity class C”

12 Completeness Completeness allows us to reason about the entire class by thinking about a single concrete problem related concept: language L is C-hard if –every language in C reduces to L

13 Completeness May ask: how to show every language in C reduces to L? –in practice, shown by reducing known C- complete problem to L –often not hard to find “1 st ” C-complete language, but it might not be “natural”

14 Completeness –Example: NP = the set of languages L where L = { x : ∃ y, |y|  |x| k, (x, y)  R } and R is a language in P. one NP-complete language “bounded halting”: BH = { (M, x, 1 m ) : ∃ y, |y|  |x| k s.t. M accepts (x, y) in at most m steps } –challenge is to find natural complete problem –[Cook 71] : SAT NP-complete

15 Summary problems –function, decision –language = set of strings complexity class = set of languages efficient computation identified with efficient computation on Turing Machine –single-tape, multi-tape –diagonalization technique: HALT undecidable TIME and SPACE classes reductions C-completeness, C-hardness