Complexity theory and combinatorial optimization Class #2 – 17 th of March …. where we deal with decision problems, finite automata, Turing machines pink dogs, …. But also P, NP, NP-completeness, …..
Introduction to computational intractability Is my problem efficiently solved by a computer? an automatic machine an algorithm?
What’s a problem? Decision problems:each instance is a question Formal definition with language theory More natural problems: “meta-language” encoding scheme That is the problem ….
What’s an algorithm? The pink dog question Does a pink dog exist?Does a pink dog exist (outside London)? Since the answer is yes, it can be answered Since there are only a finite number of dogs (outside London) and since for each one a can decide whether it is pink or not it can be answered. Will be ever exist any pink dog outside London? To answer it one needs a formal model of dogs.
What’s an algorithm? Computability models o Lambda-calculus (A. Church, 1931) o General recursive functions (K. Gödel, 1934) o Turing machines (A. Turing, 1936) o Random-Access Machines, … Church thesis Before the first computer The pink dog question
What’s an algorithm: the Turing machine model From finite states automaton ….. to Turing machines 1-tape (deterministic) Turing Machine (DTM) multi-tape Turing machines non-deterministic Turing machines (NDTM) o transition function transition relation o put non-determinism at the beginning equivalence between all these Turing machines models universal Turing Machine Example
Problems solved by Turing machines Is L recognized by M? Is L decided by L? The halting problem: an example of undecidable problem M: DTM, L a language on the same input alphabet Decision problem solved by an algorithm? (through an encoding scheme)
Complexity of Turing machines Complexity of DTM (halting for each instance) Complexity of NDTM Polynomial-time: considered as efficiency (Cobham-Edmond’s thesis) Difference between DTM and NDTM (from complexity point of view) From languages to problems (reasonable encoding schemes) A notion of efficiency
P, NP and NP-completeness The class P The class NP Exponentially solving problems in NP Polynomial reductions NP-complete problems
Some NP-complete problems SAT Cook’s theorem (1971) How to prove NP-completeness after Cook? 3-SAT to be continued during the next class
Enjoy your vacation
01100 b b b b b b … q0q0 q1q1 q1q1 q2q2 qNqN An Example of 1-tape Deterministic Turing Machine
01110 b b b b b b … q0q0 q1q1 q1q1 q2q2 q2q2 q2q2
1110 b b b b b b … q4q4 q4q4 q4q4 q4q4 q3q3 q2q2 b
b110 b b b b b b … q4q4 q0q0 q1q1 q2q2 q2q2 b
b11 b b b b b b … q4q4 q4q4 q3q3 q2q2 bb
b1b b b b b b b … q4q4 q0q0 qNqN b
b110 0 b b b b b … q0q0
b110 b b b b b b … q4q4 q4q4 q4q4 q3q3 q2q2 b
b1b0 b b b b b b … q4q4 q0q0 q1q1 q2q2 b
b1b b b b b b b … q3q3 q3q3 q2q2 b b
bbb b b b b b b … q3q3 q0q0 qYqY b What is the accepted language?