02/01/11CMPUT 671 Lecture 11 CMPUT 671 Hard Problems Winter 2002 Joseph Culberson Home Page.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

What is Intractable? Some problems seem too hard to solve efficiently. Question 1: Does an efficient algorithm exist?  An O(a ) algorithm, where a > 1,
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 
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
NP-complete and NP-hard problems
88- 1 Chapter 8 The Theory of NP-Completeness P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
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.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
Complexity Classes Kang Yu 1. NP NP : nondeterministic polynomial time NP-complete : 1.In NP (can be verified in polynomial time) 2.Every problem in NP.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Programming & Data Structures
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
CSCE350 Algorithms and Data Structure
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.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
CSEP 521 Applied Algorithms Richard Anderson Lecture 10 NP Completeness.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
Approximation Algorithms
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.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Non-Approximability Results. Summary -Gap technique -Examples: MINIMUM GRAPH COLORING, MINIMUM TSP, MINIMUM BIN PACKING -The PCP theorem -Application:
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
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.
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.
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.
Optimization/Decision Problems Optimization Problems – An optimization problem is one which asks, “What is the optimal solution to problem X?” – Examples:
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
1 1. Which of these sequences correspond to Hamilton cycles in the graph? (a) (b) (c) (d) (e)
1 Introduction to Quantum Information Processing QIC 710 / CS 667 / PH 767 / CO 681 / AM 871 Richard Cleve DC 2117 Lectures
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
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
More NP-Complete and NP-hard Problems
University of British Columbia
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Lecture 2-2 NP Class.
Lecture 22 Complexity and Reductions
Lecture 5 NP Class.
NP-Completeness Yin Tat Lee
Chapter 34: NP-Completeness
Section 14.3 Complexity Classes
NP-Complete Problems.
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
CSE 6408 Advanced Algorithms.
The Theory of NP-Completeness
RAIK 283 Data Structures & Algorithms
Presentation transcript:

02/01/11CMPUT 671 Lecture 11 CMPUT 671 Hard Problems Winter 2002 Joseph Culberson Home Page

02/01/11CMPUT 671 Lecture 12 What are you doing?

02/01/11CMPUT 671 Lecture 13 What am I doing? What are you doing?

02/01/11CMPUT 671 Lecture 14 What is Hard? Problems and Complexity –P, NP, PSPACE; between and beyond –Worst case, Randomized, Average case What am I doing? What are you doing?

02/01/11CMPUT 671 Lecture 15 What is Hard? Problems and Complexity –P, NP, PSPACE; between and beyond –Worst case, Randomized, Average case Instances and Algorithms –Some instances may be easy for some algorithms –Hard instances for classes of algorithms What am I doing? What are you doing?

02/01/11CMPUT 671 Lecture 16 What is Hard? Problems and Complexity –P, NP, PSPACE; between and beyond –Worst case, Randomized, Average case Instances and Algorithms –Some instances may be easy for some algorithms –Hard instances for classes of algorithms Ensembles and Phase Transitions - Most instances may be easy - Hard instances may be “concentrated” - Hard random instances for classes of algorithms - Generation What am I doing? What are you doing?

02/01/11CMPUT 671 Lecture 17 Background Asymptotic notation and algorithm analysis Problems, Complexity Classes, Reductions and Completeness (P to NPc) Backtrack Search, Stochastic Search Graphs and some graph theory Probability (as background to random graphs and structures)

02/01/11CMPUT 671 Lecture 18 Problems A Problem is a set of instances and queries. An instance is a structure (versus language) Queries are universal e.g. Graph k-coloring Instance: A graph G and integer k Query: Is G k-colorable? e.g. MST union TSP Instance: A weighted graph G, integers B 1,B 2 Query: Does G have a spanning tree of weight B 1 or a tour of weight B 2 ? (Set one to 0)

02/01/11CMPUT 671 Lecture 19 Measuring Resources Time Instance I n = Size(I); Formally, the number of bits in an encoding (logarithmic model) but mostly we will use the uniform model, e.g. the number of vertices and edges of a graph. T(I) = number of steps in computation to answer the query. Formally, on a model of computation, typically a RAM.

02/01/11CMPUT 671 Lecture 110 Measuring Resources Time (continued) Worst Case T(n) = max{ T(I) : size(I) = n } Average Case A(n) = sum T(I)* Prob(I) : size(I) = n Note: distribution dependent! Typically all instances of size n equally likely, but this may not be representative of the “real world”

02/01/11CMPUT 671 Lecture 111 Measuring Resources SPACE Similar, but measures number of memory cells required. Formally, each cell must be of fixed size, e.g. number of bits fixed. For certain purposes, e.g. O(log n) memory requirements, we exclude size of input memory. (Likely not relevant to this course)

02/01/11CMPUT 671 Lecture 112 Asymptotic Notation

02/01/11CMPUT 671 Lecture 113 Types of Problems Optimization Given G find the minimum number of colors required to color it. Functional Given G find an optimal coloring Given G and k find a k-coloring if one exists Enumeration and Generation (listing) Decision (Yes/No) Given G and k is there a k-coloring of G?

02/01/11CMPUT 671 Lecture 114 The Class P P is the set of decision problems for which there exists a polynomial time algorithm. i.e. O(n k ) for some fixed k. n is the size of the input. See Garey and Johnson, Brassard and Bratley, Sipser, Cormen et al.

02/01/11CMPUT 671 Lecture 115 The Class NP NP is the set of decision problems for which there exists a non-deterministic algorithm that solves the yes instances of the problem in polynomial time. (G&J, B&B) The algorithm non-deterministically writes out a solution (certificate) and in time polynomial in the input size verifies that the answer is yes. E.g. Coloring: Certificate= c:V -> {1..k}; verify for each edge e = (u,v), c(u) not = c(v)

02/01/11CMPUT 671 Lecture 116 Class CO-NP The set of problems whose NO instances are solved by a poly-time non-deterministic algorithm; the complement of NP wrt Yes/No In Language Terms Note that P is in the intersection of NP and CO-NP … Why?

02/01/11CMPUT 671 Lecture 117 We no of know certificate we can use to verify that G is not k-colorable in poly-time. The Questions: P ?= NP ?= CO-NP ? The first asks if there is a polynomial time deterministic algorithm to solve all NP problems The second asks is there a polynomial time non- deterministic algorithm to solve all of CO-NP

02/01/11CMPUT 671 Lecture 118 Reductions Polynomial time many one reduction (transformation) from problem P to problem Q f:P->Q Maps instances x in Y(P) iff f(x) in Y(Q) f is computable by a polynomial time deterministic algorithm.

02/01/11CMPUT 671 Lecture 119 Reductions Example: Graph 3-coloring to 3-SAT Can also add 2-clauses restricting each vertex to at most one color

02/01/11CMPUT 671 Lecture 120 Class NPc A subclass of NP, Q in NPc iff for every problem P in NP there is a polynomial time many reduction from P to Q. Cook’s theorem showed that SAT is in NPc. Create a set of clauses which model the possible execution of the NDTM that solves the problem.

02/01/11CMPUT 671 Lecture 121 Showing a Problem is in NPc To show a problem Q is NP-complete Show Q is in NP, that is, specify a certificate that can be verified in polynomial time Choose a problem P in NPc and provide a polynomial time reduction from P to Q. The second alone shows it is NP-hard

02/01/11CMPUT 671 Lecture 122 Only applies to worst case