Defining Polynomials p 1 (n) is the bound on the length of an input pair p 2 (n) is the bound on the running time of f p 3 (n) is a bound on the number.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms Quicksort
Advertisements

Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
16.4 Estimating the Cost of Operations Project GuidePrepared By Dr. T. Y. LinVinayan Verenkar Computer Science Dept San Jose State University.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Max Cut Problem Daniel Natapov.
Counting the bits Analysis of Algorithms Will it run on a larger problem? When will it fail?
QuickSort Average Case Analysis An Incompressibility Approach Brendan Lucier August 2, 2005.
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 
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
© The McGraw-Hill Companies, Inc., Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 · L 2 means: For some polynomial time computable map r : 8 x: x 2 L 1 iff.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu.
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
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.
CPSC 411, Fall 2008: Set 2 1 CPSC 411 Design and Analysis of Algorithms Set 2: Sorting Lower Bound Prof. Jennifer Welch Fall 2008.
Chapter 1 The Self-Reducibility Technique Matt Boutell and Bill Scherer CSC 486 April 4, 2001.
Submitted by : Estrella Eisenberg Yair Kaufman Ohad Lipsky Riva Gonen Shalom.
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Sorting Lower Bound Andreas Klappenecker based on slides by Prof. Welch 1.
DAST 2005 Week 4 – Some Helpful Material Randomized Quick Sort & Lower bound & General remarks…
The Complexity of Algorithms and the Lower Bounds of Problems
ECE 667 Synthesis and Verification of Digital Systems
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
Induction and recursion
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Chapter Tow Search Trees BY HUSSEIN SALIM QASIM WESAM HRBI FADHEEL CS 6310 ADVANCE DATA STRUCTURE AND ALGORITHM DR. ELISE DE DONCKER 1.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
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.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Approximation schemes Bin packing problem. Bin Packing problem Given n items with sizes a 1,…,a n  (0,1]. Find a packing in unit-sized bins that minimizes.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Lecture 22 More NPC problems
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
1 Chapter 10 Extending the Limits of Tractability Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
The Selection Problem. 2 Median and Order Statistics In this section, we will study algorithms for finding the i th smallest element in a set of n elements.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSC401 – Analysis of Algorithms Chapter 13 NP-Completeness Objectives: Introduce the definitions of P and NP problems Introduce the definitions of NP-hard.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
1 How to establish NP-hardness Lemma: If L 1 is NP-hard and L 1 ≤ L 2 then L 2 is NP-hard.
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.
and 6.855J March 6, 2003 Maximum Flows 2. 2 Network Reliability u Communication Network u What is the maximum number of arc disjoint paths from.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 8: Crash Course in Computational Complexity.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
Progress Report 07/30. Virtual Core Scheduling Problem For every time period, the hypervisor scheduler is given a set of virtual cores with their operating.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
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.
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
Chapter 11 Sorting Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and Mount.
The Theory of NP-Completeness
The NP class. NP-completeness
Polynomial-Time Reduction
CPSC 411 Design and Analysis of Algorithms
Richard Anderson Lecture 26 NP-Completeness
Proving Properties of Recursive Functions and Data Structures
NP-Completeness Yin Tat Lee
Intro to Theory of Computation
Intro to Theory of Computation
Richard Anderson Lecture 25 NP-Completeness
Coping With NP-Completeness
RS – Reed Solomon List Decoding.
Coping With NP-Completeness
Instructor: Aaron Roth
Presentation transcript:

Defining Polynomials p 1 (n) is the bound on the length of an input pair p 2 (n) is the bound on the running time of f p 3 (n) is a bound on the number of strings in S of length  n. q(n) = p 3 (p 2 (p 1 (n))) is the maximum number of strings in S that can be in the argument part of the output of f. r(n) = 4 k  k!  (q(n) + 1) k

CULL ( ,  ) Used in combination with splitting intervals into upper and lower halves to eventually get intervals of size 1.

CULL( ,  ) Cull: its job is to prune the number of intervals to a polynomial. For example, it will prune the number of intervals of size 1 from 2 p(|x|) to a polynomial, so that we can brute-force check each interval in polynomial time.

CULL( ,  ) A recursive function with recursion depth bounded by k  = set of intervals within [{0 p(|x|), 1 p(|x|) }]  = [  s (w 1 ) = b 1, …  s (w d ) = b d ], a list of assumptions, fixing query responses to 1 or 0 (since our polynomial machine can’t use the oracle)

CULL( ,  ) For instance: Initial call: CULL 0 ([0 p(|x|), 1 p(|x|) ], Ø) At depth d=1: CULL 1 ( , 1 assumption). At depth d=k: CULL k ( , k assumptions)

CULL( ,  ) Ex: CULL 3 ( , [  s (w 1 ) = 1,  s (w 2 ) = 0,  s (w 3 ) = 0]) Use this  to transform, for each I, f(I) = (  v 1, v 2, … v k ) to g  (I) = (   (I), Z  (I) ) where Z  (I) is the list with the w’s removed   (I) is a (k-d)-ary Boolean function with d variables fixed to specific values

Leaf Nodes of CULL Represent a complete set of assumptions (making Z  (I) empty)   (I) is a constant function, and so can be evaluated We evaluate each, and return the maximum interval such that g  (I) is true. If none exists, we return Ø

Correctness of CULL at leaves If the assumptions  are correct, then look at what is returned. If it is an interval, then x  L, else x  L

Nonleaf Nodes Consists of two phases: phase 1 removes duplicates in  phase 2 divides  ’ into groups that we can use in recursive calls while eliminating some intervals along the way ’’’’’’

Phase 1: Remove duplicates If g  (I) = g  (I’) for I < I’, then take  ’ =  - {I} Then  ’ will still be a cover Remove all such duplicates ’’’’’’

Phase 2: Split  ’   = {all I  ’ |   (I) (0,0,…,0) = 0}   = {all I  ’ |   (I) (0,0,…,0) = 1} ’’’’’’

Order within   Order the intervals in   as follows: I 1 = min{I | I   } I t+1 = min{I | I    Z  (I)  Z  (I 1 )  … Z  (I)  Z  (I t )  } m is the largest t such that I t is defined.

Order within   This means two things: I 1 < I 2 < … < I m The Z  (I i ) are pair-wise disjoint. Now define   ’ = {   if m  q(n) { J | J    J  I q(n)+1 otherwise x 2, x 3 x 4, x 5 x 2, x 6 x 7, x 8 i 1 i 2 i 3 i 4 I 1 I 2 I 3 ’’’’’’

Claim:   ’ is a cover of   if  is correct Without loss of generality, let m>q(n) (otherwise   ’ =   by our definition) Then  J   such that (  I   ) S satisfies g  (I) IFF I  J Specifically,  r, 1  r  m,  such that  t, 1  t  m,  S satisfies g  (I t ) IFF t  r

Nearing the Punchline... The number of strings in S that can appear in these Z  ’s is bounded by q(n). (  I   )[   (I)(0,0,…0)=0] So S does not satisfy g  (I q(n)+1 ) x 2, x 4 x 3, x 5 x 2, x 6 x 7, x 8 i 1 i 2 i 3 i 4 I 1 I 2 I 3 Ex: q(n)=2

The Punchline w max (x) < left endpoint of I q(n)+1. so we can eliminate from   any I > I q(n)+1 This keeps the number of intervals polynomial. x 2, x 4 x 3, x 5 x 2, x 6 x 7, x 8 x ? x ? chopped--> i 1 i 2 i 3 i 4 I ? I 1 I 2 I 3 I ?

Computing the Recursive Calls Let y 1, … y (k-d)m be an enumeration of the strings in Z  (I 1 ),…, Z  (I m ) Then for each t in the range 1  t  (k-d)m, let  t = {I | I   ‘  I  U 1  s  t-1  s  y t  Z  (I)} Ex: x 2, x 4 x 3, x 5 x 2, x 6 x 7, x 8 i 1 i 2 i 3 i 4 I 1 I 2 I 3  1 = {i 1, i 3 }  2 = {i 2 }...

What does  do for Us? This means that the intervals within a given  i all have at least one variable in common, namely y i. Ex: x 2, x 4 x 3, x 5 x 2, x 6 x 7, x 8 i 1 i 2 i 3 i 4 I 1 I 2 I 3  1 = {i 1, i 3 }  2 = {i 2 }...

The Recursive Calls CULL(  1,  +  s (y 1 ) = 0) CULL(  1,  +  s (y 1 ) = 1) up to CULL(  (k-d)m,  +  s (y (k-d)m ) = 0) CULL(  (k-d)m,  +  s (y (k-d)m ) = 1) Total number of calls: 2(k-d)m

Computing   Repeat whole process to get   Use max instead of min

Correctness Need to set this free variable to true and to false at each level of the tree to guarantee that one of the leaves will contain the correct set of assumptions.

Correctness At the leaves, because we have a full set of assumptions, we are evaluating constant functions. We get  that covers [0 p(|x|), 1 p(|x|) ]. Therefore if w max (x) is in [0 p(|x|), 1 p(|x|) ], then it must be in . One of the assumptions is correct.

Summary Since the entire number of recursive calls at each level is polynomial and the depth of recursion is contstant, and the time needed to cull the intervals is polynomial, and the number of intervals is polynomial, and each one can be checked in polynomial time…

P=NP Using our hypothetical sparse NP-hard setS, we have given a P algorithm for an arbitrary NP set! QED