CoNP and Function Problems



Similar documents
NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

! X is a set of strings. ! Instance: string s. ! Algorithm A solves problem X: A(s) = yes iff s! X.

NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Factoring & Primality

Introduction to Logic in Computer Science: Autumn 2006

Near Optimal Solutions

Welcome to... Problem Analysis and Complexity Theory , 3 VU

A Working Knowledge of Computational Complexity for an Optimizer

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Why? A central concept in Computer Science. Algorithms are ubiquitous.

The Classes P and NP

CMPSCI611: Approximating MAX-CUT Lecture 20

CSC 373: Algorithm Design and Analysis Lecture 16

Reductions & NP-completeness as part of Foundations of Computer Science undergraduate course

Lecture 13 - Basic Number Theory.

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

Introduction to Algorithms. Part 3: P, NP Hard Problems

Guessing Game: NP-Complete?

Chapter. NP-Completeness. Contents

Tutorial 8. NP-Complete Problems

Cryptography and Network Security Number Theory

Notes on NP Completeness

P versus NP, and More

8 Primes and Modular Arithmetic

FACTORING. n = fall in the arithmetic sequence

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

minimal polyonomial Example

Lecture 1: Oracle Turing Machines

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

Study of algorithms for factoring integers and computing discrete logarithms

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Lecture 7: NP-Complete Problems

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION

OHJ-2306 Introduction to Theoretical Computer Science, Fall

NP-Completeness and Cook s Theorem

On the Unique Games Conjecture

MATH10040 Chapter 2: Prime and relatively prime numbers

2.1 Complexity Classes

Prime Numbers. Difficulties in Factoring a Number: from the Perspective of Computation. Computation Theory. Turing Machine 電 腦 安 全

The last three chapters introduced three major proof techniques: direct,

Lecture 19: Introduction to NP-Completeness Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

Elements of Applied Cryptography Public key encryption

Integer factorization is in P

SIMS 255 Foundations of Software Design. Complexity and NP-completeness

Introduction to computer science

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, Notes on Algebra

Quotient Rings and Field Extensions

Complexity Classes P and NP

1 Formulating The Low Degree Testing Problem

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY

Computational complexity theory

3. Computational Complexity.

Discrete Mathematics Problems

One last point: we started off this book by introducing another famously hard search problem:

On the largest prime factor of x 2 1

Homework until Test #2

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

Discrete Optimization

Discuss the size of the instance for the minimum spanning tree problem.

POLYNOMIAL RINGS AND UNIQUE FACTORIZATION DOMAINS

1 Definition of a Turing machine

Prediction Markets. 1 Introduction. 1.1 What is a Prediction Market? Algorithms Seminar

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

SYSTEMS OF PYTHAGOREAN TRIPLES. Acknowledgements. I would like to thank Professor Laura Schueller for advising and guiding me

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Lecture 2: Complexity Theory Review and Interactive Proofs

Mathematical Induction. Lecture 10-11

Mathematical Induction

Consistent Query Answering in Databases Under Cardinality-Based Repair Semantics

1 if 1 x 0 1 if 0 x 1

The application of prime numbers to RSA encryption

SOLUTIONS FOR PROBLEM SET 2

Single machine parallel batch scheduling with unbounded capacity

Primality - Factorization

Automata and Computability. Solutions to Exercises

Computability Theory

Tetris is Hard: An Introduction to P vs NP

Zero: If P is a polynomial and if c is a number such that P (c) = 0 then c is a zero of P.

Chapter 4. Polynomial and Rational Functions. 4.1 Polynomial Functions and Their Graphs

CS 103X: Discrete Structures Homework Assignment 3 Solutions

Advanced Cryptography

Theoretical Computer Science (Bridging Course) Complexity

2 Primality and Compositeness Tests

Is n a Prime Number? Manindra Agrawal. March 27, 2006, Delft. IIT Kanpur

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

Factoring Polynomials

b) since the remainder is 0 I need to factor the numerator. Synthetic division tells me this is true

Repair Checking in Inconsistent Databases: Algorithms and Complexity

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Some practice problems for midterm 2

The P versus NP Solution

Transcription:

CoNP and Function Problems

conp By definition, conp is the class of problems whose complement is in NP. NP is the class of problems that have succinct certificates. conp is therefore the class of problems that have succinct disqualifications: A no instance of a problem in conp possesses a short proof of its being a no instance. Only no instances have such proofs.

conp (continued) Suppose L is a conp problem. There exists a polynomial-time nondeterministic algorithm M such that: If x L, then M (x) = yes for all computation paths. If x L, then M (x) = no for some computation path.

conp (concluded) Clearly P conp. It is not known if P = NP conp. Contrast this with R = RE core

Some conp Problems VALIDITY conp. If φ is not valid, it can be disqualified very succinctly: a truth assignment that does not satisfy it. SAT complement conp. The disqualification is a truth assignment that satisfies it. HAMILTONIAN PATH complement conp. The disqualification is a Hamiltonian path.

An Alternative Characterization of conp Let L Σ be a language. Then L conp if and only if there is a polynomially decidable and polynomially balanced relation R such that L = {x : \forall y (x, y) R}. L' = {x : (x, y) R for some y}. Because R remains polynomially balanced, L NP Hence L conp by definition.

conp Completeness L is NP-complete if and only if its complement L' = Σ L is conp-complete. Proof ( ; the part is symmetric) Let L1' be any conp language. Hence L1 NP. Let R be the reduction from L1 to L. So x L1 if and only if R(x) L. So x L1' if and only if R(x) L'. R is a reduction from L1' to L'.

Some conp-complete Problems SAT complement is conp-complete. SAT complement is the complement of sat. VALIDITY is conp-complete. φ is valid if and only if φ is not satisfiable. The reduction from sat complement to VALIDITY is hence easy. HAMILTONIAN PATH complement is conpcomplete.

Possible Relations between P, NP, conp 1. P = NP = conp. 2. NP = conp but P NP. 3. NP conp and P NP. This is current consensus.

conp Hardness and NP Hardness If a conp-hard problem is in NP, then NP = conp. Let L NP be conp-hard. Let PNTM M decide L. For any L1 conp, there is a reduction R from L1 to L. L1 NP as it is decided by PNTM M(R(x)). Alternatively, NP is closed under complement. Hence conp NP. The other direction NP conp is symmetric.

conp Hardness and NP Hardness (concluded) Similarly, If an NP-hard problem is in conp, then NP = conp. Hence NP-complete problems are unlikely to be in conp and conp-complete problems are unlikely to be in NP.

The Primality Problem An integer p is prime if p > 1 and all positive numbers other than 1 and p itself cannot divide it. PRIMES asks if an integer N is a prime number Dividing N by 2, 3,..., N is not efficient. The length of N is only log N, but N = 2 0.5 log N. A polynomial-time algorithm for primes was not found until 2002 by Agrawal, Kayal, and Saxena! We will focus on e cient probabilistic ffi algorithms for primes (used in practice).

ΔNP ΔNP NP conp is the class of problems that have succinct certificates and succinct disqualifications. Each yes instance has a succinct certificate. Each no instance has a succinct disqualification. No instances have both. P ΔNP. We will see that primes DP. In fact, primes P as mentioned earlier.

Primitive Roots in Finite Fields Theorem (Lucas and Lehmer (1927)) A number p > 1 is prime if and only if there is a number 1<r<p (called the primitive root or generator) s.t. 1. r p 1 = 1 mod p, and 2. r (p 1)/q = 1 mod p for all prime divisors q of p 1. Proof excluded.

Pratt s Theorem (Pratt (1975)) PRIMES NP conp. primes is in conp because a succinct disqualification is a divisor. Suppose p is a prime. p s certificate includes the r in L.L. Theorem Use recursive doubling to check if r p 1 =1modp in time polynomial in the length of the input, log p. We also need all prime divisors of p 1: q1, q2,..., qk. Checking r (p 1)/qi 1 mod p is also easy.

The Proof (concluded) Checking q1, q2,..., qk are all the divisors of p 1 is easy. We still need certificates for the primality of the qi s. The complete certificate is recursive and treelike: C(p) = (r; q1, C(q1 ), q2, C(q2 ),..., qk, C(qk )). C(p) can also be checked in polynomial time. We next prove that C(p) is succinct.

The Succinctness of the Certificate The length of C(p) is at most quadratic at 5 log 2 p. This claim holds when p = 2 or p = 3. In general, p 1 has k < log p prime divisors q1 = 2, q2,..., qk. C(p) requires: 2 parentheses and 2k < 2 log p separators (length at most 2 log p long), r (length at most log p), q1 = 2 and its certificate 1 (length at most 5 bits), the qi s (length at most 2 log p), and the C(qi )s.

The Proof (concluded) C(p) is succinct because C(p) 5 log p + 5 + 5 Σ i=2k log 2 qi 5 log p + 5 + 5 (Σ i=2k log2 qi) 2 5 log p + 5 + 5 log (p-1)/2 < 5 log p + 5 + 5(log2 p 1) 2 = 5 log 2 p + 10 5 log2 p 5 log 2 p for p 4.

Function Problems Decisions problem are yes/no problems (sat, tsp (d),etc.). Function problems require a solution (a satisfying truth assignment, a best tsp tour, etc.). Optimization problems are clearly function problems. What is the relation between function and decision problems? Which one is harder?

Function Problems Cannot Be Easier than Decision Problems If we know how to generate a solution, we can solve the corresponding decision problem. If you can find a satisfying truth assignment efficiently, then sat is in P. If you can find the best tsp tour efficiently, then tsp(d) is in P. But decision problems can be as hard as thecorresponding function problems.

FSAT FSAT is this function problem: Let φ(x1, x2,..., xn ) be a boolean expression. If φ is satisfiable, then return a satisfying truth assignment. Otherwise, return no. We next show that if SAT P, then FSAT has a polynomial-time algorithm.

1: t := ε; 2: if φ SAT then An Algorithm for FSAT Using SAT 3: for i = 1, 2,..., n do 4: if φ[ xi = true ] SAT then 5: t := t { xi = true }; 6: φ := φ[ xi = true ]; 7: else 8: t := t { xi = false }; 9: φ := φ[ xi = false ]; 10: end if 11: end for 12: return t; 13: else 14: return no ; 15: end if

Analysis There are n + 1 calls to the algorithm for SAT Shorter boolean expressions than φ are used in each call to the algorithm for sat. So if SAT can be solved in polynomial time, so can FSAT. Hence SAT and FSAT are equally hard (or easy).

TSP and TSP (d) Revisited We are given n cities 1, 2,..., n and integer distances dij = dji between any two cities i and j. The TSP asks for a tour with the shortest total distance (not just the shortest total distance, as earlier). The shortest total distance must be at most 2 x where x is the input. TSP (d) asks if there is a tour with a total distance at most B. We next show that if TSP (d) P, then TSP has a polynomial-time algorithm.

An Algorithm for tsp Using tsp (d) 1: Perform a binary search over interval [ 0, 2 x ] by calling tsp (d) to obtain the shortest distance C; 2: for i, j = 1, 2,..., n do 3: Call tsp (d) with B = C and dij = C + 1; 4: if no then 5: Restore dij to old value; {Edge [ i, j ] is critical.} 6: end if 7: end for 8: return the tour with edges whose dij C;

Analysis An edge that is not on any optimal tour will be eliminated, with its dij set to C + 1. An edge which is not on all remaining optimal tours will also be eliminated. So the algorithm ends with n edges which are not eliminated. There are O( x + n 2 ) calls to the algorithm for tsp (d). So if tsp (d) can be solved in polynomial time, so can tsp. Hence tsp (d) and tsp are equally hard (or easy).

FNP and FP L NP iff there exists poly-time computable R L (x,y) s.t. X L y { y p( x ) & R L (x,y) } Note how R L defines the problem-language L The corresponding search problem Π R(L) FNP is: given an x find any y s.t. R L (x,y) and reply no if none exist Are all FNP problems self-reducible like FSAT? [open?] FP is the subclass of FNP where we only consider problems for which a poly-time algorithm is known

FP <?> FNP A proof a-la-cook shows that FSAT is FNPcomplete Hence, if FSAT FP then FNP = FP But we showed self-reducibility for SAT, so the theorem follows: Theorem: FP = FNP iff P=NP

TFNP What happens if the relation R is total? i.e., for each x there is at least one y s.t. R(x,y) Define TFNP to be the subclass of FNP where the relation R is total TFNP contains problems that always have a solution, e.g. factoring, fix-point theorems, graph-theoretic problems, How do we know a solution exists? By an inefficient proof of existence, i.e. non- (efficiently)-constructive proof The idea is to categorize the problems in TFNP based on the type of inefficient argument that guarantees their solution

1. FP TFNP FNP 2. TFNP = F(NP conp) Properties of TFNP NP = problems with yes certificate y s.t. R 1 (x,y) conp = problems with no certificate z s.t. R 2 (x,y) for TFNP F(NP conp) take R = R 1 U R 2 for F(NP conp) TFNP take R 1 = R and R 2 = ø 3. There is an FNP-complete problem in TFNP iff NP = conp : If NP = conp then trivially FNP = TFNP : If the FNP-complete problem Π R is in TFNP then: FSAT reduces to Π R via f and g, hence any unsatisfiable formula φ has a no certificate y, s.t. R(f(φ),y) (y exists since Π R is in TFNP) and g(y)= no 4. TFNP is a semantic complexity class no complete problems! note how telling whether a relation is total is undecidable (and not even RE!!)

ANOTHER HC is in TFNP Thm: any graph with odd degrees has an even number of HC through edge xy Proof Idea: take a HC remove edge (1,2) & take a HP fix endpoint 1 and start rotating from the other end each HP has two valid neighbors (d=3) except for those paths with endpoints 1,2