**Lecture 1**(07/01/2002)

Handouts:Note 1, Appendix A, Exercise Sheet 1.

Brief history. Discussion of general issues and notation for a general theory of computing. Proof that non-termination is an inherent feature of such a theory. Proof that the halting problem is unsolvable. Discussion of relevance to computational concerns such as program verification. Notion of diagonalization.

**Lecture 2**(10/01/2002)

Handouts:None.

Discussion of how to compare sizes of infinite sets (with two examples). Cantor's diagonalization proofs (reals and powersets); significance for theory of computation. Russell's paradox in set theory. Goedel's theorem that there are true statements that are unprovable.

**Lecture 3**(14/01/2002)

Requirements for formal models of computing. Turing's thesis, Turing machines (intuitive and formal definition), configurations, computation, TM's as accepters and as transducers, complete example of a TM design (recognizing the language of binary strings of form 0^n1^n for all n>=0).

**Lecture 4**(17/01/2002)

Handouts:Note 4.

Variations on standard Turing machines: doubly infinite tape, several tapes and heads, two-dimensional page rather than a tape, several scanning heads on the same tape. Detailed proof that TM's with doubly infinite tape are equivalent to standard ones, sketch proof for the version with several tapes.

**Lecture 5**(21/01/2002)

Handouts:Note 5. Appendix B , Appendix C .

Random access machines (RAMs), syntax, semantics, state, configuration. Example: recognizing a^nb^n, where n>=0. Convention for encoding alphabets. Bounded RAMs. Equivalence of Turing Machines and RAMs (discussion of results, no proofs). Recursively enumerable languages. Proof that bounded RAMs cannot recognize palindromes.

**Lecture 6**(24/01/2002)

Handouts:Note 6.

Universal Turing machines (i.e., TMs as stored program computers): binary TMs, encoding of these, design af a UTM to simulate an arbitrary encoded binary TM on an arbitrary input for it. Example of this process.

**Lecture 7**(28/01/2002)

Handouts:Note 7.

The halting problem: simulation of a TM by a binary one, encoding of binary TM as a binary word, halting problem expressed as a language recognition problem, proof that the halting problem is unsolvable. Division of languages into recursive, r.e. and non-r.e. An explosive function (grows faster than any computable function). Brief discussion of the difference between the description of a function and attempts to compute it (mention of Sturm's algorithm from Note 1).

**Lecture 8**(31/01/2002)

Handouts:Note 8, Exercise Sheet 2.

Reductions and their use in extending our knowledge of non-recursive languages; a simple example. The uniform halting problem, the non-emptyness problem for r.e. languages. Number theory: a simple first order arithmetic and Goedel's Incompleteness theorem.

**Lecture 9**(04/02/2002)

Handouts:Note 9.

Results about recursive and r.e. languages and connections. Proof that L_loop is not r.e. The uniform halting problem, discussion of why it is not so easy to prove that it is not r.e., proof that it is not r.e. by a reduction from L_loop. Discussion of proof systems for the uniform halting problem and why there cannot be one that is both sound and complete.

**Lecture 10**(07/02/2002)

Handouts:Note 10.

Computing against the clock, polynomial time bounded TMs, the class P, brief discussion of its significance. Polynomial time reductions, the problems Sat and Clique, reduction of Sat to Clique.

**Lecture 11**(11/02/2002)

Handouts:Note 11.

Properties of polynomial time reductions, relevance to P. Discussion of naive search, examples that avoid this, general question and how to phrase this precisely, leading to nondeterministic turing machines. Detailed example of a NTM illustrating all possible computations on an input as a tree. Simulating NTMs by (deterministic) TMs. The language class NP and its significance, examples of languages in NP.

**Lecture 12**(14/2/2002)

Handouts:Note 12.

Recapitulation of NP and the reasons for studying it as well as P. Statement and preparatory work for Cook's Theorem. Proof of Cook's Theorem with examples illustrating various parts.

**Lecture 13**(18/02/2002)

Handouts:Note 13,

More NP-complete problems. Discussion of proofs of NP-completeness for Independent Set, Vertex Cover (exercise), 3-Sat. Started discussion for Undirected Hamiltonian Cycles, with illustrations.

**Lecture 14**(21/02/2002)

Handouts:Exercise Sheet 3.

More NP-complete problems. Discussion of proofs of NP-completeness for Directed Hamiltonian Cycles (statement only), Undirected Hamiltonian Cycles. Colourability.

**Lecture 15**(25/2/2002)

Handouts:None.

Integer Programming, Subset Sum. Discussion of the landscape of P and NP (i.e., either P=NP or there are intermediate languages; no proof!).

**Lecture 16**(28/02/2002)

Handouts:Note 14.

First order logic and graphs. Proof that all first order logic problems on graphs are in P. Proof that first order logic does not capture P (on graphs) by showing that Reachability is not expressible in first order logic. Implications for databases.

**Lecture 17**(4/3/2002)

Handouts:None.

Existential second order logic. Expressing Reachability and DHC. Fagin's Theorem. NP and co-NP. Brief description of complexity classes (logarithmic and polynomial space) and how they fit in with P, NP.

Kyriakos Kalorkoti, JCMB 2612, kk@dcs.ed.ac.uk