Prabhas Chongstitvatana1 NP-Complete What is an algorithm What is a proof What is a hard problem NP-Complete problems -- practical problems that are strongly.

Slides:



Advertisements
Similar presentations
Problems and Their Classes
Advertisements

Complexity Classes: P and NP
NP-Hard Nattee Niparnan.
Complexity class NP Is the class of languages that can be verified by a polynomial-time algorithm. L = { x in {0,1}* | there exists a certificate y with.
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 
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
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.
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
1 Other Models of Computation. 2 Models of computation: Turing Machines Recursive Functions Post Systems Rewriting Systems.
Analysis of Algorithms CS 477/677
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
NP-complete and NP-hard problems. Decision problems vs. optimization problems The problems we are trying to solve are basically of two kinds. In decision.
Introduction to Computer Science. A Quick Puzzle Well-Formed Formula  any formula that is structurally correct  may be meaningless Axiom  A statement.
MCS312: NP-completeness and Approximation Algorithms
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:
CSCE350 Algorithms and Data Structure
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.
MS 101: Algorithms Instructor Neelima Gupta
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
Unsolvability and Infeasibility. Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
CSC 413/513: Intro to Algorithms NP Completeness.
CSE 3813 Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
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.
CS 345: Chapter 8 Noncomputability and Undecidability Or Sometimes You Can’t Get It Done At All.
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.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Great Theoretical Ideas in Computer Science.
NP-Algorithms Tractable vs Intractable Some problems are intractable: as they grow large, we are unable to solve them in reasonable time.
Computation Motivating questions: What does “computation” mean? What are the similarities and differences between computation in computers and in natural.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
NP-Completeness  For convenience, the theory of NP - Completeness is designed for decision problems (i.e. whose solution is either yes or no).  Abstractly,
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
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.
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 NP class. NP-completeness
NP-Complete Problems.
P & NP.
Chapter 10 NP-Complete Problems.
Computable Functions.
EMIS 8373: Integer Programming
Other Models of Computation
Analysis and design of algorithm
ICS 353: Design and Analysis of Algorithms
Chapter 34: NP-Completeness
CS 583 Fall 2006 Analysis of Algorithms
Chapter 11 Limitations of Algorithm Power
Prabhas Chongstitvatana
Prabhas Chongstitvatana
Algorithms CSCI 235, Spring 2019 Lecture 36 P vs
Presentation transcript:

Prabhas Chongstitvatana1 NP-Complete What is an algorithm What is a proof What is a hard problem NP-Complete problems -- practical problems that are strongly suspected to be computationally hard.

Prabhas Chongstitvatana2 Computability theory : When can this be computed? Can this be computed at all? Complexity theory : How cheaply can this be computed? How hard is this to compute? Inconsistencies 1900 Georg Cantor, invented set theory.

Prabhas Chongstitvatana3 August, 1900, The Second International Congress of Mathematicians in Paris. Hilbert, formalist school of mathematic, manipulated symbols by fixed rules without thinking of any possible meaning the symbols could have. Strict formalism, by not letting semantic interpretations influence how or when rules are applied, supposedly guarantees that whenever we prove something we are sure it is correct.

Prabhas Chongstitvatana4 Formal system A formal system is a finite set of assumed truths, called axioms, and a finite set of rule, called inference rules. We can use the rules on the axioms to infer new results called theorems. A proof of a theorem is a demonstration of a sequence of inferred theorems starting only with the axioms and using only the inference rules and ending with the theorem.

Prabhas Chongstitvatana5 One of Hilbert’s problem was to establish that arithmetic was consistent, meaning that, under the accepted rules of arithmetic, it is not possible to generate a contradiction Kurt Godel (24), showed that if any system as "powerful" as arithmetic is consistent, then it cannot be complete -- meaning that some true statements are unprovable in the system!

Prabhas Chongstitvatana6 Today we don't know whether arithmetic is consistent; all we can say is that if it is, then there are true things we cannot prove in it. This is similar to the uncertainty principle in quantum mechanics, Heisenberg Hilbert's continuum problem : Cantor, there is more than one infinity. Using the proof called diagonalization, Cantor showed that there were more real numbers than there were integers. But no one knew if there were an infinity between the number of integers and the number of reals.

Prabhas Chongstitvatana7 r 0 = 0.d 00 d 01 d r 1 = 0.d 10 d 11 d r 2 = 0.d 20 d 21 d r n = 0.d n0 d n1 d n2...d nn... diagonal d 00 d 11 d 22 d nn... change each digit into the "opposite". This will be a new number not in the original listing. | N | < | R | Are there any thing between | N | < | S | < | R | ?

Prabhas Chongstitvatana Godel showed that it couldn't be proved false from Cantor's axioms of set theory Cohen showed that it couldn't be proved true from Cantor's axioms. The continuum hypothesis is independent of the usual axioms of set theory. If set theory is consistent to begin with, then we can assume the continuum hypothesis true or false and still have a consistent set theory!

Prabhas Chongstitvatana9 The formalist school was resisted by a group of mathematicians called constructivists (intuitionists) who wanted to toss infinite sets and rebuild mathematics from the bottom up starting from the integers and applying only finite operations to them.

Prabhas Chongstitvatana10 Model of computation Another Hilbert's problem was to find a "finitary way" to solve any diophantine equation. A diophantine equation is a polynomial equation in n unknowns that can have only integer solutions. Hilbert wanted an "algorithm" (not yet invented the name) 1970 Matijasevic (22) showed, using fibonacci numbers, that this problem is computationally unsolvable.

Prabhas Chongstitvatana11 Turing machine, Alan Turing (24) 1936 Herbrand functions, Jacques Herbrand Godel functions, Kurt Godel Church calculus, Alonzo Church Kleen functions, Stephen Kleen Post systems, Emil Post Markov algorithms, Andrei Markov same computational ability

Prabhas Chongstitvatana12 Hilbert's problem : the decision problem -- asked whether there is an algorithm deciding the truth of falsify of any mathematical statement. Church and Turing, 1936, no such algorithm exists. The result is provable from Godel's work on incompleteness in What it meant for something to be computable.

Prabhas Chongstitvatana13 Traveling salesman problem Knapsack problem Graph coloring problem Are some problems harder than the other? Which ones? How much harder are they? 1965 Edmonds, Cobham, definition of a feasible problem : A problem is feasible if it has a solution whose cost is at most polynomial.

Prabhas Chongstitvatana14 Why polynomial Polynomials are closed under composition and addition All sequential digital computers are polynomially related In general, a polynomial algorithm will do a feasible amount of work.

Prabhas Chongstitvatana Dantzig, algorithm for optimize linear programs, simplex. Simplex worst cost is exponential in the number of variables Hacijan (kah-chi-yan) proved that an algorithm, ellipsoid algorithm, is polynomial. (multidimensional binary search) Karmakar, projective scaling, improved ellipsoid to run well in practice. Karmakar's algorithm is polynomial. Although Simplex is exponential, the linear programming problem is polynomial.

Prabhas Chongstitvatana16 NP-completeness polynomial time algorithm O( n^k ) = tractable superpolynomial time algorithm = intractable

Prabhas Chongstitvatana17 Class of problems NP-complete, status unknown No polynomial time algorithm has yet been discovered for any NP-complete problem. P != NP question (posed 1971) Believe NP-complete problems are intractable

Prabhas Chongstitvatana18 If any single NP-complete problem can be solved in polynomial time, then every NP- complete problem has a polynomial time algorithm. problem -> NP-complete -> approximate algorithm

Prabhas Chongstitvatana19 Define complexity P (formal language) complexity NP : decision problem where solutions can be verified in polynomial time. (more work on this slide)

Prabhas Chongstitvatana20 Abstract problems Binary relations of a set of problem instances to a set of solutions. Theory of NP-completeness restricts to decision problem : yes/no answer. Example Shortest Path Give a graph G = (V,E) and u, v in V, non negative integer k, does a path exist in G between u and v whose length is at least k?

Prabhas Chongstitvatana21 Cast optimization problems to decision problems by imposing a bound on the value to be optimized.

Prabhas Chongstitvatana22 Encoding An encoding of a set S of abstract object is a mapping e from S to the set of binary string. A problem whose instance set is the set of binary strings is called a concrete problem. An algorithm "solves" a concrete problem in O(T(n)) if when it is provided a problem instance i of length n = | i | the algorithm can produce the solution in at most O(T(n)).

Prabhas Chongstitvatana23 Complexity class P; the set of concrete decision problem that are solvable in polynomial time. Encoding map abstract problem Q to concrete problem. If solution to an abstract problem i in I is Q(i) in {0,1}, then the solution to the concrete problem instance e(i) in {0,1}* is also Q(i).

Prabhas Chongstitvatana24 We would like the definition to be independent of any particular encoding. An algorithm with the only input k is running in time Zeta(k) if k is unary ( a string of 1's ) its running time is O(n) if k is binary n = ceil( lg k) its running time is Zeta(2^n)

Prabhas Chongstitvatana25 A function f : {0,1}* -> {0,1}* is polynomial time computable if there exists a polynomial time algorithm A that, given input x in {0,1}*, produces as output f(x). For some set I of problem instances, two encoding e 1 and e 2 are polynomially related if there exist two polynomial time computable functions f 12 and f 21 such that for any i in I, we have f 12 (e 1 (i)) = e 2 (i) and f 21 (e 2 (i)) = e 1 (i).

Prabhas Chongstitvatana26 That is, encoding e 2 (i) can be computed from the encoding e 1 (i) by a polynomial time algorithm, and vice versa. Lemma 36.1 Let Q be an abstract decision problem on an instance set I, and let e 1 and e 2 be polynomially related encodings on I. Then, e 1 (Q) is-in P if and only if e 2 (Q) is-in P.

Prabhas Chongstitvatana27 “Standard” encoding we shall generally assume that problem instances are encoded in any reasonable, concise fashion. Encoding of an integer is polynomially related to its binary representation. Encoding of a finite set is polynomially related to its encoding as a list of elements.

Prabhas Chongstitvatana28 Formal language framework An algorithm A accepts a string x in {0,1}* if, given input x, the algorithm outputs A(x) = 1. The language accepted by an algorithm A is the set L = { x in {0,1}* | A(x) = 1 }. An algorithm rejects a string x if A(x) = 0.

Prabhas Chongstitvatana29 A language L is decided by an algorithm A if every binary string is either accepted or rejected by the algorithm. A language L is accepted in polynomial time by an algorithm A if for any length-n string x in L, the algorithm accepts x in time O(n^k) for some constant k. A language L is decided in polynomial time by an algorithm A if for any length-n x in {0,1}*, the algorithm decides x in time O(n^k) for some constant k.

Prabhas Chongstitvatana30 Complexity class P P = {L subset {0,1}* | there exists an algorithm A that decides L in polynomial time}. Theorem 36.2 P = {L | L is accepted by a polynomial time algorithm}.

Prabhas Chongstitvatana31 Polynomial time verification Hamiltonian cycles Does a graph G have a Hamiltonian cycle? HAM-CYCLE = { | G is hamiltonian grah } How an algorithm decide the language HAM- CYCLE?

Prabhas Chongstitvatana32 Given a problem instance, lists all permutations of the vertices of G and then checks each permutation. With "reasonable" encoding of a graph as its adjacency matrix, the number m of vertices in the graph is Ohmega(sqrt(n)), n = | | is the length of the encoding of G. The running time is Ohmega(m!) = Ohmega(sqrt(n)!) = Ohmega( 2 ^ sqrt n).

Prabhas Chongstitvatana33 Another easier problem : Given a graph G, claims to be hamiltonian with the prove as a list of vertices. It is easy to verify the proof by checking if the given list of vertices is a permutation of the vertices of V and whether each of the consecutive edges along the cycle actually exists in the graph. O(n^2). Thus a proof that a hamiltonian cycle exists in a graph can be verified in polynomial time.

Prabhas Chongstitvatana34 Define a verification algorithm, A, a two- argument algorithm, an input string x and a binary string y called a certificate. A verifies an input x if there exists a certificate y such that A(x,y) = 1. The language verified by a verification algorithm A is L = { x in {0,1}* | there exists y in {0,1}* such that A(x,y) = 1 }.

Prabhas Chongstitvatana35 An algorithm A verifies a language L if for any string x in L, there is a certificate y that A can use to prove that x is-in L.