Theory of Computing Lecture 16 MAS 714 Hartmut Klauck.

Slides:



Advertisements
Similar presentations
Time Complexity P vs NP.
Advertisements

Lecture 24 MAS 714 Hartmut Klauck
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
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.
The Theory of NP-Completeness
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.
CSE373: Data Structures & Algorithms Lecture 24: The P vs. NP question, NP-Completeness Nicki Dell Spring 2014 CSE 373 Algorithms and Data Structures 1.
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)
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Complexity Theory CSE 331 Section 2 James Daly. Reminders Project 4 is out Due Friday Dynamic programming project Homework 6 is out Due next week (on.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
Analysis of Algorithms CS 477/677
Computational Complexity, Physical Mapping III + Perl CIS 667 March 4, 2004.
Time Complexity.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Chapter 11: Limitations of Algorithmic Power
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
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.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
Approximation Algorithms Pages ADVANCED TOPICS IN COMPLEXITY THEORY.
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.
Complexity Non-determinism. NP complete problems. Does P=NP? Origami. Homework: continue on postings.
CSE 3813 Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
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.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
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
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Limits to Computation How do you analyze a new algorithm? –Put it in the form of existing algorithms that you know the analysis. –For example, given 2.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 7 Time complexity Contents Measuring Complexity Big-O and small-o notation.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 7 Time Complexity Some slides are in courtesy.
CS 461 – Nov. 18 Section 7.1 Overview of complexity issues –“Can quickly decide” vs. “Can quickly verify” Measuring complexity Dividing decidable languages.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
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.
The NP class. NP-completeness
P & NP.
Intro to Theory of Computation
CSCI 2670 Introduction to Theory of Computing
CLASSES P AND NP.
Chapter 11 Limitations of Algorithm Power
CSC 4170 Theory of Computation The class NP Section 7.3.
Prabhas Chongstitvatana
CS154, Lecture 13: P vs NP.
NP-completeness The Chinese University of Hong Kong Fall 2008
Time Complexity Classes
Umans Complexity Theory Lectures
Instructor: Aaron Roth
Theory of Computability
Presentation transcript:

Theory of Computing Lecture 16 MAS 714 Hartmut Klauck

Problems that are not in P EXP: class of all L that can be decided by Turing machines that run in time at most exp(p(n)) for some polynomial p We will show later that EXP is not equal to P – i.e., there are problems that can be solved in exponential time, but not in polynomial time – These problems tend to be less interesting

Problems that are not in P? Definition: – Given an undirected graph, a clique is a set of vertices S µ V, such that all u,v 2 S are connected – The language MaxClique is the set of all G,k, such that G has a clique of size k (or more) Simple Algorithm: enumerate all subsets of size k, test if they form a clique Time O(n k ¢ poly(k)) Since k is not constant this is not a polynomial time algorithm

Clique MaxClique is in P if and only if thousands of other interesting problems are We don’t know an efficient algorithm for any of them Widely believed: there is no such algorithm

Fun Piece of Information A random graph is a graph generated by putting each possible edge into G with probability ½ The largest clique in G has size d r(n) e or b r(n) c for an explicit r(n) that is around (2+o(1)) log(n) With probability approaching 1 Hence on random graphs the max clique can be found in sub-exponential time

The class NP NP: nondeterministic polynomial time NP is the class of problems where a `solution’ or proof can be verified in polynomial time Example: Given a set S of k vertices in G we can check in time O(k 2 ) if S is a clique

NP Guess and check definition: A language L is in NP, if there is a language R 2 P such that for all x: [There is a poly(|x|) length string y s.t. x#y 2 R], x 2 L y is called proof or witness

Example Max Flow: – Given a flow we can check that the flow is maximal in linear time – But then we can find the max flow in polynomial time anyway Clique: – We can check a clique easily – Don’t know how to find a maximum clique fast

Example Non-Primality: – Given a natural number x, is it NOT a prime? – Any a,b such that ab=x prove that x is no prime as long as a,b are not 1 How can we find a,b? – It is not known how to factor numbers efficiently Note: Checking primality/non-primality is even known to be in P (but not easy to see this)

Original definition of NP Definition: A nondeterministic Turing machine is defined like a Turing machine, but the transition function can now map to several successors – I.e., ± (q,a) is a subset of Q £ ¡ £ {left,stay,right} Interpretation: on input x there are many computations of the machine – At each step the computation can branch out – The machine accepts if there is at least one accepting computation/branch – The machine `guesses’ a good computation

Nondeterministic TM The language L M accepted by a nondeterministic TM is the set of inputs x for which there is an accepting computation of M on x A language L µ ¡ * is accepted by a nondeterministic TM M if L M =L

Time The time used by an NTM M on x is the minimum number of steps M performs on x during any accepting computation on x – Time on inputs x not in L is not defined Time complexity of M: as before Nondeterministic time complexity of L upper bounded by g(n): as before

NP Definition: NP is the set of languages that are accepted by some nondeterministic Turing machine with polynomial time complexity Note: Both definitions [guess and check/NTM] are equivalent

Notes on NP Nondeterministic Turing machines are not a realistic model of computation They are interesting because NP contains many interesting problems Furthermore they formalize proof systems – NP is the set of languages L for which the statement x 2 L can be verified efficiently – I.e., there is a powerful prover P, while the verifier V is a polynomial time Turing machine. The prover provides a proof y – x 2 L iff there is a proof y such that x#y is accepted by V

P vs. NP P µ NP by definition Are there problems in NP that are not in P? 10 6 dollar reward from the Clay Math Institute Most researchers believe P  NP There is a large class of problems in NP that are believed to be hard – NP-complete problems

P, NP, EXP P is a subset of NP by definition NP is a subset of EXP: – Use guess and check definition – Enumerate all witnesses y and check – Time: There are exp(poly(n)) many witnesses. Checking each is time poly(n)

NP Completeness We will identify a class of problems that capture the hardness of NP P=NP if and only if one of these problems is in P – None are known to be in P These are the problems L in NP, such that every problem in NP can be solved by a deterministic polynomial time TM given a free subroutine that solves L

NP Completeness Informally, L reduces to S, if, given an `oracle’ that decides S for free, we can compute L in polynomial time (deterministically) NP-complete: L is in NP and all S in NP reduce to L (in polynomial time) – This means L is hardest in NP

Coping with hard problems Suppose we try to find an algorithm for a problem Maybe it is NP-complete? – Reduce some known NP-complete problem to it – Then we know it’s hopeless If so, we can try – approximation – heuristics Don’t have to waste our time searching for an algorithm that (probably) does not exist