Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.

Slides:



Advertisements
Similar presentations
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
Advertisements

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
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
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Mount Holyoke College 2 The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )
NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Fall The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
Graphs 4/16/2017 8:41 PM NP-Completeness.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
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.
NP-Complete Problems Problems in Computer Science are classified into
Analysis of Algorithms CS 477/677
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
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
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Lecture 22 More NPC problems
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
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.
Complexity Non-determinism. NP complete problems. Does P=NP? Origami. Homework: continue on postings.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
CSC401 – Analysis of Algorithms Chapter 13 NP-Completeness Objectives: Introduce the definitions of P and NP problems Introduce the definitions of NP-hard.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
The Class NP Lecture 39 Section 7.3 Mon, Nov 26, 2007.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
CS 461 – Nov. 30 Section 7.5 How to show a problem is NP-complete –Show it’s in NP. –Show that it corresponds to another problem already known to be NP-complete.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
CSC 413/513: Intro to Algorithms
Complexity ©D.Moshkovits 1 2-Satisfiability NOTE: These slides were created by Muli Safra, from OPICS/sat/)
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong NP-complete.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
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.
CS 154 Formal Languages and Computability May 10 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
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.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
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
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
NP-Completeness Proofs
Hard Problems Introduction to NP
(xy)(yz)(xz)(zy)
Intro to Theory of Computation
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
NP-Complete Problems.
CSC 4170 Theory of Computation The class NP Section 7.3.
CS154, Lecture 13: P vs NP.
NP-completeness The Chinese University of Hong Kong Fall 2008
More on NP-completeness
CSE 589 Applied Algorithms Spring 1999
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Lecture 23 NP-Hard Problems
Presentation transcript:

Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems

Homework Realprime proof? Other problems?

Reprise on P, verifiers & NP P is the set of problems that can be decided in polynomial time. NP defined in two ways: –Problems defined by a procedure, possibly non-deterministic (think of guessing among a finite set of choices) in which the guesses that work only take up polynomial time. –Problem in which there is a way to verify the answer, given some extra information, with the verification taking only polynomial time.

Recall: COMPOSITES COMPOSITES= {x|x = p*q, where p,q>1} Problem is factoring. Does x have a non- trivial factorization? Is x prime? Problem is HARD, meaning no polynomial time algorithm has been found BUT Verifying is easy! If we are given the factoring, we can check it.

Clique Graph problem: Consider graphs (vertices, simple edges) A k-clique is a subgraph with k vertices, in which each vertex is connected to every other vertex in the subgraph. Problem is: Does graph G contain a k- clique? CLIQUE is in NP –Using nondeterminism, keep guessing subgraphs and check each one. –If you have a candidate, check it out. The candidate serves as the information for the verifier.

Satisfiability SAT Consider Boolean formulas: variables and & and | and NOT operators, along with parentheses. A Boolean formula is satisfiable if some assignments of TRUE (1) and FALSE (0) makes the formula evaluate to TRUE.

Examples Find assignment of x, y and z for which the formula is true –(NOTx & y) | (x | NOTz) –(x|y) & (x|NOTy) & (NOTx|y) & (NOTx|NOTy)

SAT SAT = {formula f | f is satisfiable} SAT is NP –Can be verified using the information of the assignment of variables

Cook-Levin theorem SAT is in P if and only if P = NP Informally, if there is a polynomial algorithm for determining if any particular formula has an assignment that is TRUE, then there is a polynomial algorithm for ALL the problems that are NP. The other direction is automatic: if NP = P, then there is a polynomial algorithm for SAT.

Reducibility Consider two problems, A and B. A is reducible to B if there exist a polynomial-time function that translates a problem in A to one in B. If A can be reduced to B and B can be solved in polynomial time, then so can A.

Aside The general principle of reducibility –turning one problem into another problem Is a good technique. –NOT always the most efficient. You may be turning a simpler problem into a more complex problem. –Be aware of adage: if the only tool you have is a hammer, everything looks like a nail.

NP-Complete A problem (language) B is NP-complete if – B is in NP and –every problem A in NP is polynomial reducible to B.

SAT is NP complete This is equivalent to proving Cook-Levin. Go back to Turing Machines Consider a language A for which there is a non-deterministic TM that decides if a string w is in A. The reduction of A to SAT is to show a method that takes each w and constructs a Boolean formula f that simulates TM acting on w. Show method is polynomial. w is in A if and only if f is satisfiable.

How to prove anything NP- complete???? Accept that SAT is NP-complete For any problem B, show SAT is reducible to B.

NP complete problems Known set –Added to all the time. If there is a polynomial solution to any of them, there is a polynomial solution to all of them.

NP complete problems CLIQUE HAMPATH 3SAT –Formulas restricted to special format literals (single variables or negated single variable) Conjunctive normal form: clauses connected by ANDs 3cnf formula is one in CNF in which each clause has exactly 3 literals.

Homework Find other NP-complete problems!!! –Do it. –Come prepared to explain problem to class.