1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)



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

Lecture 7: NP-Complete Problems

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

OHJ-2306 Introduction to Theoretical Computer Science, Fall

Introduction to Logic in Computer Science: Autumn 2006

CSC 373: Algorithm Design and Analysis Lecture 16

On the Relationship between Classes P and NP

The Classes P and NP

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

NP-Completeness and Cook s Theorem

P versus NP, and More

Theoretical Computer Science (Bridging Course) Complexity

Tutorial 8. NP-Complete Problems

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

Chapter. NP-Completeness. Contents

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

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

Complexity Classes P and NP

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

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

Quantum and Non-deterministic computers facing NP-completeness

CAD Algorithms. P and NP

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi

Notes on Complexity Theory Last updated: August, Lecture 1

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

Why Study NP- hardness. NP Hardness/Completeness Overview. P and NP. Scaling 9/3/13. Ron Parr CPS 570. NP hardness is not an AI topic

MATHEMATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Logic and Computer Science - Phokion G. Kolaitis

Generating models of a matched formula with a polynomial delay

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

Introduction to computer science

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

Introduction to NP-Completeness Written and copyright c by Jie Wang 1

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

Tetris is Hard: An Introduction to P vs NP

Mathematics for Algorithm and System Analysis

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

Lecture 1: Oracle Turing Machines

Lecture 2: Universality

The Classes P and NP. mohamed@elwakil.net

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

NP-completeness and the real world. NP completeness. NP-completeness and the real world (2) NP-completeness and the real world

Chapter 1. NP Completeness I Introduction. By Sariel Har-Peled, December 30, Version: 1.05

Notes on NP Completeness

Computational complexity theory

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

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

Turing Machines: An Introduction

Policy Analysis for Administrative Role Based Access Control

Notes on Complexity Theory Last updated: August, Lecture 1

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

Every tree contains a large induced subgraph with all degrees odd

Universality in the theory of algorithms and computer science

Exponential time algorithms for graph coloring

The P versus NP Solution

Nan Kong, Andrew J. Schaefer. Department of Industrial Engineering, Univeristy of Pittsburgh, PA 15261, USA

On the Unique Games Conjecture

On the independence number of graphs with maximum degree 3

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

SOLVING NARROW-INTERVAL LINEAR EQUATION SYSTEMS IS NP-HARD PATRICK THOR KAHL. Department of Computer Science

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

CMPSCI611: Approximating MAX-CUT Lecture 20

3515ICT Theory of Computation Turing Machines

Exact Polynomial-time Algorithm for the Clique Problem and P = NP for Clique Problem

Small Maximal Independent Sets and Faster Exact Graph Coloring

The Basics of Graphical Models

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 4 Nancy Lynch

How To Compare A Markov Algorithm To A Turing Machine

CS 3719 (Theory of Computation and Algorithms) Lecture 4

The Parameterized Complexity of Short Computation and Factorization

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear:

1 Definition of a Turing machine

Cycles and clique-minors in expanders

Cloud Computing is NP-Complete

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover

A Working Knowledge of Computational Complexity for an Optimizer

Lecture 30: NP-Hard Problems [Fa 14]

Two Way F finite Automata and Three Ways to Solve Them

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

8.1 Min Degree Spanning Tree

Ian Stewart on Minesweeper

Fairness in Routing and Load Balancing

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005

Problem Set 7 Solutions

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, School of Informatics University of Edinburgh als@inf.ed.ac.

Definition Given a graph G on n vertices, we define the following quantities:

Course Manual Automata & Complexity 2015

2.1 Complexity Classes

Computability Theory

Invitation to Fixed-Parameter Algorithms

Classification - Examples

Lecture 1: Course overview, circuits, and formulas

Remarks on the computational complexity of small universal Turing machines

Automata and Computability. Solutions to Exercises

Transcription:

Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages: the cases that satisfy the stated conditions are described by strings in some language L, while those that do not are in L. We need to rephrase our intuitive understanding of the problem in terms of a language.

The class N P The class N P is the set of all languages that are polynomially decidable by a nondeterministic Turing machine. A nondeterministic algorithm operates in two phases : 1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification) The second phase is called a verification algorithm and must take polynomial time.

SAT problem Example: Reconsider the SAT problem Suppose that a conjunctive normal form expression has length n, with m different literals (variable or negation of a variable): (x 1 x 2 ) (x 3 x 4 ) } {{ } n Since m < n, we take n as the problem size. We encode the conjunctive normal form expression as a string for a Turing machine: Σ = {x,,, (, ),, 0, 1} and the subscript of x is encoded as binary number: (x1 x 10) (x11 x100)

Example (continued): Since the subscript cannot be larger than m, the maximum length of any subscript is log 2 m. So, the the maximum encoded length of an n-symbol conjuctive normal form expression is O(nlogn) O(n 2 ). The next step is to nondeterministically create a certificate (assignments for the variables). This can be done in O(n) time (binary decision tree with 2 n leaves and O(n) height). The verification algorithm takes O(n 3 ) time: we check if the certificate makes the expression true (the encoded problem is O(n 2 ) and for each of the n variables we have to go through the entire encoded problem). SAT N P.

The CLIQUE problem Example: CLIQUE problem Let G = (V, E) be an undirected graph with vertices v 1, v 2,..., v n. A k-clique is a subset V k 2 V, such that there is an edge between every pair of vertices v i, v j V k. The clique problem is to decide if, for a given k, G has a k-clique. A deterministic search can examine all the elements of 2 V (exponential time-complexity). A nondeterministic algorithm guesses the correct subset (creating a certificate) and verifies the solution in deterministic polynomial time. CLIQUE N P.

N P problems There are many other such problems and all share the same characteristics: 1. All problems are in N P and have simple nondeterministic solutions. 2. All problems have deterministic solutions with exponential time complexity. One way to unify different cases is to see if we can reduce them to each other, in the sense if one is tractable, the others will tractable also. Cook-Karpe thesis: A problem that is in P is called tractable.

Polynomial time reduction Definition A language L 1 is said to be polynomial-time reducible to another language L 2 if there exists a deterministic Turing machine by which any w 1 in the alphabet of L 1 can be transformed in polynomial time to a w 2 in the alphabet of L 2 in such a way that w 1 L 1 if and only if w 2 L 2.

Polynomial time reduction Example: SAT problem is polynomial-time reducible to 3SAT. A restricted type of SAT is the 3SAT problem, in which each clause can have at most three literals: e 1 = (x 1 x 2 x 3 x 4 ) We introduce a new variable z and construct e 2 = (x 1 x 2 z) (x 3 x 4 z) If e 1 is true, one of the x 1, x 2, x 3, x 4 must be true. If x 1 x 2 is true, we choose z = 0, and e 2 is true. If x 3 x 4 = 1, we can choose z = 1 to satisfy e 2. Conversely, if e 2 is true, e 1 must also be true, so for satisfiability, e 1 and e 2 are equivalent. We run once through the expression (length n) and add new variables. The reduction runs in O(n).

Polynomial time reduction Example: 3SAT problem is polynomial-time reducible to CLIQUE. Consider e = (x 1 x 2 x 3 ) ( x 1 x 2 x 3 ) ( x 1 x 2 x 3 ) (x 1 x 2 x 3 ) We draw a graph in which each clause is represented by a group of three vertices and each literal is associated with one of the vertices. For each vertex in a group, we put an edge to all vertices of the other groups, unless the two associated literals are complements. Notice that the subgraph with ( x 2 ) 1, (x 3 ) 2, (x 3 ) 3, (x 1 ) 4 is a 4-clique and that x 2 = x 3 = x 1 = 1 is a variable assignment that satisfies e. It can be shown that the 3SAT problem can be satisfied if and only if the associated graph has a k-clique. The reduction can be done in deterministically polynomial time.

Polynomial time reduction The point of these polynomial time reductions is that we can now look at a given problem in several ways: Suppose we conjecture that SAT is tractable. If this is difficult to prove, we might try the simpler 3SAT case. If this does not work either, we can try to find an efficient algorithm for the CLIQUE problem. If any of the options can be shown to be tractable, we can claim that SAT is tractable.

N P-completeness and an open question There are a number of problems that are central to complexity study and are such that, if we completely understood one of them, we would understand the major issue involved in tractability. Definition A language L is said to be N P-complete if L N P and every L 1 N P is polynomial-time reducible to L. It follows from this definition that if L is N P-complete and polynomial-time reducible to L 1, then L 1 is also N P-complete. If we can find one deterministic polynomial-time algorithm for any N P-complete language, then every language in N P is also in P, that is, P = N P.

N P-completeness and an open question Do efficient algorithms exists for such problems? None have been found yet. This puts N P-completeness in the center of the question of the tractability of many important problems. The next result is known as Cook s theorem. Theorem The SAT problem is N P-complete. For every configuration sequence of a Turing machine one can construct a conjunctive normal form expression that is satisfiable if and only if there is a sequence of configurations leading to acceptance.

N P-completeness and an open question If we accept Cook s theorem, we immediately have a number of N P-complete problems: We have shown that SAT can be reduced to 3SAT, and that 3SAT can be reduced to CLIQUE. Therefore, 3SAT and CLIQUE are both N P-complete. There are many more problems that are known to be N P-complete. Efficient algorithms for any of these have been tried to find, so far without success. This leads us to conjecture that P N P, and that many important problems are intractable. P versus N P remains the fundamental open problem in computer science.

References LINZ, P. An introduction to Formal Languages and Automata. Jones and Bartlett Learning, 2012.