# diochnos/teaching/CS3823/2024F

## Fall 2024 – CS 3823 Theory of Computation

### Table of Contents

### Course Description

Introduces computation theory including grammars, finite state machines, pushdown automata, and Turing machines.

[Course Description] [Table of Contents] [Top]

### Basic Information

#### Syllabus

The syllabus is available here.

#### Time and Location

Tuesdays and Thursdays, 12:00pm – 1:15pm, Nielsen Hall 0170.

#### Contact Information

Please see here.

#### Teaching Assistant(s)

The teaching assistant for the class is:

- TBA

#### Office Hours

TBA

Please note that while anyone is welcome during my office hours (Dimitris Diochnos), students from CS 5713 will have precedence on Fridays, while students from CS 3823 will have precedence on Tuesdays and Thursdays.

##### Exceptions to the Regular Schedule of Office Hours

If you want to meet with me or with the TA outside of our regular office hours, please send us an email and arrange an appointment.

##### Exceptions to the Regular Schedule of Office Hours for the TAs

As exceptions appear along the way, they will also be announced here.

[Basic Information] [Table of Contents] [Top]

### Homework Assignments (Estimates)

Assignment 1: To be announced on Thursday, August 29 (week 2). To be due on Friday, September 6 (week 3).

Assignment 2: To be announced on Tuesday, September 17 (week 5). To be due on Friday, September 27 (week 6).

Assignment 3: To be announced on Tuesday, October 15 (week 9). To be due on Tuesday, October 25 (week 10).

Assignment 4: To be announced on Tuesday, October 29 (week 11). To be due on Friday, November 8 (week 12).

Assignment 5: To be announced on Tuesday, November 21 (week 14). To be due on Tuesday, December 3 (week 16).

[Homework Assignments] [Table of Contents] [Top]

### Theory of Computation Resources

- Basic Concepts and Notation, by Gabriel Robins.
- Think like the pros, by Emanuele Viola.
- Who Can Name the Bigger Number?, by Scott Aaronson.
- The Physical Origin of Universal Computing, by Michael Nielsen.

[Theory of Computation Resources] [Table of Contents] [Top]

### Class Log

A log for the class will be held online here.

#### Week 1

#### Class 1 (Aug 20, 2024)

Discussion on syllabus and policies.

#### Class 2 (Aug 22, 2024)

Discussion on mathematical background.

We will finish our discussion next time.

#### Week 2

#### Class 3 (Aug 27, 2024)

Introduction to deterministic finite automata. Examples, their description, defining computation, definition of regular languages, designing finite automata according to specifications.

Introduction to regular operations. Next time we will prove that regular languages are closed under union and intersection.

#### Class 4 (Aug 29, 2024)

Proved that regular languages are closed under union and intersection.

Started discussion on non-determinism. Multiple transitions for the same symbol, missing transitions for some symbols, transitions triggered on empty input (λ).

Example NFA with a complete run on a specific input exhibiting the behavior of the above concepts. We will conclude next time.

Assigned today: Homework 1. (Due: Fri, Sep 6)

#### Week 3

#### Class 5 (Sep 3, 2024)

Example NFA with a complete run on a specific input exhibiting the behavior of the above concepts.

Designing an NFA for a specific language in mind (having a 1 three positions from the end of the binary string); then doing so also with a DFA.

Started discussion on the theorem about the equivalence between DFAs and NFAs.

Revising some concepts from discrete mathematics; induction, Gauss' trick and extension to geometric series.

#### Class 6 (Sep 5, 2024)

Discussion on TeX/LaTeX. History, evolution, creators, usage.

Continued our discussion on the theorem about the equivalence between DFAs and NFAs.

This time we proved the theorem that we stated last time.

#### Friday, September 6, 2024

Due today: Homework 1.

#### Week 4

#### Class 7 (Sep 10, 2024)

Closure under the regular operations. We looked into union, concatenation, star.

Started our discussion on regular expressions.

#### September 12, 2024

No class due to a career fair.

#### Week 5

#### Class 8 (Sep 17, 2024)

Discussion on homework assignments, midterm, and the meaning of closure for regular operations. For this last point we also had a glimpse on the big picture behind languages that we will explore in this class: regular, context-free, Turing decidable, Turing recognizable, Turing unrecognizable. We will be familiar with these notions in November.

Continued our discussion on regular expressions. Proved that a language described by a regular expression can be recognized by an NFA and we also saw some examples.

Discussed the conversion of regular languages to regular expressions.

In this direction we discussed generalized transition graphs (GTGs) / generalized non-deterministic finite automata (GNFAs) and described the procedure that can take any DFA to a GNFA and then reducing that GNFA from k nodes to a GNFA with just two nodes (start state and accept state). The label of the arrow connecting these two states is the regular expression that we want.

We saw two examples for this reduction.

Assigned today: Homework 2. Due on Friday, Sep 27.

#### Class 9 (Sep 19, 2024)

The first midterm will take place on Thursday, October 3.

The pumping lemma for regular languages. Examples uses for proving non-regularity of certain languages.

#### Week 6

#### Class 10 (Sep 24, 2024)

Announced material that will be in the coming midterm exam via email.

Verified the above announcements in class.

Discussion on the problems that the students have proposed as candidate problems for exams.

#### Class 11 (Sep 26, 2024)

More examples on the use of pumping lemma for proving non-regularity of certain languages.

#### Sep 27, 2024

Due today: Homework 2.

#### Week 7

#### Class 12 (Oct 1, 2024)

Discussion on homework and answering students' questions.

Preparation for the midterm.

#### Class 13 (Oct 3, 2024)

First midterm exam.

#### Week 8

#### Class 14 (Oct 8, 2024)

Started the discussion on context-free grammars.

Designing CFGs - among others, how to convert a DFA to a CFG (which, btw, shows that RLs
⊆ CFLs; that is, regular languages are a subset of context-free languages – we
can combine this information with the fact that among CFLs we can find languages that are not
regular, e.g., {0^{n}1^{n} | n ≥ 0}, and conclude that RLs ⊊ CFLs;
that is, regular languages form a proper subset of context free languages).

#### Class 15 (Oct 10, 2024)

Ambiguous grammars, inherently ambiguous languages.

Chomsky Normal Form for CFGs. We started discussing an example but we ran out of time. Next time we will finish with the example.

#### Week 9

#### Class 16 (Oct 15, 2024)

MoneyCoach presentation by Cami Sheaffer.

Assigned today: Homework 3. Due on Friday, October 25.

#### Class 17 (Oct 17, 2024)

Midterm returned. Discussion on the solutions of the midterm.

#### Week 10

#### Class 18 (Oct 22, 2024)

We finished with the example on Chomsky Normal Form.

We discussed (nondeterministic) pushdown automata (PDAs). How they perform computation and we also saw examples.

#### Class 19 (Oct 24, 2024)

Continued our discussion on (nondeteterministic) pushdown automata (PDAs). Examples using PDAs.

#### October 25

Due today: Homework 3.

#### Week 11

#### Class 20 (Oct 29, 2024)

Pumping lemma for context-free languages and one example.

Assigned today: Homework 4. Due, Friday, November 8.

#### Class 21 (Oct 31, 2024)

More examples on the use of the pumping lemma for context-free languages in order to prove that said languages are not context-free.

Introduction to Turing machines: notation, the 7-tuple, configurations.

#### Week 12

#### Class 22 (Nov 5, 2024)

Designing TMs, state diagrams of TMs, defining decidable and recognizable languages.

Example of a state diagram for a Turing machine - deciding the language {0^{2n} | n ≥ 0}.

#### Class 23 (Nov 7, 2024)

One more example deciding the language {a^{i}b^{j}c^{k} | i × j = k and i, j, k ≥ 1}.

Discussion on recognizable vs decidable languages. Hilbert's 10th problem.

Three different levels of description of a TM. We looked into the language B = {w#w | w ∈ {0,1}^{*}} and three different ways of describing the TM that decides this language.

We had a discussion about the big picture of things: proper subset relations between different classes of languages. How the pumping lemmas fit into this picture.

Discussion on finding the roots of univariate and multivariate polynomials. Discussed the sum of three cubes being equal to 42. Hilbert's tenth problem is recognizable but not decidable. We also mentioned that there are problems that are not even recognizable - we will see such an example in the future.

Complexity theory cares about **decidable** languages. There we find different classes, such as P, NP, PSPACE, etc. Of particular interest are the classes P and NP.

#### Friday, November 8, 2024

Due today: Homework 4.

#### Week 13

#### Class 24 (Nov 12, 2024)

Discussion on homework and answering students' questions.

Preparation for the midterm.

#### Class 25 (Nov 14, 2024)

Second midterm exam.

#### Week 14

#### Class 26 (Nov 19, 2024)

Equivalence of different models of Turing machines; multi-tape, nondeterministic, TMs that have the option to stay put, etc.

#### Nov 21, 2024

Discussion on the big picture for the Chomsky hierarchy of languages.

A_{DFA}, A_{NFA}, A_{REX}, E_{DFA}, EQ_{DFA}, A_{CFG} are decidable languages.
There is one or two more languages discussed in the notes that I did not cover in class –
you do not have to read them, though for the largest part their proofs are easy
and it would not hurt at least skimming through their text.

Brief recap of set theoretic notions.

Assigned today: Homework 5. Due, Tuesday, December 3.

#### Week 15

#### Class 27 (Nov 26, 2024)

The acceptance problem, A_{TM}, is undecidable.

Co-Turing recognizable languages and Turing unrecognizable languages.

A_{TM} is not Turing recognizable.

High level discussion on reductions.

HALT_{TM} is undecidable (reduction from A_{TM}).

The Post Correspondence Problem. You should know what the problem is and that it is undecidable.

Rice's Theorem.

Introduction, overview of complexity theory and some related problems.

Complexity classes P and NP.

#### Class 28 (Nov 28, 2024)

Thanksgiving; no class.

#### Week 16

#### Class 29 (Dec 3, 2024)

Returning second midterm to students and discussing the solutions for that midterm.

Due today: Homework 5.

#### Class 30 (Dec 5, 2024)

Solutions to homework 5. Perhaps some additional discussion on review problems as preparation for the final.

Problems that are *complete* for a class and discussion on NP-Complete problems.

The million-dollar question: P vs NP.

You can find the list with the seven open problems (each one of them pays one million dollars) of the Clay Mathematics Institute here.

#### Week 17

#### Wednesday, December 11, 2023 (1:30pm – 3:30pm)

Final exam. In-class (Nielsen Hall 0170 — where we met throughout the semester).