Lecture Schedule

This schedule is tentative and may change as the quarter progresses. I will try not to change scheduled days of quizzes and the midterm, however. [Note during pandemic: midterm replaced by shorter take-home quizzes.] The topics listed for each lecture are an estimate. After the lecture, I will alter the topics to reflect what we actually covered.

The reading assignment is to be done before lecture. In particular, the online Canvas reading quiz for a lecture will contain some questions about the reading assignment. If you're dismayed to notice that there is a reading assignment for the first lecture, there's no reading quiz before the first lecture. This reading is a review of discrete math (ECS 20), a prerequisite for this course, so I'm essentially just saying you should know that stuff already, but it's good to review just in case.

Any section/subsection in the lecture notes labeled "Optional" is something we will not cover. Topics from those sections will not appear on homework, quizzes, or exams.

Lecture 0 is not covered in class when teaching in person. It is a review of prerequisite discrete math concepts that will be used in the course. It will be covered in discussion the first week.

(pandemic edition)

I will pre-record lectures. You should watch these on your own. During the lecture period, I will be available on Zoom to take questions, but it will be less formal and more like office hours or review. I won't have much planned, since the planning I do for lecture is typically all in the content that I put in the videos.

Generally I've tried to break up each video into smaller chunks than a long 50-minute thing (although without interaction, most of these are 30-40 minutes instead of the full 50).

These videos are all linked from the AggieVideo playlist for this course. There are also playlists for each chapter:

There's a some errata in a few of the videos, which are explained at the pages at the links below with the individual videos.

lecture date videos reading assignment topics
0

1 sets

2 sequences

3 functions and relations

4 graphs and trees

5 Boolean logic

6 pigeonhole principle

7 combinatorics

discrete math review
1a 3/29

1 introduction to course

2 course policies

3 string theory

syllabus, 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, see also Download intro-slides.pdf

introduction to theory of computation, course policies, string theory
1b 3/31

1 intuitive overview of DFAs

2 formal models of computation

3 formal definition of DFA syntax

4 intuitive overview of DFA semantics

5 examples of DFA state diagrams

3.1, 3.2, 3.3

intuitive introduction to deterministic finite automata (DFA), formal models of computation, formal definition of DFA syntax

1c 4/2

1 example DFAs deciding input length congruence

2 example DFA deciding binary number congruence

3 formal definition of DFA semantics

3.4, 3.5

more examples of DFAs, formal definition of DFA semantics

2a 4/5

1 regex introduction

2 regex formal definition

3 conventions and the tree view of regex's

4 small examples

5 example of regex matching double literals

4.1

regular expressions (regex)

2b 4/7

1 CFG introduction

2 formal definition of CFG syntax

3 formal definition of CFG semantics

4 right-regular grammars

4.2

context-free grammars (CFG)

2c 4/9

1 NFA introduction

2 formal definition of NFA syntax

3 example NFA and states it could reach

4 listing transitions versus defining transition function

5 formal definition of NFA semantics

6 ɛ-transition example

4.3

nondeterministic finite automata (NFA)

3a 4/12

1 automatic transformation of regex's NFAs, DFAs

2 roadmap for next two chapters

3 DFA union (product construction) example

4 DFA union proof

5.1, 5.2

introduction to closure properties, product construction, DFA closure properties for complement, ∪

3b 4/14

1 DFA intersection (two ways)

2 gotchas: multiple union or intersection, closure only goes one way, and difficulty of showing closure for concatenation and Kleene star

3 NFA union example

4 NFA concatenation example

5.3

DFA closure properties for ∩, NFA closure property examples

3c 4/16

1 NFA Kleene star example

2 NFA union proof

3 NFA concatenation proof

4 NFA Kleene star proof

5.3

NFA closure property proofs

4a 4/19

1 introduction to computational equivalence, NFAs can simulate DFAs

2 example of DFA simulating NFA (subset construction)

3 proof DFAs can simulate NFAs with no ε-transitions

4 handling ε-transitions

5 alternative choices in subset construction

6.1

equivalence of DFAs and NFAs  (subset construction)

4b 4/21

1 RRGs can simulate DFAs example

2 RRGs can simulate DFAs proof

3 NFAs can simulate RRGs proof

4 right-regular versus left-regular grammars

6.2 equivalence of RGs and NFAs
4c 4/23

1 NFAs can simulate regex's proof

2 NFAs can simulate regex's example

3 NFAs with "isolated" start and accept state

4 expression automata

5 regex's can simulate NFAs

6.3 equivalence of regex's and NFAs
5a 4/26

1 why we need rigor to argue that a language is not regular

2 direct proof that { x | #(0, x) = #(1, x) } is not regular

3 picture of previous proof

4 direct proof that { uu | u ∈ {0,1}* } is not regular

7.1 proving languages are not regular (Pumping Lemma)
5b 4/28

1 pumping lemma for regular languages

2 pumping lemma proof that {0n1n | n ∈ ℕ } is not regular

3 example of incorrect use of pumping lemma

4 pumping lemma proof that { x | #(0, x) = #(1, x) } is not regular

5 closure properties proof that { x | #(0, x) = #(1, x) } is not regular

6 pumping lemma proof that { uu | u ∈ {0,1}* } is not regular

7 pumping lemma proof that { 1n^2 | n ∈ ℕ } is not regular

8 pumping lemma proof that { 0i1j | i > j } is not regular

9 pumping lemma proof that { (01)n(10)n | n ∈ ℕ } is not regular

7.2, 7.3 using the pumping lemma
5c 4/30

1 introduction to Turing machines (TM)

2 example TM

3 formal definition of TM syntax

4 formal definition of TM semantics

8.1, 8.2, 8.3 introduction to Turing machines (TM), formal definition of TM syntax; formal definition of TM semantics
6a 5/3

1 languages decided/recognized by TMs

2 multitape TM transition function

3 single-tape TMs can simulate multitape TMs

4 other variants of TMs

8.5, 8.6 languages decided/recognized by TMs; variants of TMs
6b 5/5 no lecture (normally midterm exam would be on this day)
6c 5/7

1 TMs versus code

2 measuring running time

3 asymptotic analysis, definition of O() and o()

4 rules-of-thumb for comparing function growth rates

5 definition of Ω(), ω(), and Θ()

Appendix A, 9.1 asymptotic time analysis
7a 5/10

1 time complexity classes and the Time Hierarchy Theorem

2 definition of P, encoding of data structures

3 P is the same for most encodings and programming languages

4 example problem in P: Path

9.2, 9.4 the class P, analyzing running time of algorithms
7b 5/12

1 example problem in P: RelPrime

2 example problem in P: Connected

3 Optional: example problem in P: EulerianGraph

4 polynomial-time verifier for HamPath

5 polynomial-time verifier for Composites

9.5, 10.1 examples of problems in P, polynomial-time verifiers
7c 5/14

1 definition of NP

2 decision vs. search vs. optimization

3 example problem in NP: Clique

4 example problem in NP: SubsetSum

5 the P vs. NP question

10.2, 10.3 the class NP, search and optimization problems, examples of problems in NP, the P versus NP question
8a 5/17

1 exponential-time algorithms for NP problems

2 P versus NP versus EXP

3 introduction to NP-completeness and Boolean formulas

4 implementation in Python and the Boolean satisfiability problem

5 ranking the hardness of problems

10.4, 10.5, 10.6 exponential-time algorithms for NP problems, introduction to NP-completeness, motivation of polynomial-time reducibility
8b 5/19

1 reducing IndSet to Clique

2 definition of polynomial-time reducibility

3 using reductions to bound hardness of problems

4 how to remember which direction reductions go

5 definition of the 3SAT problem

10.6 polynomial-time reducibility, reduction of 3SAT to IndependentSet
8c 5/21

1 3SAT is reducible to IndSet

2 reduction between two problems is an algorithm, but it doesn't solve either problem

3 definition of NP-completeness

4 Cook-Levin Theorem: if PNP, then no NP-complete problem is in P

10.6, 10.7, 10.8 definition of NP-completeness, proving problems are NP-complete, Cook-Levin theorem
9a 5/24

1 halting problem definition and Turing-recognizability

2 reducibility

3 no-input halting problem is undecidable

4 recipe for showing undecidability

11.1,11.3 halting problem, reducibility
9b 5/26

1 acceptance problem is undecidable

2 empty language problem is undecidable

3 rejecting problem is undecidable

4 how to spot undecidability

11.3, 11.4 undecidable problems about algorithm behavior, how to spot undecidability
9c 5/28

1 comparing sizes of sets

2 ℕ vs.

3 ℕ vs. ℚ+

4 ℕ vs. ℚ

5 ℕ vs. {0,1}*

6 ℝ vs. (0,1)

11.6 comparing sizes of sets
10a 5/31 Memorial Day
10b 6/2

1 diagonalization to show a set is smaller than its power set

2 the real numbers are uncountable and the Continuum Hypothesis

3 diagonalization to show the halting problem is undecidable

11.7

diagonalization, proof the halting problem is undecidable

10c 6/4 no lecture (start of final exam week)