12/3CSE 202 - NP-complete CSE 202 - Algorithms NP Completeness Approximations.

Slides:



Advertisements
Similar presentations
NP-Hard Nattee Niparnan.
Advertisements

Polynomial-time reductions We have seen several reductions:
Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
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 
Great Theoretical Ideas in Computer Science for Some.
© The McGraw-Hill Companies, Inc., Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Computational problems, algorithms, runtime, hardness
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
1 Lecture 26 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
CSE Shortest Paths1 Midterm page 1 The worst-case complexity of an algorithm is... a function from N (or size of instance) to N.  (n lg n) is...
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Analysis of Algorithms CS 477/677
CSE Algorithms Minimum Spanning Trees Union-Find Algorithm
1 Lecture 23 Decision problems about regular languages –Programs can be inputs to other programs FSA’s, NFA’s, regular expressions –Basic problems are.
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
11/26/02CSE FFT,etc CSE Algorithms Polynomial Representations, Fourier Transfer, and other goodies. (Chapters 28-30)
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
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.
5/27/03CSE Shortest Paths CSE Algorithms Shortest Paths Problems.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
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.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
Design Techniques for Approximation Algorithms and Approximation Classes.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Great Theoretical Ideas in Computer Science.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
Approximation Algorithms
CSC 413/513: Intro to Algorithms NP Completeness.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
Polynomial-time reductions We have seen several reductions:
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
CSC401: Analysis of Algorithms CSC401 – Analysis of Algorithms Chapter Dynamic Programming Objectives: Present the Dynamic Programming paradigm.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
MS 101: Algorithms Instructor Neelima Gupta
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Unit 9: Coping with NP-Completeness
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
Discrete Optimization Lecture 6 – Part 2 M. Pawan Kumar
LIMITATIONS OF ALGORITHM POWER
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
11/21/02CSE Max Flow CSE Algorithms Max Flow Problems.
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.
Great Theoretical Ideas in Computer Science.
Discrete Optimization MA2827 Fondements de l’optimisation discrète Material from M. Pawan Kumar, E. Demaine.
The NP class. NP-completeness
More NP-Complete and NP-hard Problems
Computational problems, algorithms, runtime, hardness
NP-Completeness Yin Tat Lee
CSE Algorithms Max Flow Problems 11/21/02 CSE Max Flow.
Linear Programming Duality, Reductions, and Bipartite Matching
CPS 173 Computational problems, algorithms, runtime, hardness
NP-Completeness Yin Tat Lee
Presentation transcript:

12/3CSE NP-complete CSE Algorithms NP Completeness Approximations

CSE NP-complete2 Decision Problems Instance: an input, an output, and a size. Problem: a set of instances. Decision Problem: Problem where each instance’s output is “T” or “F”. “Given graph G and nodes x and y, what is the shortest path from x to y?” is not a decision problem. “Given G, x, y, and k, is there a path from x to y of length  k?” Usually, given an algorithm for a decision problem, one can use it to solve the associated optimization problem. –E.g., use binary search: “Is there a path of length  50?”, “  25?“, “  37?“,.... (You know this already.)

CSE NP-complete3 Reductions Given two decision problems A and B, we say that a function f from A to B is a reduction of A to B if, for every instance x in A, x is true if and only if f(x) is true. We write A  B, and say A is reducible to B. A B x f(x) {T,F} f an instance of problem A instance of B

CSE NP-complete4 Example of reductions We’ve seen: –how to reduce a maximum matching problem on bipartite graph to a max flow problem. –how to reduce a general maximum matching problem to linear programming. Except for 2 trivial problems, every computable function is reducible to every other computable function. –Let b T be a true instance of B & b F a false instance. –Given instance x of problem A, f could figure out the answer, then return b T if x is true, b F otherwise. Mathematicians use reductions to study uncomputable functions (like the halting problem). “Always True” & “Always False”

CSE NP-complete5 Polynomial Time Reducibility In computer science, we limit how much work f can do. –Typically, f must be a polynomial-time algorithm. –We write A  p B, and say “A is polynomial-time reducible to B” or “A is no harder than B”. If A  p B, can we conclude B  p A ?? –Isn’t f -1 is a reduction of B to A? (Give two reasons this doesn’t work) IMPORTANT! To show A  p B, we must show: for every instance x of A, how to construct an instance f(x) of B relatively quickly (i.e. in polynomial time), and if f(x) is true, then x is true, and if f(x) is false, then x is false.

CSE NP-complete6 Typical Garey&Johnson Style Entry Actually from Name: 3-Dimensional Matching (3DM) [SP1] 3 Input: –3 disjoint sets X, Y, and Z each comprising exactly n elements; –a set M of m triples {(x i, y i, z i ): 1  i  m} such that x i is in X, y i in Y, and z i in Z, i.e. M is a subset of X x Y x Z. Question: Does M contain a matching? –i.e. is there a subset Q of M such that |Q|=n and for all distinct pairs of triples (u,v,w) and (x,y,z) in Q, u  x, v  y and w  z. Comments: The variant 2-dimensional matching in which 2 disjoint sets X and Y form the basis of a set of pairs, can be solved by a number of fast methods.

CSE NP-complete7 Glossary (in case symbols are weird)            subset  element of  infinity  empty set  for all  there exists  intersection  union  big theta  big omega  summation  >=  <=  about equal  not equal  natural numbers(N)  reals(R)  rationals(Q)  integers(Z)