Complexity, Decidability, Computability and other impossible questions Stephen Dolan, IMSA 2010.

Slides:



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

NP-Completeness.
Complexity Classes: P and NP
Time Complexity P vs NP.
JAYASRI JETTI CHINMAYA KRISHNA SURYADEVARA
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
Theory of Computing Lecture 16 MAS 714 Hartmut Klauck.
Recap CS605: The Mathematics and Theory of Computer Science.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
Humans, Computers, and Computational Complexity J. Winters Brock Nathan Kaplan Jason Thompson.
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
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.
Halting Problem. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have a tool that would warn us.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
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.
Complexity theory and combinatorial optimization Class #2 – 17 th of March …. where we deal with decision problems, finite automata, Turing machines pink.
Lecture 30. P, NP and NP Complete Problems 1. Recap Data compression is a technique to compress the data represented either in text, audio or image form.
1 1. Draw the machine schema for a TM which when started with input 001 halts with abbb on the tape in our standard input format. 2. Suppose you have an.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
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.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
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.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
CS848: Topics in Databases: Foundations of Query Optimization Topics covered  Review of complexity.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Computability Heap exercise. The class P. The class NP. Verifiers. Homework: Review RELPRIME proof. Find examples of problems in NP.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
1 Security through complexity Ana Nora Sovarel. 2 Projects Please fill one slot on the signup sheet. One meeting for each group. All members must agree.
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.
Costas Busch - LSU1 Time Complexity. Costas Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
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.
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.
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.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
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.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
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.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
The NP class. NP-completeness
CSE 105 theory of computation
Chapter 10 NP-Complete Problems.
Part VI NP-Hardness.
NP-Completeness Yin Tat Lee
How Hard Can It Be?.
Halting Problem.
CSC 4170 Theory of Computation The class NP Section 7.3.
Recall last lecture and Nondeterministic TMs
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
Instructor: Aaron Roth
CSE 105 theory of computation
RAIK 283 Data Structures & Algorithms
Presentation transcript:

Complexity, Decidability, Computability and other impossible questions Stephen Dolan, IMSA 2010

Turing machines ● A Turing machine is a guy in a box on an infinite rail of tape. ● He is always in one of a finite number of states ● He decides, based on the current state and what he can see on the tape under the box: ● whether to go left or right ● what symbol (from a finite set) to write to the tape ● what his next state will be

...or whatever ● Lambda calculus ● Most programming languages ● These are all Turing-complete ● According to the Church-Turing thesis, that's all you need to compute anything computable.

Halting ● Turing machines don't necessarily ever halt ● It's impossible to algorithmically determine whether an arbitrary Turing machine will halt ● A problem is decidable (or a function computable) if it's answer can be determined by a Turing machine which halts on all inputs.

Time and space ● For programs (Turing machines) that do terminate, we're interested in: ● How long it takes (how many steps of the machine) ● How much space it needs (how many bits of tape) ● A truly horrible notation known as big-Oh is used to describe complexities

Some examples ● Finding the maximum in a list of n numbers This takes time O(n) (obvious) ● Sorting a list of n numbers This can be done in time O(n lg n) (less obvious) ● Determining whether an n-digit number is prime This can be done in time O(n^5) (not even slightly obvious) ● Given a family of n sets, finding a subset of k of them whose union is as big as the full union. This can definitely be done in O(2^n). Trying to do better is... interesting (more on that later).

Another example: Euclidean geometry ● Euclidean geometry is decidable! ● Proved by Tarski (the same guy responsible for chopping a unit ball into five parts and reassembling into two unit balls) ● But the algorithm has “non-elementary” complexity...

Decision and function problems ● Function problems look harder... ● But decision problems are easier to analyse... ● And it turns out they're (mostly) just as general

Class P P is the set of... decision problems... for which an algorithm (Turing machine) exists... which will solve any instance of the problem... in time O(n k ) for some constant k

Non-determinism ● Non-deterministic Turing machines can guess perfectly ● (or, they evaluate all possible choices)

Class NP NP is the set of... decision problems... for which a non-deterministic Turing machine exists... which will solve any instance of the problem... in time O(n k ) for some constant k

Some observations ● P is a subset-or-equal of NP since you can obviously guess the right answer if there's only one choice ● NP is a subset-or-equal of EXPTIME (problems solvable on a TM in time O(2 n^k ) since on a deterministic TM, you can “guess” by trying every possible answer ● It's known that NP ≠ EXPTIME ● But does P = NP?

A quick aside about “certificates” ● A certificate is a short proof that the answer to a decision problem is “yes” or “no”. ● Certificates can be quickly verified on a deterministic turing machine (i.e. in polynomial time) ● NP is the set of problems to which solutions have certificates. That is, NP is the set of problems whose solutions can quickly verified if you already know the answer.

NP-completeness ● n students want to go to IMSA, but there aren't enough rooms. ● We're going to have to pack k students into one room. ● But certain pairs of students hate each other! ● Give the hate-list, can we find k students to put in a room such that no two of them hate each other?

NP-completeness ● Given a Boolean expression (and, or, not) over several variables, can we find an assignment of “true” and “false” to the variables that makes the whole thing come out “true”?

NP-completeness ● These are known to be the hardest problems in NP ● That is, all problems in NP can be solved on a DTM by solving a polynomial number of instances of any NP-complete problem. ● So, if you can solve any of these questions in polynomial time, then P = NP! ● But nobody has.

Progress towards a proof of whether P = NP None, really.

Progress away from a proof of whether P = NP Much more successful!

Progress away from a proof of whether P = NP ● Relativizing/Algebraizing proofs ● A proof that A = B relativizes iff it still holds for (A with oracle X) = (B with oracle X) ● Most proofs in complexity theory relativize ● No relativizing proof can resolve P=NP ● Algebraizing proofs are a generalisation of relativizing proofs

Questions? Decidable ones only, please