Theory of Computing

CSE 30151 | Spring 2024

Time
TTh 2–3:15pm
Location
136 DeBartolo
Instructor
David Chiang
Prerequisites
Discrete Mathematics (CSE 20110) or equivalent. You especially need to be comfortable with sets, tuples, functions, relations, and graphs; and writing proofs by contradiction and by induction.
Data Structures (CSE 20311) is recommended but not required for group programming assignments. If you haven't taken this course or equivalent, you may want to join a group with students who have.
Required text
Michael Sipser, Introduction to the Theory of Computation
3rd International Edition
ISBN: 9781133187813, 9788131525296
Price: about $25
Why this is legal
Errata
Description
Introduction to formal languages and automata, computability theory, and complexity theory with the goal of developing understanding of the power and limits of different computational models. Topics covered include:
  • regular languages and finite automata
  • context-free grammars and pushdown automata
  • Turing machines; undecidable languages
  • the classes P and NP; NP completeness
Links
The following sites will be used in this course:
  • Notes and assignments will be linked from here, but you can also clone the GitHub repository
  • Ed for questions and answers
  • Canvas for submitting and grading assignments

Staff


Instructor
David Chiang

Graduate TA
Andy Yang

Graduate TA
Siyu Yang

Undergraduate TA
Walker Bagley

Undergraduate TA
John Flanagan

Undergraduate TA
Solina Kim

Undergraduate TA
John Lee

Undergraduate TA
David Simonetti

Office Hours

M T W Θ F
12–2pm Chiang
179 Fitzpatrick
12–2pm Chiang
179 Fitzpatrick
1–3pm Simonetti
150M Fitzpatrick
5–7pm Lee
150B Fitzpatrick
4–5pm Siyu Yang
150B Fitzpatrick
5–6pm Kim
150M Fitzpatrick
7–9pm Bagley
150B Fitzpatrick
5–7pm Andy Yang
150B Fitzpatrick
6–8pm Flanagan
150M Fitzpatrick
6–7pm Siyu Yang
150M Fitzpatrick

Schedule

Notes are posted as Colab notebooks. You should be able to use them in your browser, but if you want to use them on your own machine, install Tock, clone the Git repository, and run jupyter notebook in your working copy.

Materials and assignments in gray are from Spring 2023 and are subject to change for Spring 2024.

Week of Topic Assignment
01/15 Welcome
Languages
Proofs
Glossary of math terms (for reference)
LaTeX/TikZ tutorial (optional)
01/22 Deterministic finite automata
NFAs = DFAs
Neural networks (optional)
HW1 (due 01/26)
01/29 Regular expressions to NFAs
NFAs to regular expressions
HW2 (due 02/02)
02/05 Non-regular languages
More non-regular languages
CP1 (due 02/09)
02/12 Context-free grammars
Pushdown automata
CFGs to PDAs
Deterministic PDAs (optional)
HW3 (due Thurs 02/15)
02/19 PDAs to CFGs
Non-context-free languages
HW4 (due 02/23)
02/26 Non-context-free languages
Turing machines
Creating Turing machines with Tock
CP2 (due 03/01)
03/04 Turing machine variants Midterm exam (03/05)
Spring break
03/18 Nondeterministic TMs
RAM machines
The universal TM
HW5 (due 03/22)
03/25
Holy Week
Undecidability
Are you smarter than a computer? (optional)
Reducibility
HW6 (due Thurs 03/28)
04/01 Rice's Theorem
Computation histories
CP3 (due Saturday, 04/06)
04/08 P and NP
NP-completeness
HW7 (due 04/12)
04/15 Cook-Levin theorem
Polynomial reducibility
CP4 (due 04/19, part 3 due 4/23)
04/22 Polynomial reducibility HW8 (due Tues 04/30)
04/29 Conclusion
05/06 Final exam (05/06 10:30am)

Requirements

Component Points
Homework 8 × 30
Programming projects 4 × 30
Midterm exam 90
Final exam 120
Participation 30
Total 600
GradePoints
A
A−
560–600
540–559
B+
B
B−
520–539
500–519
480–499
C+
C
C−
460–479
440–459
420–439
D 360–419
F 0–359

Project

Throughout the semester, you will implement some of the ideas you've learned in a series of text-processing tools.

  • You can work in teams of up to three. Each team member should contribute a roughly equal amount of work.
  • You can write in C++ (including all standard libraries except <regex>) or Python (including all standard libraries except re). Python is recommended. You can also write in another language with permission from the instructor.

In Project 1, you'll implement nondeterministic finite automata (NFAs). Nondeterminism (essentially, unbounded parallelism) is one of the core concepts in the course, and implementing it will demonstrate how to simulate nondeterminism on deterministic hardware.

In Project 2, you'll write a parser for regular expressions and combine it with NFAs to build a regular expression matcher like grep. Your implementation will be asymptotically much faster than an implementation that uses Perl or Python's built-in regular expressions.

In Project 3, you'll use your regular expression engine to implement a fragment of sed. You'll also show how, in principle, any computer program could be compiled into this fragment of sed.

In Project 4, you'll extend your regular expression matcher to handle backreferences. You'll show how this extended matcher can be used to (slowly) solve the Boolean satisfiability problem and therefore any problem in NP.

Policies

Attendance

Students are expected to attend all classes. Foreseeable unexcused absences should be discussed with the instructor ahead of time.

Late Work

For excused absences (e.g., documented illness, travel for athletics, job interview), coursework submissions will be accepted late by the same number of days as the excused absence.

Otherwise, you may submit some problems on time for full credit, and other problems late for a penalty. No problem can be submitted more than once. The late penalty increases by 10% per day and stops increasing when it reaches 50%; thereafter, it remains at 50% until the final exam date, after which no work may be submitted.

Copyright

All course materials written by the instructor and published on this website are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, which prohibits reuse for commercial purposes.

All course materials written by the instructor and distributed privately (including through Canvas) should not be redistributed in any way; doing so is a violation of both US copyright law and the University of Notre Dame Honor Code.

Honor Code

Students in this course are expected to abide by the Academic Code of Honor Pledge: “As a member of the Notre Dame community, I will not participate in or tolerate academic dishonesty.”

The following table summarizes how you may work with other students and use printed/online sources:

Resources Solutions
Consulting allowed cite
Copying cite not allowed
See the CSE Guide to the Honor Code for definitions of the above terms.

If the instructor sees behavior that is, in his judgement, academically dishonest, he is required to file either an Honor Code Violation Report or a formal report to the College of Engineering Honesty Committee.

Students with Disabilities

Any student who has a documented disability and is registered for accessibility support should speak with the professor as soon as possible regarding accommodations. Students who are not registered should contact Sara Bea Accessibility Services.

Miscellaneous

Further Reading