COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.

Slides:



Advertisements
Similar presentations
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Advertisements

Polynomial-time reductions We have seen several reductions:
NP-Completeness: Reductions
NP and NP Complete. Definitions A problem is in the class P if there is a polynomial time solution to the problem A problem is in the class NP if there.
Department of Computer Science & Engineering
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
Graphs 4/16/2017 8:41 PM NP-Completeness.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
NP-complete and NP-hard problems
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
Analysis of Algorithms CS 477/677
NP-complete examples CSC3130 Tutorial 11 Xiao Linfu Department of Computer Science & Engineering Fall 2009.
Toward NP-Completeness: Introduction Almost all the algorithms we studies so far were bounded by some polynomial in the size of the input, so we call them.
Clique Cover Cook’s Theorem 3SAT and Independent Set
1 The Theory of NP-Completeness 2 NP P NPC NP: Non-deterministic Polynomial P: Polynomial NPC: Non-deterministic Polynomial Complete P=NP? X = P.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Lecture 22 More NPC problems
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
Polynomial-time reductions We have seen several reductions:
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
The Theory of Complexity for Nonpreemptive Scheduling 1.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
1 How to prove that a problem is NPC. 2 Cook Cook showed the first NPC problem: SAT Cook received Turing Award in 1982.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
NP-Algorithms Tractable vs Intractable Some problems are intractable: as they grow large, we are unable to solve them in reasonable time.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
CSC 413/513: Intro to Algorithms
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
P & NP.
Chapter 10 NP-Complete Problems.
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Richard Anderson Lecture 25 NP-Completeness
NP-Complete Problems.
CSE 6408 Advanced Algorithms.
The Theory of NP-Completeness
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Presentation transcript:

COMPLEXITY

Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several sums(or). For example, where addition and multiplication correspond to the and and or Boolean operations, and each variable is either 0 (false) or 1 (true) A Boolean expression is said to be satisfiable if there exists an assignment of 0s and 1s to its variables such that the value of the expression is 1

Satisfiability(SAT) problem Example: Can x, y, z be set so that this expression is true? (NO, in the above case) SAT problem is to determine whether a given expression is satisfiable At least one is true All three the same At least one is false

Decision problems Problems with answer either “yes” or “no” Decision problem can be viewed as language-recognition problem: –U is the set of possible inputs to the problem –L  U is the set of inputs which yield “yes” –L is the language corresponding to the problem

Reduction Let L 1 and L 2 be two languages from the input spaces U 1 and U 2 We say that L 1 is polynomially reducible to L 2 if there exists a polynomial-time algorithm that converts each input u 1  U 1 to another input u 2  U 2 such that u 1  L 1 if and only if u 2  L 2 Note: The algorithm is polynomial in the size of the input u 1

Class of Decision Problems P: Problems could be solved by deterministic algorithm in polynomial time NP: Problems for which exists a non- deterministic algorithm whose running time is a polynomial in the size of the input Note: Whether P = NP is not known, but most people believe P  NP

Definitions and Classifications NP-Hard: A problem X is called an NP- hard problem if every problem in NP is polynomially reducible to X NP-Complete: A problem X is called an NP-complete problem if: –X belongs to NP, and –X is NP-hard Also, X is NP-complete if X  NP and Y is polynomially reducible to X for some Y that is NP-complete NP-complete problems are the hardest problems in NP

Fundamental Result Cook’s theorem: The SAT problem is NP-complete Once we have found an NP-complete problem, proving that other problems are also NP-complete becomes easier Given a new problem Y, it is sufficient to prove that Cook’s problem, or any other NP-complete problem, is polynomially reducible to Y

Vertex Cover (VC) Problem A vertex cover of G=(V, E) is V’  V such that every edge in E is incident to some v  V’ VC: Given undirected G=(V, E) and integer k, does G have a vertex cover with  k vertices?

Dominating Set (DS) Problem A dominating set D of G=(V, E) is D  V such that every v  V is either in D or adjacent to at least one vertex of D DS: Given G and k, does G have a dominating set of size  k ?

More Problems CLIQUE: Does G contain a clique of size  k? 3SAT: Give a Boolean expression in CNF such that each clause has exactly 3 variables, determine satisfiability

Reduction Examples Vertex Cover Clique3SAT SAT 3-Colorability Dominating Set All NP problems

CLIQUE  VC VC is NP: This is trivial since we can guess a cover of size  k and check it easily in poly-time Goal: Transform arbitrary CLIQUE instance into VC instance such that CLIQUE answer is “yes” if and only if VC answer is “yes”

CLIQUE  VC CLIQUE(G,k) has the same answer as VC(G’,n-k), where n = |V| and G’ is a complement of G GG’

VC  DS G’ has DS D of size k if and only if G has VC of size k vw u z v vz w u vu z zu uw vw GG’

SAT  CLIQUE G has m-clique (m is the number of clauses in E), if and only if E is satisfiable (assign value 1 to all variables in clique)

DS   -DS vw u z GG’ vw u z ab