NP Reductions, Conp 1 More NP Reductions

Total Page:16

File Type:pdf, Size:1020Kb

NP Reductions, Conp 1 More NP Reductions Notes on Computer Theory Last updated: September, 2015 More NP reductions, coNP Dov Gordon, taken from Sipser [1], and Jonathan Katz 1 More NP reductions 1.1 SAT ≤p 3SAT We know that we can convert any formula φ into conjunctive normal form by using basic laws of Boolean algebra. However, we have to ensure that there is an efficient reduction, and, in general, the trivial mapping might blow up the number of clauses at an exponential rate. For example, consider (x1 ^ y1) _ (x2 ^ y2) _···_ (xn ^ yn). It is easy to see that this is equivalent to (x1 _ x2 _···_ xn) ^ (y1 _ x2 _···_ xn) ^ (x1 _ y2 _···_ xn) ^ (y1 _ y2 _ x3 _···_ xn) ^ · · · . This will have 2n clauses, though, so it is not a valid Karp reduction! Instead, we give a good Karp reduction, which can be found in pages 2-4 of these lecture notes. 1.2 3SAT ≤p SUBSET -SUM (Sipser, Chapter 7 [1]) The language SUBSET -SUM = f(S; t) j t 2 N ;S ⊆ N is a multi-set; 9Y ⊂ S; s.t. P y = tg yi2Y i We show a reduction from 3SAT by constructing the set S and the number t based on the formula φ over variables x1; : : : ; x` and clauses c1; : : : ; cn. For each variable xi 2 φ, we create two numbers (1) (2) yi ; yi 2 S, each with 2 parts: the left part (more significant digits) are identical, having a single (1) 1, followed by ` − i 0s. The right hand side of yi is n digits long, and has a 1 in the jth place (2) iff xi is found in clause cj. yi is defined similarly, but has a 1 in the jth place iff xi is found in clause cj. Every other digit is set to 0. In addition, for each clause cj, we add two more numbers (3) (4) to S: yj ; yi , each identical to one another, and each containing a 1, followed by n − j 0s. As an example, imagine we have φ = (x1 _ x2 _ x3) ^ (x2 _ x3 _··· ) ^ · · · ^ (x3 _···_··· ) Then we add the following set of numbers to our set S (see the table below). 1 1 2 3 4 ··· ` c1 c2 ··· cn (1) y1 1 0 0 0 ··· 0 1 0 ··· 0 (2) y1 1 0 0 0 ··· 0 0 0 ··· 0 (1) y2 1 0 0 ··· 0 0 1 ··· 0 (2) y2 1 0 0 ··· 0 1 0 ··· 0 (1) y3 1 0 ··· 0 1 1 ··· 0 (2) y3 1 0 ··· 0 0 0 ··· 1 . .. ··· . (3) y1 1 0 ··· 0 (4) y1 1 0 ··· 0 (3) y2 1 ··· 0 (4) y2 1 ··· 0 . .. (3) yn 1 (4) yn 1 t 1 1 1 1 ··· 1 3 3 ··· 3 We must prove two things: (1) (1) (2) (2) (3) (3) (4) (4) If φ 2 3-SAT, then (fy1 ; : : : ; y` ; y1 ; : : : y` ; y1 ; : : : ; yn ; y1 ; : : : ; yn g; t) 2 SUBSET-SUM (where t = 1`3n). Suppose we have some satisfying assignment to the variables of φ. We con- struct Y , a subset of S that adds up to t, as follows. For each i 2 f1; : : : ; `g, if xi is True in the (1) (2) satisfying assignment, then place yi in Y , and otherwise place yi in Y . Notice that we include exactly one of each, and so the sum of our elements in Y thus far is 1`, followed by some other values in the n least significant digits. Furthermore, because we know that we started with a satisfying assignment, every clause has at least one true literal in it, so we know that for each j 2 f1; : : : ng, the set Y includes at least one number with a 1 in the column labeled cj. On the other hand, the set Y will never include more than 3 numbers containing a 1 in column cj, because there are (1) (2) only 3 literals in each clause, and thus only 3 values among yi and yi containing a 1 in the jth column. We now add a few more numbers to our set Y : if we have exactly a single 1 above the (3) (4) line in column cj, we include both yj and yj in our subset. If we have two values of 1 above the (3) (3) horizontal line, we include only yj in our subset. If we have three values, we include neither yj (4) nor yj . The resulting subset adds up to exactly t. It remains to show that if there is some subset Y of S that adds up to t, then φ has a satisfying (1) assignment. For each i 2 f1; : : : ; `g, if yi 2 Y , set xi to True, and if not, set it to False. We claim that this constitute a valid assignment, and a satisfying assignment. To see that this is a (1) (2) valid assignment, note that for every i 2 f1; : : : `g, exactly one of yi and yi must appear in Y , or else the numbers cannot sum up to t (specifically, the first ` digits of the sum cannot possibly 2 ` be 1 ). Therefore, exactly one of xi andx ¯i will be set to True. To see that this is a satisfying assignment, note that for every j 2 f1; : : : ; ng, the subset Y must include at least one number (1) (1) (2) (2) among fy1 : : : ; y` ; y1 ; : : : ; y` g that has a 1 in the column labeled cj (or else that column could not add up to 3). Since this value appears in Y , its corresponding variable is assigned True, and jth clause is satisfied. 2 The Class coNP (Jonathan Katz) For any class C, we define the class coC as coC def= L j L¯ 2 C , where L¯ def= f0; 1g∗ n L is the complement of L. Applied to the class NP, we get the class coNP of languages where non- membership can be efficiently verified. In other words, L 2 coNP if there exists a Turing machine 1 ML and a polynomial p such that (1) ML(x; w) runs in time p(jxj), and (2) x 2 L iff for all w we have ML(x; w) = 1. Note why this (only) implies efficiently verifiable proofs of non-membership: a single w where ML(x; w) = 0 is enough to convince someone that x 62 L, but a single w where ML(x; w) = 1 means nothing. A coNP language is easily obtained by taking the complement of any language in NP. So, for example, the complement of IndSet is the language 8 9 < G does not have = NoIndSet = (G; k): : : an independent set of size k ; Let us double-check that this is in coNP: we can prove that (G; k) 62 NoIndSet by giving a set of k vertices that do form an independent set in G (this assumes the obvious verification algorithm); note that (assuming we use the obvious verification algorithm) we can never be \fooled" into believing that (G; k) is not in NoIndSet when it actually is. As another example, we have SAT 2 N P and SAT 2 coNP. Or, consider the language TAUT of tautologies: TAUT = fφ : φ is satisfied by every assignmentg: TAUT is also in coNP. The class coNP can also be defined in terms of non-deterministic Turing machines. This is left as an exercise. Note that P ⊆ N P \ coNP. (Why?) Could it be that NP = coNP? Once again, we don't know the answer but it would be surprising if this were the case. In particular, there does not seem to be any way to give an efficiently verifiable proof that, e.g., a boolean formula does not have any satisfying assignment (which is what would be implied by SAT 2 N P). Conjecture 1 N P 6= coNP. 3 Self-Reducibility and Search vs. Decision (Jonathan Katz) We have so far been talking mainly about decision problems, which can be viewed as asking whether a solution exists. But one often wants to solve the corresponding search problem, namely to find a solution (if one exists). For many problems, the two have equivalent complexity. 1See footnote ??. 3 Let us define things more formally. Say L 2 N P. Then there is some polynomial-time Turing machine M such that x 2 L iff 9w : M(x; w) = 1. The decision problem for L is: given x, determine if x 2 L. The search problem for L is: given x 2 L, find w such that M(x; w) = 1. (Note that we should technically speak of the search problem for L relative to M since there can be multiple non-deterministic Turing machines deciding L, and each such machine will define its own set of \solutions". Nevertheless, we stick with the inaccurate terminology and hope things will be clear from the context.) The notion of reducibility we want in this setting is Cook-Turing reducibility. We define it for decision problems, but can apply it to search problems via the natural generalization. Definition 1 Language L is Cook-Turing reducible to L0 if there is a poly-time Turing machine M such that for any oracle O0 deciding L0, machine M O0(·) decides L. (I.e., M O0(·)(x) = 1 iff x 2 L.) Note that if L is Karp-reducible to L0, then there is also a Cook-Turing reduction from L to L0. In general, however, the converse is not believed to hold.
Recommended publications
  • Complexity Theory Lecture 9 Co-NP Co-NP-Complete
    Complexity Theory 1 Complexity Theory 2 co-NP Complexity Theory Lecture 9 As co-NP is the collection of complements of languages in NP, and P is closed under complementation, co-NP can also be characterised as the collection of languages of the form: ′ L = x y y <p( x ) R (x, y) { |∀ | | | | → } Anuj Dawar University of Cambridge Computer Laboratory NP – the collection of languages with succinct certificates of Easter Term 2010 membership. co-NP – the collection of languages with succinct certificates of http://www.cl.cam.ac.uk/teaching/0910/Complexity/ disqualification. Anuj Dawar May 14, 2010 Anuj Dawar May 14, 2010 Complexity Theory 3 Complexity Theory 4 NP co-NP co-NP-complete P VAL – the collection of Boolean expressions that are valid is co-NP-complete. Any language L that is the complement of an NP-complete language is co-NP-complete. Any of the situations is consistent with our present state of ¯ knowledge: Any reduction of a language L1 to L2 is also a reduction of L1–the complement of L1–to L¯2–the complement of L2. P = NP = co-NP • There is an easy reduction from the complement of SAT to VAL, P = NP co-NP = NP = co-NP • ∩ namely the map that takes an expression to its negation. P = NP co-NP = NP = co-NP • ∩ VAL P P = NP = co-NP ∈ ⇒ P = NP co-NP = NP = co-NP • ∩ VAL NP NP = co-NP ∈ ⇒ Anuj Dawar May 14, 2010 Anuj Dawar May 14, 2010 Complexity Theory 5 Complexity Theory 6 Prime Numbers Primality Consider the decision problem PRIME: Another way of putting this is that Composite is in NP.
    [Show full text]
  • If Np Languages Are Hard on the Worst-Case, Then It Is Easy to Find Their Hard Instances
    IF NP LANGUAGES ARE HARD ON THE WORST-CASE, THEN IT IS EASY TO FIND THEIR HARD INSTANCES Dan Gutfreund, Ronen Shaltiel, and Amnon Ta-Shma Abstract. We prove that if NP 6⊆ BPP, i.e., if SAT is worst-case hard, then for every probabilistic polynomial-time algorithm trying to decide SAT, there exists some polynomially samplable distribution that is hard for it. That is, the algorithm often errs on inputs from this distribution. This is the ¯rst worst-case to average-case reduction for NP of any kind. We stress however, that this does not mean that there exists one ¯xed samplable distribution that is hard for all probabilistic polynomial-time algorithms, which is a pre-requisite assumption needed for one-way func- tions and cryptography (even if not a su±cient assumption). Neverthe- less, we do show that there is a ¯xed distribution on instances of NP- complete languages, that is samplable in quasi-polynomial time and is hard for all probabilistic polynomial-time algorithms (unless NP is easy in the worst case). Our results are based on the following lemma that may be of independent interest: Given the description of an e±cient (probabilistic) algorithm that fails to solve SAT in the worst case, we can e±ciently generate at most three Boolean formulae (of increasing lengths) such that the algorithm errs on at least one of them. Keywords. Average-case complexity, Worst-case to average-case re- ductions, Foundations of cryptography, Pseudo classes Subject classi¯cation. 68Q10 (Modes of computation (nondetermin- istic, parallel, interactive, probabilistic, etc.) 68Q15 Complexity classes (hierarchies, relations among complexity classes, etc.) 68Q17 Compu- tational di±culty of problems (lower bounds, completeness, di±culty of approximation, etc.) 94A60 Cryptography 2 Gutfreund, Shaltiel & Ta-Shma 1.
    [Show full text]
  • The Shrinking Property for NP and Conp✩
    Theoretical Computer Science 412 (2011) 853–864 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs The shrinking property for NP and coNPI Christian Glaßer a, Christian Reitwießner a,∗, Victor Selivanov b a Julius-Maximilians-Universität Würzburg, Germany b A.P. Ershov Institute of Informatics Systems, Siberian Division of the Russian Academy of Sciences, Russia article info a b s t r a c t Article history: We study the shrinking and separation properties (two notions well-known in descriptive Received 18 August 2009 set theory) for NP and coNP and show that under reasonable complexity-theoretic Received in revised form 11 November assumptions, both properties do not hold for NP and the shrinking property does not hold 2010 for coNP. In particular we obtain the following results. Accepted 15 November 2010 Communicated by A. Razborov P 1. NP and coNP do not have the shrinking property unless PH is finite. In general, Σn and P Πn do not have the shrinking property unless PH is finite. This solves an open question Keywords: posed by Selivanov (1994) [33]. Computational complexity 2. The separation property does not hold for NP unless UP ⊆ coNP. Polynomial hierarchy 3. The shrinking property does not hold for NP unless there exist NP-hard disjoint NP-pairs NP-pairs (existence of such pairs would contradict a conjecture of Even et al. (1984) [6]). P-separability Multivalued functions 4. The shrinking property does not hold for NP unless there exist complete disjoint NP- pairs. Moreover, we prove that the assumption NP 6D coNP is too weak to refute the shrinking property for NP in a relativizable way.
    [Show full text]
  • Computational Complexity and Intractability: an Introduction to the Theory of NP Chapter 9 2 Objectives
    1 Computational Complexity and Intractability: An Introduction to the Theory of NP Chapter 9 2 Objectives . Classify problems as tractable or intractable . Define decision problems . Define the class P . Define nondeterministic algorithms . Define the class NP . Define polynomial transformations . Define the class of NP-Complete 3 Input Size and Time Complexity . Time complexity of algorithms: . Polynomial time (efficient) vs. Exponential time (inefficient) f(n) n = 10 30 50 n 0.00001 sec 0.00003 sec 0.00005 sec n5 0.1 sec 24.3 sec 5.2 mins 2n 0.001 sec 17.9 mins 35.7 yrs 4 “Hard” and “Easy” Problems . “Easy” problems can be solved by polynomial time algorithms . Searching problem, sorting, Dijkstra’s algorithm, matrix multiplication, all pairs shortest path . “Hard” problems cannot be solved by polynomial time algorithms . 0/1 knapsack, traveling salesman . Sometimes the dividing line between “easy” and “hard” problems is a fine one. For example, . Find the shortest path in a graph from X to Y (easy) . Find the longest path (with no cycles) in a graph from X to Y (hard) 5 “Hard” and “Easy” Problems . Motivation: is it possible to efficiently solve “hard” problems? Efficiently solve means polynomial time solutions. Some problems have been proved that no efficient algorithms for them. For example, print all permutation of a number n. However, many problems we cannot prove there exists no efficient algorithms, and at the same time, we cannot find one either. 6 Traveling Salesperson Problem . No algorithm has ever been developed with a Worst-case time complexity better than exponential .
    [Show full text]
  • NP-Completeness Part I
    NP-Completeness Part I Outline for Today ● Recap from Last Time ● Welcome back from break! Let's make sure we're all on the same page here. ● Polynomial-Time Reducibility ● Connecting problems together. ● NP-Completeness ● What are the hardest problems in NP? ● The Cook-Levin Theorem ● A concrete NP-complete problem. Recap from Last Time The Limits of Computability EQTM EQTM co-RE R RE LD LD ADD HALT ATM HALT ATM 0*1* The Limits of Efficient Computation P NP R P and NP Refresher ● The class P consists of all problems solvable in deterministic polynomial time. ● The class NP consists of all problems solvable in nondeterministic polynomial time. ● Equivalently, NP consists of all problems for which there is a deterministic, polynomial-time verifier for the problem. Reducibility Maximum Matching ● Given an undirected graph G, a matching in G is a set of edges such that no two edges share an endpoint. ● A maximum matching is a matching with the largest number of edges. AA maximummaximum matching.matching. Maximum Matching ● Jack Edmonds' paper “Paths, Trees, and Flowers” gives a polynomial-time algorithm for finding maximum matchings. ● (This is the same Edmonds as in “Cobham- Edmonds Thesis.) ● Using this fact, what other problems can we solve? Domino Tiling Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling The Setup ● To determine whether you can place at least k dominoes on a crossword grid, do the following: ● Convert the grid into a graph: each empty cell is a node, and any two adjacent empty cells have an edge between them.
    [Show full text]
  • Simple Doubly-Efficient Interactive Proof Systems for Locally
    Electronic Colloquium on Computational Complexity, Revision 3 of Report No. 18 (2017) Simple doubly-efficient interactive proof systems for locally-characterizable sets Oded Goldreich∗ Guy N. Rothblumy September 8, 2017 Abstract A proof system is called doubly-efficient if the prescribed prover strategy can be implemented in polynomial-time and the verifier’s strategy can be implemented in almost-linear-time. We present direct constructions of doubly-efficient interactive proof systems for problems in P that are believed to have relatively high complexity. Specifically, such constructions are presented for t-CLIQUE and t-SUM. In addition, we present a generic construction of such proof systems for a natural class that contains both problems and is in NC (and also in SC). The proof systems presented by us are significantly simpler than the proof systems presented by Goldwasser, Kalai and Rothblum (JACM, 2015), let alone those presented by Reingold, Roth- blum, and Rothblum (STOC, 2016), and can be implemented using a smaller number of rounds. Contents 1 Introduction 1 1.1 The current work . 1 1.2 Relation to prior work . 3 1.3 Organization and conventions . 4 2 Preliminaries: The sum-check protocol 5 3 The case of t-CLIQUE 5 4 The general result 7 4.1 A natural class: locally-characterizable sets . 7 4.2 Proof of Theorem 1 . 8 4.3 Generalization: round versus computation trade-off . 9 4.4 Extension to a wider class . 10 5 The case of t-SUM 13 References 15 Appendix: An MA proof system for locally-chracterizable sets 18 ∗Department of Computer Science, Weizmann Institute of Science, Rehovot, Israel.
    [Show full text]
  • Lecture 10: Space Complexity III
    Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Lecture 10: Space Complexity III Arijit Bishnu 27.03.2010 Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Outline 1 Space Complexity Classes: NL and L 2 Reductions 3 NL-completeness 4 The Relation between NL and coNL 5 A Relation Among the Complexity Classes Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Outline 1 Space Complexity Classes: NL and L 2 Reductions 3 NL-completeness 4 The Relation between NL and coNL 5 A Relation Among the Complexity Classes Definition for Recapitulation S c NPSPACE = c>0 NSPACE(n ). The class NPSPACE is an analog of the class NP. Definition L = SPACE(log n). Definition NL = NSPACE(log n). Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Space Complexity Classes Definition for Recapitulation S c PSPACE = c>0 SPACE(n ). The class PSPACE is an analog of the class P. Definition L = SPACE(log n). Definition NL = NSPACE(log n). Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Space Complexity Classes Definition for Recapitulation S c PSPACE = c>0 SPACE(n ). The class PSPACE is an analog of the class P. Definition for Recapitulation S c NPSPACE = c>0 NSPACE(n ).
    [Show full text]
  • CSE 6321 - Solutions to Problem Set 5
    CSE 6321 - Solutions to Problem Set 5 1. 2. Solution: n 1 T T 1 T T D-Q = fhA; P0;P1;:::;Pm; b; q0; q1; : : : ; qm; r1; : : : ; rm; ti j (9x 2 R ) 2 x P0x + q0 x ≤ t; 2 x Pix + qi x + ri ≤ 0; Ax = bg. We can show that the decision version of binary integer programming reduces to D-Q in polynomial time as follows: The constraint xi 2 f0; 1g of binary integer programming is equivalent to the quadratic constrain (possible in D-Q) xi(xi − 1) = 0. The rest of the constraints in binary integer programming are linear and can be represented directly in D-Q. More specifically, let hA; b; c; k0i be an instance of D-0-1-IP = fhA; b; c; k0i j (9x 2 f0; 1gn)Ax ≤ b; cT x ≥ 0 kg. We map it to the following instance of D-Q: P0 = 0, q0 = −b, t = −k , k = 0 (no linear equality 1 T T constraint Ax = b), and then use constraints of the form 2 x Pix + qi x + ri ≤ 0 to represent the constraints xi(xi − 1) ≥ 0 and xi(xi − 1) ≤ 0 for i = 1; : : : ; n and more constraints of the same form to represent the 0 constraint Ax ≤ b (using Pi = 0). Then hA; b; c; k i 2 D-0-1-IP iff the constructed instance of D-Q is in D-Q. The mapping is clearly polynomial time computable. (In an earlier statement of ps6, problem 1, I forgot to say that r1; : : : ; rm 2 Q are also part of the input.) 3.
    [Show full text]
  • A Short History of Computational Complexity
    The Computational Complexity Column by Lance FORTNOW NEC Laboratories America 4 Independence Way, Princeton, NJ 08540, USA [email protected] http://www.neci.nj.nec.com/homepages/fortnow/beatcs Every third year the Conference on Computational Complexity is held in Europe and this summer the University of Aarhus (Denmark) will host the meeting July 7-10. More details at the conference web page http://www.computationalcomplexity.org This month we present a historical view of computational complexity written by Steve Homer and myself. This is a preliminary version of a chapter to be included in an upcoming North-Holland Handbook of the History of Mathematical Logic edited by Dirk van Dalen, John Dawson and Aki Kanamori. A Short History of Computational Complexity Lance Fortnow1 Steve Homer2 NEC Research Institute Computer Science Department 4 Independence Way Boston University Princeton, NJ 08540 111 Cummington Street Boston, MA 02215 1 Introduction It all started with a machine. In 1936, Turing developed his theoretical com- putational model. He based his model on how he perceived mathematicians think. As digital computers were developed in the 40's and 50's, the Turing machine proved itself as the right theoretical model for computation. Quickly though we discovered that the basic Turing machine model fails to account for the amount of time or memory needed by a computer, a critical issue today but even more so in those early days of computing. The key idea to measure time and space as a function of the length of the input came in the early 1960's by Hartmanis and Stearns.
    [Show full text]
  • Subgrouping Reduces Complexity and Speeds up Learning in Recurrent Networks
    638 Zipser Subgrouping Reduces Complexity and Speeds Up Learning in Recurrent Networks David Zipser Department of Cognitive Science University of California, San Diego La Jolla, CA 92093 1 INTRODUCTION Recurrent nets are more powerful than feedforward nets because they allow simulation of dynamical systems. Everything from sine wave generators through computers to the brain are potential candidates, but to use recurrent nets to emulate dynamical systems we need learning algorithms to program them. Here I describe a new twist on an old algorithm for recurrent nets and compare it to its predecessors. 2 BPTT In the beginning there was BACKPROPAGATION THROUGH TUvffi (BPTT) which was described by Rumelhart, Williams, and Hinton (1986). The idea is to add a copy of the whole recurrent net to the top of a growing feedforward network on each update cycle. Backpropa­ gating through this stack corrects for past mistakes by adding up all the weight changes from past times. A difficulty with this method is that the feedforward net gets very big. The obvious solution is to truncate it at a fixed number of copies by killing an old copy every time a new copy is added. The truncated-BPTT algorithm is illustrated in Figure 1. It works well, more about this later. 3RTRL It turns out that it is not necessary to keep an ever growing stack of copies of the recurrent net as BPTT does. A fixed number of parameters can record all of past time. This is done in the REAL TI!\.1E RECURRENT LEARNING (RTRL) algorithm of Williams and Zipser (1989).
    [Show full text]
  • 1 the Class Conp
    80240233: Computational Complexity Lecture 3 ITCS, Tsinghua Univesity, Fall 2007 16 October 2007 Instructor: Andrej Bogdanov Notes by: Jialin Zhang and Pinyan Lu In this lecture, we introduce the complexity class coNP, the Polynomial Hierarchy and the notion of oracle. 1 The class coNP The complexity class NP contains decision problems asking this kind of question: On input x, ∃y : |y| = p(|x|) s.t.V (x, y), where p is a polynomial and V is a relation which can be computed by a polynomial time Turing Machine (TM). Some examples: SAT: given boolean formula φ, does φ have a satisfiable assignment? MATCHING: given a graph G, does it have a perfect matching? Now, consider the opposite problems of SAT and MATCHING. UNSAT: given boolean formula φ, does φ have no satisfiable assignment? UNMATCHING: given a graph G, does it have no perfect matching? This kind of problems are called coNP problems. Formally we have the following definition. Definition 1. For every L ⊆ {0, 1}∗, we say that L ∈ coNP if and only if L ∈ NP, i.e. L ∈ coNP iff there exist a polynomial-time TM A and a polynomial p, such that x ∈ L ⇔ ∀y, |y| = p(|x|) A(x, y) accepts. Then the natural question is how P, NP and coNP relate. First we have the following trivial relationships. Theorem 2. P ⊆ NP, P ⊆ coNP For instance, MATCHING ∈ coNP. And we already know that SAT ∈ NP. Is SAT ∈ coNP? If it is true, then we will have NP = coNP. This is the following theorem. Theorem 3. If SAT ∈ coNP, then NP = coNP.
    [Show full text]
  • NP-Completeness
    CMSC 451: Reductions & NP-completeness Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Section 8.1 of Algorithm Design by Kleinberg & Tardos. Reductions as tool for hardness We want prove some problems are computationally difficult. As a first step, we settle for relative judgements: Problem X is at least as hard as problem Y To prove such a statement, we reduce problem Y to problem X : If you had a black box that can solve instances of problem X , how can you solve any instance of Y using polynomial number of steps, plus a polynomial number of calls to the black box that solves X ? Polynomial Reductions • If problem Y can be reduced to problem X , we denote this by Y ≤P X . • This means \Y is polynomal-time reducible to X ." • It also means that X is at least as hard as Y because if you can solve X , you can solve Y . • Note: We reduce to the problem we want to show is the harder problem. Call X Because polynomials Call X compose. Polynomial Problems Suppose: • Y ≤P X , and • there is an polynomial time algorithm for X . Then, there is a polynomial time algorithm for Y . Why? Call X Call X Polynomial Problems Suppose: • Y ≤P X , and • there is an polynomial time algorithm for X . Then, there is a polynomial time algorithm for Y . Why? Because polynomials compose. We’ve Seen Reductions Before Examples of Reductions: • Max Bipartite Matching ≤P Max Network Flow. • Image Segmentation ≤P Min-Cut. • Survey Design ≤P Max Network Flow.
    [Show full text]