Tutorial 8. NP-Complete Problems



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

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

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

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

Lecture 7: NP-Complete Problems

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

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

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

A Working Knowledge of Computational Complexity for an Optimizer

CAD Algorithms. P and NP

Introduction to Logic in Computer Science: Autumn 2006

Near Optimal Solutions

Theoretical Computer Science (Bridging Course) Complexity

Chapter. NP-Completeness. Contents

CSC 373: Algorithm Design and Analysis Lecture 16

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

The Classes P and NP

ON THE COMPLEXITY OF THE GAME OF SET.

On the Relationship between Classes P and NP

NP-Completeness and Cook s Theorem

OHJ-2306 Introduction to Theoretical Computer Science, Fall

P versus NP, and More

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

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

Classification - Examples

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

Quantum and Non-deterministic computers facing NP-completeness

Tetris is Hard: An Introduction to P vs NP

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

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

The P versus NP Solution

Computational complexity theory

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

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

Complexity Classes P and NP

Guessing Game: NP-Complete?

Algorithm Design and Analysis

Exponential time algorithms for graph coloring

Notes on NP Completeness

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

Cloud Computing is NP-Complete

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

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

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

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

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

How to Prove a Theorem So No One Else Can Claim It

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

Offline 1-Minesweeper is NP-complete

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

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

How To Solve A Minimum Set Covering Problem (Mcp)

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

Approximation Algorithms

Single machine parallel batch scheduling with unbounded capacity

Lecture 30: NP-Hard Problems [Fa 14]

Applied Algorithm Design Lecture 5

CoNP and Function Problems

On the Unique Games Conjecture

Updating Action Domain Descriptions

Generating models of a matched formula with a polynomial delay

Cycle transversals in bounded degree graphs

On the k-path cover problem for cacti

Matthias F.M. Stallmann Department of Computer Science North Carolina State University Raleigh, NC

2.1 Complexity Classes

The Classes P and NP. mohamed@elwakil.net

Boulder Dash is NP hard

Lecture summary for Theory of Computation

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

Online and Offline Selling in Limit Order Markets

Some Minesweeper Configurations

A logical approach to dynamic role-based access control

Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max. structure of a schedule Q...

Quantum Computability and Complexity and the Limits of Quantum Computation

Introduction to computer science

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

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

The K-Observer Problem in Computer Networks

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design

Quantum Monte Carlo and the negative sign problem

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

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313]

How To Solve An Npa-Complete Problems With Quantum Computing And Chaotic Dynamics

The Challenger-Solver game: Variations on the theme of P =?NP

The Parameterized Complexity of Short Computation and Factorization

Topic: Greedy Approximations: Set Cover and Min Makespan Date: 1/30/06

Transcription:

Tutorial 8 NP-Complete Problems

Decision Problem Statement of a decision problem Part 1: instance description defining the input Part 2: question stating the actual yesor-no question A decision problem is a mapping from all possible inputs into the set {yes, no}

The Class P A polynomially bounded algorithm is one with its worst-case complexity bounded by a polynomial function of the input size. A polynomially bounded problem is one for which there is a polynomially bounded algorithm. The class P is the class of decision problems that are polynomially bounded.

Nondeterministic Algorithm void nondeta(string input) String s=gencertif(); Boolean CheckOK=verifyA(input,s); if if (checkok) Output yes ; return; Phase 2 Verifying: determining if s is a valid description of a object for answer, and satisfying the criteria for solution Phase 1 Guessing: generating arbitrarily certificate, i.e. proposed solution The algorithm may behave differently on on the same input in in different executions: yes or or no output.

The Class NP A polynomial bounded nondeterministic algorithm is one for which there is a (fixed) polynomial function p such that for each input of size n for which the answer is yes, there is some execution of the algorithm that produces a yes output in at most p(n) steps. The class NP is the class of decision problems for which there is a polynomial bounded nondeterministic algorithm.

NP-complete Problems A problem Q is NP-hard if every problem P in NP is reducible to Q, that is P P Q. (which means that Q is at least as hard as any problem in NP ) A problem Q is NP-complete if it is in NP and is NP-hard. (which means that Q is at most as hard as to be solved by a polynomially bounded nondeterministic algorithm)

Polynomial Reduction x (an input for P ) T T(x) an input for Q Algorithm for P P (x)= yes Q (T(x))= yes. Algorithm for Q If x->t(x) is polynomial bounded, we said P is polynimially reducable to Q, denoted as P PQ (1)If P PQ, then Q is at least as hard to solve as P; (2) If P PQ and Q is in class P, then P is in class P, and the cost of P is bounded by p(n)+q(p(n)) yes or no answer

Relation between P and NP P NP NP P? Not known yet!

Relation between NP, NP-hard and NPC (1) They are different classes, NP NP-hard, as there exists Halt problem, which in NPhard, but not in NP (2) NP NPC NP-hard (3) If any NP-completed problem is proved in P, then NP =P. First Known NP-Complete Problem Cook Theorem: SAT NPC

Proof of Being in NP Graph coloring is in NP Description of the input and the certificate Properties to be checked for an answer yes There are n colors listed Each c i is in the range 1,,k Scan the list of edges to see if a conflict exists Proving that each of the above statement can be checked in polynomial time.

Proving NPC by Reduction The CNF-SAT problem is NP -complete. Prove problem Q is NP-complete, given a problem P known to be NP -complete For all R NP, R P P; Show P P Q; By transitivity of reduction, for all R NP, R P Q; So, Q is NP-hard; If Q is in NP as well, then Q is NP-complete.

Known NP-Complete Problem Garey & Johnson: Computer and Intractability: A Guide to the Theory of NP-Completeness, Freeman, 1979 About 300 problems i.e. SAT, Clique, Hamiltonian, Partition, Knapsack Note: 0-1 knapsack problem is NPC problem, but it can be solved by using dynamic programming in polynomial time, think about why and how? (You can refer to the exercise in CLRS page 384, ex 16.2-2, which solution can be found in the instructor s manual. ) Is that means it in P? No, the DP algorithm is in a pseudo-polynomial time. It is still exponential to its input size. The explanation can be found in the textbook page 558, section 13.2.5.