Theory of Computation
Aug - Nov 2023

Lectures

Following is an outline of lectures given along with references and links to additional reading.

Lec 1 (14 Aug, Mon) : Administrative information. What is Computation ? Brief background and History. Motivation via questions in geometric (Ruler and Compass) constructions. Constructible numbers.

Reading : A very detailed and informative account on the connection of Theory of Computing to mathematics and other areas can be found here. Do checkout chapter 20 !

Lec 2 (16 Aug, Wed) : Overview of models of computation. Finite automata, Push down automata, Turing machines. Example of Air Cooler as a model. What can and cannot be computed ? Practical relevance to these questions via two more motivating scenarios - checking program equivalence, minimizing space for storing multiplication tables.

Reading : Kozen Lec 1. This paper introduces the Turing machine model. It is well written and worth a read !

Lec 3 (17 Aug, Thu) : Problems vs Languages. Alphabets and Strings. Formulating problems as languages. Informal introduction to finite automata. Worked out examples.

Reading : Kozen Lec 2 and 3.

Lec 4 (18 Aug, Fri) : Informal explanation on working of a finite automata. Construction of Finite automata for languages - all binary strings, empty set, strings with prefix/suffix 01, strings with length being a multiple of $3$. Need for a formal definition and proof of correctness.

Reading : Kozen Lec 2 and 3.

Lec 5 (21 Aug, Mon) : Formal definition of deterministic finite automata. Transition function and extended transition function. Formal definition of the language accepted by DFA. Using the formalism introduced to prove correctness of the automata construction for strings whose length is a multiples of $3$.

Reading : Kozen Lec 2 and 3.

Lec 6 (23 Aug, Wed) : Automata accepting binary strings whose decimal representation is a multiple of $3$. Proof of correctness. Automata for union, intersection and complement. Proof of correctness.

Reading : Kozen Lec 4

Lec 7 (24 Aug, Thu) : Tutorial session (Non-evaluated).

Lec 8 (25 Aug, Fri) : More operations - Concatenation of languages and reversal of a language. Choice automata - relaxations to deterministic finite automata.

Reading : Kozen Lec 5, 6

Lec () (28 Aug, Mon) : Holiday due to Recess 1

Lec 9 (30 Aug, Wed) : (9-10 AM) Examples of choice automata accepting languages. Choice trees - understanding how a choice automata works. When does a Choice automata accept/reject a string ?

Reading : Kozen Lec 6

Lec 10 (30 Aug, Wed) : (11-12 PM) What is non-determinism ? Formal definition of a non-deterministic finite automata (NFA). Extended transition function of an NFA and acceptance.

Reading : Kozen Lec 5, 6

Lec 11 (01 Sep, Fri) : Tutorial test 1 - Lectures 1 to 9

Lec 12 (02 Sep, Sat) : NFA for concatenation of languages (accepted by DFA), Reversal of a language and star closure. Construction and correctness arguments.

Reading : Kozen Lec 6

Lec 13 (04 Sep, Mon) : Star closure. Issues with the naive attempt. Final constructions. Making a non-deterministic finite automata deterministic - subset construction. Worked out example.

Reading : Kozen Lec 6

Lec 14 (06 Sep, Wed) : Regular languages and regular expressions - Definitions. Worked out examples.

Reading : Kozen Lec 7,8

Lec 15 (07 Sep, Thu) : Regular expressions, Kleene Algebra, simplification and equivalence of regular expressions. Obtaining an NFA from regular expressions.

Reading : Kozen Lec 9

Lec 16 (08 Sep, Fri) : Languages accepted by finite automata are precisely regular languages. Understanding regular languages, languages accepted by DFA and NFA via the lens of set operations seen so far. Obtaining a regular expression from NFA - outline of algorithm.

Reading : Kozen Lec 8

Lec 17 (11 Sep, Mon) : Worked out example of obtaining regular expression from NFA. Application of rules of simplification from Kleene algebra.

Reading : Kozen Lec 9

Lec 18 (13 Sep, Wed) : Tutorial test 2 - Lecture 10 to 16.

Lec 19 (14 Sep, Thu) : Statement of Arden's lemma (without proof). Using the lemma to do obtain regular expression from finite automata. Existence of non-regular languages - cardinality argument. Pumping lemma - statement and game version.

Reading : Kozen Lec 11

Lec () (15 Sep, Fri) : Tutorial session (Non evaluated). Cancelled due to IAC. To be compensated.

Lec 20 (18 Sep, Mon) : Quiz 1 (Slot swapped with M1)

Reading :

Lec 21 (20 Sep, Wed) : Pumping lemma - game version. Two worked out examples showing non-regularity of languages using pumping lemma.

Reading : Kozen Lec 11, 12

Lec 22 (21 Sep, Thu) : Using closure properties in proving non-regularity. More on non-determinism - Bitwise OR of two regular languages is regular.

Reading : Kozen Lec 11

Lec 23 (22 Sep, Fri) : $\mathsf{FirstHalves}$ of a regular language is regular. NFA construction - based on pebbles.

Reading : Kozen pg. 358, solution to question 26.

Lec 24 (25 Sep, Mon) : Correctness of construction for $\mathsf{FirstHalves}$. Formal description.

Reading : Kozen pg. 358. For a general method, see Kozen pg. 322.

Lec 25 (27 Sep, Wed) : Single alphabet deletion operation on regular language is regular. Correctness argument via pebbles.

Reading : Class notes. For a general method, see Kozen pg. 322.

Lec () (28 Sep, Thu) : Holiday due to Milad-un-Nabi

Lec 26 (29 Sep, Fri) : Formal automata description for single alphabet deletion. Compensatory Tutorial session (Non-evaluated) - Discussion on Quiz 1

Lec () (02 Oct, Mon) : Holiday due to Gandhi Jayanti

Lec 27 (04 Oct, Wed) : Showing that regularity via structural induction - subsequence of a regular language is regular.

Reading : Class notes

Lec 28 (05 Oct, Thu) : DFA minimization algorithm. When can two states be collapsed. Worked out example. Correctness and termination.

Reading : Kozen Lec 13

Lec 29 (06 Oct, Fri) : Description of the minimized DFA. Uniqueness of the minimum DFA. Relations over $\Sigma^*$ given a DFA for odd number of 1's. Obtaining equivalence relations from DFA. Right congruence and refinement property (informal descriptions). Myhill-Nerode relations.

Reading : Kozen Lec 13, 14

Lec 30 (09 Oct, Mon) : Tutorial session (Non-evaluated) on pumping lemma, showing regularity (via NFA construction) and DFA minimization.

Lec 31 (11 Oct, Wed) : Obtaining equivalence relations from DFA. Right congruence and refinement property. Myhill-Nerode relations. Examples. Index of a Myhill-Nerode relation. From DFA with no inaccessible states to Myhill-Nerode relations of finite index - construction and correctness. Myhill-Nerode relations of finite index to DFA - construction and correctness. Maps are inverses of each other.

Reading : Kozen Lec 13, 14

Lec 32 (12 Oct, Thu) : Tutorial Test 3 - Lectures 21 to 30

Lec 33 (13 Oct, Fri) : Comparing two Myhill-Nerode relations. Notion of Refinement. Coarse and fine relations wrt refinements. Finest and coarsest relations. Definition of -$\equiv_L$ - coarsest Myhill-Nerode relation. An if and only if condition for a language to be regular - Myhill-Nerode theorem.

Reading : Kozen Lec 15

Lec 34 (16 Oct, Mon) : Obtaining the equivalence classes corresponding to the coarsest Myhill-Nerode relation $\equiv_L$ for $L=(0+1)^*01$.

Reading : Kozen Lec 15, 16

Lec 35 (18 Oct, Wed) : Completed obtaining the equivalence classes. Obtaining the equivalence classes by constructing the minimal DFA - example. Myhill-Nerode equivalence classes for language where strings start and end with the same symbol.

Reading : Kozen Lec 16

Lec 36 (19 Oct, Thu) : Tutorial session (Non-evaluated) - On Myhill Nerode relations.

Lec 37 (20 Oct, Fri) : (9-10 AM) Using Myhill-Nerode relations to show non-regularity. Coarsest Myhill-Nerode relation for regular languages and its connection to DFA minimization.

Reading : Kozen Lec 16

Lec 38 (20 Oct, Fri) : (10-11 AM) Two way DFAs - Formal definition, language accepted by a 2DFA. 2DFAs can only accept regular languages - towards a Myhill-Nerode relation of finite index from a 2DFA.

Reading : Kozen Lec 17, 18

Lec () (23 Oct, Mon) : Holiday due to Recess 2.

Lec 39 (25 Oct, Wed) : Completed the proof of obtaining a Myhill-Nerode relation of finite index from a 2DFA.

Reading : Kozen Lec 18

Lec 40 (26 Oct, Thu) : Tutorial Test 4 - Lectures 29 to 38

Lec 41 (27 Oct, Fri) : Introduction to Context-free languages. Four examples. Derivation trees. Ambiguity.

Reading : Kozen Lec 19

Lec 42 (30 Oct, Mon) : Quiz 2 (swapped with M1 slot)

Reading :

Lec 43 (01 Nov, Wed) : Formal definition of Context-free languages. Languages generated by a context-free language. Showing that a language is context free by generating grammar. Proving corrections via induction.

Reading : Kozen Lec 19

Lec 44 (02 Nov, Thu) : Context-free grammar for the language consisting of equal number of occurrences of $a$'s and $b$'s. Proof of correctness.

Reading : Context-free grammar for Balanced parentheses - Kozen Lec 20

Lec 45 (03 Nov, Fri) : Closure properties of context free languages - closure under union, concatenation and star closure. Using closure properties to design context-free grammars for languages. Unit productions and epsilon production rules. Need for normal forms. Chomsky normal form and connection to size of parse trees.

Reading : Kozen Lec 21, 27

Lec 46 (04 Nov, Sat) : (Working day, Friday's timetable) Method for Removing unit productions and epsilon productions - termination and correctness.

Reading : Kozen Lec 21

Lec 47 (06 Nov, Mon) : Push-down automata - a machine model for context-free languages. Deterministic Push-down automata (DPDA) for $\{a^nb^n \mid n \ge 0\}$. Informal description and correctness. Non-deterministic push-down automata (NPDA) can accept $\{w Rev(w) \mid w \in \{a,b\}^*\}$.

Reading : Kozen Lec 23

Lec 48 (08 Nov, Wed) : Formal definition of deterministic and non-deterministic pushdown automata and formalizing the informal description of the automata from previous class. Griebach normal form - motivation, definition, left most derivations and connections to parsing. Converting a grammar in Griebach normal form to NPDA.

Reading : Kozen Lec 23, 24

Lec 49 (09 Nov, Thu) : Expressing a context-free grammar in Griebach normal form - composition and left recursion elimination. Worked out example. Intersection of regular language and context free language is always context-free.

Reading : Kozen Lec 21. Conversion to Griebach normal form - notes. Also see example 15.5 here.

Lec 50 (10 Nov, Fri) : Limitations of context-free languages - Pumping lemma for context free languages. Statement, correctness and Game formulation.

Reading : Kozen Lec 22

Lec 51 (13 Nov, Mon) : Showing that $\{a^nb^na^n \mid n \ge 0 \}$ is not context-free. Membership check in context-free languages, the CYK algorithm.

Reading : Kozen Lec 22, 27

Lec 52 (15 Nov, Wed) : CYK algorithm, correctness and termination. Notion of effective computation. Hilbert's program - history, Informal description of Turing machines. Introduction to Turing machines. Church-Turing thesis. Programs as strings.

Reading : Kozen Lec 28, 29

Lec 53 (16 Nov, Thu) : Tutorial Test 5 - Lectures 39 to 51

Lec 54 (17 Nov, Fri) : (9-10) Motivating questions about the models of computation on DFAs and CFGs. Questions of the kind given DFA $M$, is $L(M)$ empty or $\Sigma^*$. Similar question for CFGs. Undecidable problems on CFG. Formal definition of deterministic Turing machine. Examples.

Reading : Kozen Lec 29, 35

Lec 55 (17 Nov, Fri) : (11.45 AM - 12.45 PM) Compensatory lecture for Quiz 2. Configurations, halting computation, partial and total Turing machines. Recursive and recursively enumerable languages. Universal Turing machines. Halting problem is recursively enumerable.

Reading : Kozen Lec 29, 31

Lec 56 (20 Nov, Mon) : Undecidability of Halting problem. Proof via diagonalization.

Reading : Kozen Lec 31

Lec 57 (22 Nov, Wed) : (9-10 AM) Equivalent models - Multi-tape, Infinite tape, non-deterministic and two stack variants. Equivalence to deterministic Turing machine model.

Reading : Kozen Lec 30

Lec 58 (22 Nov, Wed) : (12-1 PM) Tutorial Test 6 - Lectures 52 to 56 (plus NFA construction using pebble based arguments)

Lec 59 (23 Nov, Thu) : Undecidability of a variant of Halting problem $\mathsf{HP42}$ via reduction to Halting problem. Summary and course wrap-up.

Reading : Kozen Lec 32