CMPT 308 — Computability and Complexity Fall 2004 Instructor: TA: Andrei Bulatov, email: abulatov@cs.sfu.ca Ramsay Dyer, email: rhdyer@cs.sfu.ca Learning resources: • Prerequisites: MACM 201 • Lectures: MWF 10:30 – 11:20, in WMX 3210 (37 lectures) • Course Text: Introduction to the Theory of Computation by Mike Sipser • Instructor’s office hours: W 13:00 – 14:00 in ASB 10855, or by appointment • Assignments: 5 sets of exercises, solutions to the first one are due to Sept 29th • TA’s office hours: TBA Course web page: www.cs.sfu.ca/~abulatov/CMPT308 Marking scheme: • 5 homework assignments, worth 6% each • midterm, worth 30%, and • final exam, worth 40% Computability and Complexity 1-1 Introduction Introduction Computability and Complexity Andrei Bulatov Computability and Complexity Fundamental Questions A computer scientist might be expected to have answers to some Fundamental questions such as • What is a computer ? • What problems can computers solve? • Can these problems be classified ? 1-2 Computability and Complexity 1-3 Problems Given 2 collections of DNA sequences {a1 , a2 ,, ak } and {b1 , b2 ,, bk } 1. What is the shortest DNA sequence that contains all of a1 , a2 ,, ak and b1 , b2 ,, bk as subsequences? 2. What is the shortest DNA sequence, formed by overlapping elements from these sets, which begins with a1 and ends with bk ? 3. Is there a set of indices i1 , i2 ,, in such that ai1 ai2 aik bi1 bi2 bik 4. Can each ai be paired with a distinct b j in such a way that ai and b j are 99% identical? How many ways can this be done? Computability and Complexity Comments • Three of these examples are problems that can be solved by a computer • One is “easy”; the other two are “hard” • The other example cannot be solved by any known computer 1-4 Computability and Complexity More examples • Computer viruses: Write a program that prints its own source code easy • Perfect virus detection software: Write a program that detects whether any given program prints its own text impossible • Can mathematics be automatized? Does there exist a computer program that would distinguish true mathematical statements from false ones? impossible 1-5 Computability and Complexity Aims This course is designed to enable you to: 1. State precisely what it means for a problem to be computable, and show that some problems are not computable 2. State precisely what it means to reduce one problem to another, and construct reductions for simplest examples 3. Classify problems into appropriate complexity classes, and use this information effectively 1-6 Computability and Complexity Prehistory 1900 1928 1933 Hilbert’s program Gödel’s Incompleteness Theorem Formalize mathematics and establish that: • Math is consistent: a mathematical statement and its negation cannot ever both be proved • Math is complete: all “true” mathematical statements can be “proved” • Math is decidable: there is a mechanical rule to determine whether a given mathematical statement is “true” or “false” Even for arithmetic at most one of the first two properties can be reached 1-7 Computability and Complexity 1-8 The Machine 1936 1937 1945 1951 Turing Machine Undecidability of Logic First digital computer Recursive Functions Markov’s algorithms 1960 Computability and Complexity 1-9 Complexity Measures and Non-Determinism 1960 1970 1971 1975 Complexity Measures, Birth of CC Study of Complexity Measures Main Complexity Classes P=NP Question Cook-Levin’s Theorem NP-complete problems Computability and Complexity 1-10 Other Computational Models 1970 1980 1985 1997 Shor’s integers factoring New computational models introduced: Probabilistic Algorithms Approximation Algorithms Interactive Algorithms Cryptography Quantum algorithms Computability and Complexity Course Outline • Turing Machine and other computational models • Theory of Computability and Undecidable problems • First Order Logic and Gödel’s Incompleteness Theorem • Complexity Measures and Complexity classes • Time Complexity, classes P and NP • Space Complexity, classes L and PSPACE • Probabilistic and Approximation algorithms • Interactive Computation and Cryptography 1-11 1. 2. 3. 4. 5. Is the relation {(a,b),(b,a)} on {a,b} symmetric? Is the function f from {1,2,3} to {a,b} defined by f(1)=a, f(2)=b, f(3)=a bijective? Can one make a list of all real numbers? Is the language {( ab) n | n natural} regular? Is the graph bipartite? 6. How many edges has a 6-vertex tree? 7. Does the graph 8. 9. contain a 4-clique? Is ( x y ) ( x y ) a CNF? Is x ( x y ) equivalent to x? y?