April 13 th Class Notes Hw# 5 will be worth 50 points and it will be posted tonight or tomorrow.

Slides:



Advertisements
Similar presentations
P, NP, NP-Complete Problems
Advertisements

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.
NP and NP Complete. Definitions A problem is in the class P if there is a polynomial time solution to the problem A problem is in the class NP if there.
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.
More NP-completeness Sipser 7.5 (pages ). CS 311 Fall NP’s hardest problems Definition 7.34: A language B is NP-complete if 1.B ∈ NP 2.A≤
Theory of Computing Lecture 16 MAS 714 Hartmut Klauck.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
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 )
More NP-completeness Sipser 7.5 (pages ).
CS21 Decidability and Tractability
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
NP-Complete Problems Problems in Computer Science are classified into
NP-complete and NP-hard problems
CS 310 – Fall 2006 Pacific University CS310 P vs NP the steel cage death match Section 7.2 November 29, 2006.
Time Complexity.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
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.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
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.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
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.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 7 Time complexity Contents Measuring Complexity Big-O and small-o notation.
Fundamentals of Informatics Lecture 14 Intractability and NP-completeness Bas Luttik.
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.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
SUBSET-SUM Instance: A set of numbers denoted S and a target number t.
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
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
ICS 353: Design and Analysis of Algorithms
Intro to Theory of Computation
CSC 4170 Theory of Computation The class NP Section 7.3.
CS154, Lecture 13: P vs NP.
NP-completeness The Chinese University of Hong Kong Fall 2008
CSC 4170 Theory of Computation The class NP Section 7.3.
Instructor: Aaron Roth
Instructor: Aaron Roth
Theory of Computability
Presentation transcript:

April 13 th Class Notes Hw# 5 will be worth 50 points and it will be posted tonight or tomorrow

Definition of the Class NP 1)Language that can be accepted on a nondeterministic TM in polynomial time. If it isn’t in the language it may not reject in polynomial time 2)Given a certificate, one can verify in polynomial time whether or not an input is in the language

Hampath={ |G has a Hamiltonian path} This doesn’t have a Hampath since there are three vertices of degree one and we would need a way in and a way out

The graph below has a hampath

One Hampath for the diagram is A-B-D-F-E-C This path can be used to represent a certificate. Verifying this path would take less than polynomial time We can also prove that this can NP by checking all path options at once

Hampath={ |Gdoesn’t have a hamiltonion path There is not an easy certificate that can be generated to prove that no path exists This is Co-NP (compliment NP)

Composites ={n|n exists Z+ and there exists a p and q such that n=p*q} Can easily produce a certificate ie if n=143 p=11 and q=13

Primes={n|there is no way to represent n=p*q, where pa nd q exist in Z+ and P>1 and q>1} This has been shown to be O(n**6) by AKS

Clique={G,K|Graph G has a Clique of size k} The time to determine this would be n choose k A certificate would be all of the nodes in the clique

Subset-sum={(s,target| some subset in s adds up to the target) Brute force method: chack all subsets of S This would take 2**n where |s|=n A certificate could be generated which would include the subet that adds to the target Example S={7,15,35,19,135,2} target =59 Certificate =7,15,35,2

It is not known if P is a subset of NP or they are equal

Section 7.4 SAT (satisfiability problem) Boolean formula (X1 V X2 V X3) ^(X3V X4) Cook Levin theorem SAT exists in P iff P=NP

Polynomial time mapping problem A< pB iff W exists in A iff f(w) exists in B And f is computable in polynomial time If a polynomial solution to B was known and A< pB, Than there exists a polynomial solution to A

To solve A A(w){ 1. Calculate f(w) 2. Run the solution for B with input f(w) Given a solution to B we solve A by callin the soln to B a polynomial number of times

Partition < p subset sum S= {3,16,19,25,14,201} F(w)=S= {3,16,19,25,14,201} Target = ( )/2

All problems in NP are poly time reducible to SAT X<pSAT If all problems in the NP reduce (in polytime) to a problem Y. Then Y is known as NP-Complete and Y has to be in the NP. Also SAT is NP-Complete To prove a problem is NP_Complete reduce it from a known NP-Complete problem Any prob<SAT <pX