Nondeterministic Polynomial Time

Similar documents
Ma/CS 6a Class 27: Shortest Paths

P and NP (Millenium problem)

Computational Complexity and Implications for Security DRAFT Notes on Infeasible Computation for MA/CS 109 Leo Reyzin with the help of Nick Benes

8 NP-complete problem Hard problems: demo

Theory of Computations Spring 2016 Practice Final

Theory of Computations Spring 2016 Practice Final Exam Solutions

P vs. NP. Simpsons: Treehouse of Horror VI

Introduction to Algorithms

NP-Completeness. Algorithms

Math 776 Graph Theory Lecture Note 1 Basic concepts

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

COMP260 Spring 2014 Notes: February 4th

CS154, Lecture 18: PCPs, Hardness of Approximation, Approximation-Preserving Reductions, Interactive Proofs, Zero-Knowledge, Cold Fusion, Peace in

Chapter 8. NP-complete problems

Exact Algorithms Lecture 7: FPT Hardness and the ETH

Lecture 15: Algorithms. AP Computer Science Principles

Fixed Parameter Algorithms

Steven Skiena. skiena

Best known solution time is Ω(V!) Check every permutation of vertices to see if there is a graph edge between adjacent vertices

Computability Theory

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

Recitation 4: Elimination algorithm, reconstituted graph, triangulation

1 Algorithm and Proof for Minimum Vertex Coloring

6.006 Introduction to Algorithms. Lecture 25: Complexity Prof. Erik Demaine

P and NP CISC5835, Algorithms for Big Data CIS, Fordham Univ. Instructor: X. Zhang

W[1]-hardness. Dániel Marx. Recent Advances in Parameterized Complexity Tel Aviv, Israel, December 3, 2017

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Algorithms For Inference Fall 2014

Parameterized Complexity - an Overview

Lecture 20: Satisfiability Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

Randomness and Computation March 25, Lecture 5

NOTE ON MINIMALLY k-connected GRAPHS

8.1 Polynomial-Time Reductions

CS 580: Algorithm Design and Analysis

3/7/2018. CS 580: Algorithm Design and Analysis. 8.1 Polynomial-Time Reductions. Chapter 8. NP and Computational Intractability

P and NP CISC4080, Computer Algorithms CIS, Fordham Univ. Instructor: X. Zhang

NP-Complete Reductions 2

14 More Graphs: Euler Tours and Hamilton Cycles

Modules. 6 Hamilton Graphs (4-8 lectures) Introduction Necessary conditions and sufficient conditions Exercises...

Computational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example

Math 454 Final Exam, Fall 2005

Complexity Classes and Polynomial-time Reductions

Log-Space. A log-space Turing Machine is comprised of two tapes: the input tape of size n which is cannot be written on, and the work tape of size.

NP-Completeness of 3SAT, 1-IN-3SAT and MAX 2SAT

Combinatorial Optimization

Lecture 14: Linear Programming II

6.2. Paths and Cycles

MATH10001 Mathematical Workshop. Graphs, Trees and Algorithms Part 2. Trees. From Trees to Prüfer Codes

Parameterized Reductions

arxiv: v1 [cs.ds] 8 Jan 2019

Theory of Languages and Automata

(p 300) Theorem 7.27 SAT is in P iff P=NP

P = NP; P NP. Intuition of the reduction idea:

W[1]-hardness. Dániel Marx 1. Hungarian Academy of Sciences (MTA SZTAKI) Budapest, Hungary

NP versus PSPACE. Frank Vega. To cite this version: HAL Id: hal

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Time Complexity of an Algorithm

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

VISUALIZING NP-COMPLETENESS THROUGH CIRCUIT-BASED WIDGETS

15-451/651: Design & Analysis of Algorithms November 4, 2015 Lecture #18 last changed: November 22, 2015

Some Graph Theory for Network Analysis. CS 249B: Science of Networks Week 01: Thursday, 01/31/08 Daniel Bilar Wellesley College Spring 2008

Lecture 21: Other Reductions Steven Skiena

Towards the Proof of the PCP Theorem

The Big Picture. Chapter 3

Lecture 21: Other Reductions Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

4.1 Review - the DPLL procedure

Computer Sciences Department

NP-Complete Problems

1 Definition of Reduction

Graphs and Algorithms 2015

CS2 Algorithms and Data Structures Note 10. Depth-First Search and Topological Sorting

TAFL 1 (ECS-403) Unit- V. 5.1 Turing Machine. 5.2 TM as computer of Integer Function

The strong chromatic number of a graph

1 Counting triangles and cliques

Approximation Algorithms

Announcements. CSEP 521 Applied Algorithms. Announcements. Polynomial time efficiency. Definitions of efficiency 1/14/2013

14.1 Encoding for different models of computation

Lecture 6: Graph Properties

STAT 598L Probabilistic Graphical Models. Instructor: Sergey Kirshner. Exact Inference

Fixed-Parameter Algorithm for 2-CNF Deletion Problem

Example of a Demonstration that a Problem is NP-Complete by reduction from CNF-SAT

Discrete Wiskunde II. Lecture 6: Planar Graphs

CSE 21 Spring 2016 Homework 5. Instructions

Graphs and Algorithms 2016

Lecture 2 Finite Automata

6.045J/18.400J: Automata, Computability and Complexity Final Exam. There are two sheets of scratch paper at the end of this exam.

6.856 Randomized Algorithms

9 About Intersection Graphs

Nondeterministic Programming in C++

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

CS70 - Lecture 6. Graphs: Coloring; Special Graphs. 1. Review of L5 2. Planar Five Color Theorem 3. Special Graphs:

Partha Sarathi Mandal

A 2k-Kernelization Algorithm for Vertex Cover Based on Crown Decomposition

CS21 Decidability and Tractability

Questions? You are given the complete graph of Facebook. What questions would you ask? (What questions could we hope to answer?)

Lecture 4: 3SAT and Latin Squares. 1 Partial Latin Squares Completable in Polynomial Time

(Refer Slide Time: 0:19)

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010

CMSC 451: Lecture 22 Approximation Algorithms: Vertex Cover and TSP Tuesday, Dec 5, 2017

Transcription:

Nondeterministic Polynomial Time CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2017 1/1

A clique is a subset of vertices that are pairwise adjacent {1, 4}, {2, 3, 4}, {1} are cliques 1 2 3 4 Graph G An independent set is a subset of vertices that are pairwise non-adjacent {1, 2}, {1, 3}, {4} are independent sets A vertex cover is a set of vertices that touches (covers) all edges {2, 4}, {3, 4}, {1, 2, 3} are vertex covers 2/1

These problems CLIQUE = { G, k G is a graph having a clique of k vertices} INDEPENDENT-SET = { G, k G is a graph having an independent set of k vertices} VERTEX-COVER = { G, k G is a graph having a vertex cover of k vertices} What do these problems have in common? 1. Given a candidate solution, we can quickly check if it is valid 2. We don t know how to solve these problems quickly 3/1

Checking solutions quickly If someone told us a candidate solution, we can quickly verify if it is valid Example: Is G, 5 CLIQUE? Candidate solution: {1, 5, 9, 12, 14} 12 9 5 14 1 13 6 2 15 4 7 10 8 3 11 4/1

The class NP A verifier for L is a Turing machine V such that x L V accepts x, s for some s s is a candidate solution for x We say V runs in polynomial time if on every input x, it runs in time polynomial in x (for every s) NP is the class of all languages that have polynomial-time verifiers 5/1

Example CLIQUE is in NP: V = On input G, k, a set of vertices C, If C has size k and all edges between vertices C are present in G accept Otherwise reject Running time: O(k 2 ) 6/1

P versus NP P is contained in NP because the verifier can ignore the candidate solution Intuitively, finding solutions can only be harder than verifying them decidable NP (efficiently checkable) IS VC P (efficient) L 01 PATH CLIQUE SAT IS = INDEPENDENT-SET VC = VERTEX-COVER We will talk about SAT in the next lecture 7/1

Millennium prize problems In 2000, Clay Math Institute gave 7 problems for the 21st century P versus NP (computer science) Hodge conjecture Poincaré conjecture (Perelman 2006) Riemann hypothesis (Hilbert s 8th problem) Yang Mills existence and mass gap Navier Stokes existance and smoothness Birth and Swinnerton-Dyer conjecture 8/1

P versus NP P = NP P = NP IS VC L 01 PATH CLIQUE SAT Is P equal to NP? P NP NP IS VC P L 01 PATH CLIQUE SAT We don t know. But one reason to believe P NP is that intuitively, searching for a solution is harder than verifying its correctness For example, solving homework problems (searching for solutions) is harder than grading (verifying the candidate solution is correct) 9/1

Searching versus verifying Mathematician: Given a mathematical claim, come up with a proof for it Scientist: Given a collection of data on some phenomenon, find a theory explaining it Engineer: Given a set of constraints (on cost, physical laws, etc), come up with a design (of an engine, bridge, etc) which meets them Detective: Given the crime scene, find who s done it 10/1

P and NP P = languages that can be decided on TM in polynomial time (admit efficient algorithms) NP = languages whose solutions can be verified on a TM in polynomial time (solutions can be checked efficiently) NP P We believe P NP, but we are not sure 11/1

Evidence that NP is bigger than P CLIQUE = { G, k G is a graph having a clique of k vertices} IS = { G, k G is a graph having an independent set of k vertices} VC = { G, k G is a graph having a vertex cover of k vertices} What do they have in common? These (and many others) are in NP No efficient algorithms are known for solving any of them 12/1

Naive algorithm for solving CLIQUE CLIQUE = { G, k G is a graph having a clique of k vertices} M : On input G, k : For all subsets S of vertices of size k If every pair u, v S are adjacent accept else reject 1 2 3 4 Graph G Example: input: G, 3 subsets: {123} {124} {134} {234} All edges in S? No No No Yes 13/1

Running time analysis CLIQUE = { G, k G is a graph having a clique of k vertices} M : On input G, k : For all subsets S of vertices of size k If every pair u, v S are adjacent accept else reject running time: ( n ) k subsets k 2 pairs k 2( ) n k 2 n when k = n/2 14/1

Equivalence of certain NP languages We strongly suspect that problems like CLIQUE, SAT, etc require roughly 2 n time to solve We do not know how to prove this, but we can prove that If any one of them can be solved efficiently, then all of them can be solved efficiently 15/1

Equivalence of some NP languages Next lecture: All problems such as CLIQUE, SAT, IS, VC are as hard as one another Moreover, they are at least as hard as any problem in NP 16/1