Theory of Computation
https://uvatoc.github.io/
Recent content on Theory of ComputationHugo -- gohugo.ioen-usMon, 23 Jan 2023 00:00:00 +0000Class 27: Wrap-up
https://uvatoc.github.io/class27/
Tue, 02 May 2023 00:00:00 +0000https://uvatoc.github.io/class27/Slides from class: class27.pdf
Some solutions and hints on the practice final are here: practicefinal-comments.pdf. (If there are questions about problems with incomplete solutions, we might add to this later.)
We won’t have the regular office hours schedule now that the end of classes has passed, but still have many office hours scheduled until the final exam on May 11. Please check the course calendar (and discord announcements) for information on office hours for this week and next week.Preparing for the Final Exam
https://uvatoc.github.io/preparing-for-the-final-exam/
Sun, 30 Apr 2023 00:00:00 +0000https://uvatoc.github.io/preparing-for-the-final-exam/As scheduled by the Registrar, the final exam will be Thursday, 11 May, 2:00pm - 5:00pm in our normal classroom.
The final exam will cover everything we’ve done in the course, but with more emphasis on material that has been covered since the midterm.
There is now a Classes page that lists all the classes to make it easier for you to find specific content we’ve covered in class.
Like the midterm, you may prepare a one-page (letter-size, two-sided) reference sheet for use during the exam, but all other resources are forbidden (no internet, textbook, other humans, magnification instruments, etc.Class 26: Cook-Levin Theorem
https://uvatoc.github.io/class26/
Thu, 27 Apr 2023 00:00:00 +0000https://uvatoc.github.io/class26/Slides from class: class26.pdf
Problem Set 10 is due on Friday, 28 April. The latex template is https://www.overleaf.com/read/ppdjrxcwqmnn.Class 25: Probably Hard Problems
https://uvatoc.github.io/class25/
Tue, 25 Apr 2023 00:00:00 +0000https://uvatoc.github.io/class25/Slides from class: class25.pdf
Problem Set 10 is due on Friday, 28 April. The latex template is https://www.overleaf.com/read/ppdjrxcwqmnn.
Quiz 11 (which is a “make-up quiz”) is due 9:59pm on Wednesday, April 26.Class 24: Complexity II
https://uvatoc.github.io/class24/
Thu, 20 Apr 2023 00:00:00 +0000https://uvatoc.github.io/class24/Slides from class: class24.pdf
Problem Set 10 is due on Friday, 28 April. The latex template is https://www.overleaf.com/read/ppdjrxcwqmnn.Class 23: Complexity
https://uvatoc.github.io/class23/
Tue, 18 Apr 2023 00:00:00 +0000https://uvatoc.github.io/class23/Slides from class: class23.pdf
Problem Set 10 is due on Friday, 28 April. The latex template is https://www.overleaf.com/read/ppdjrxcwqmnn.Class 22: Rice's Theorem
https://uvatoc.github.io/class22/
Thu, 13 Apr 2023 00:00:00 +0000https://uvatoc.github.io/class22/Slides from class: class22.pdf
Problem Set 9 is due on Monday, 17 April. The latex template is https://www.overleaf.com/read/mqwmbzjppfbv.Class 21: Reductions and Recognizability
https://uvatoc.github.io/class21/
Tue, 11 Apr 2023 00:00:00 +0000https://uvatoc.github.io/class21/Slides from class: class21.pdf
Problem Set 9 is due on Monday, 17 April. The latex template is https://www.overleaf.com/read/mqwmbzjppfbv.
If the key opening door reduction isn’t exciting enough for you (or you’re just a fan of 1980s TV shows), you may want to watch this video: Proof by Reduction (from Fall 2020 course).Class 20: Proving Uncomputability
https://uvatoc.github.io/class20/
Thu, 06 Apr 2023 00:00:00 +0000https://uvatoc.github.io/class20/Slides from class: class20.pdf
The learned video on computability from class is here.
If you want another presentation of the computability material in the textbook, try Dori-Mic and the Universal Machine!.
Problem Set 8 is due on Monday, 10 April. The latex template is https://www.overleaf.com/read/nhgcvwvnfvkh.Class 19: Computability
https://uvatoc.github.io/class19/
Tue, 04 Apr 2023 00:00:00 +0000https://uvatoc.github.io/class19/Here’s the notes handed out today: tmnotes.pdf (Warning: do not print in color unless you are familiar with UK counterfeiting laws!)
Slides from class: class19.pdf
There is a Quiz due Wednesday at 9:59pm, posted in Gradescope.
Problem Set 8 is due on Monday, 10 April. The latex template is https://www.overleaf.com/read/nhgcvwvnfvkh.Class 18: Turing Machines
https://uvatoc.github.io/class18/
Thu, 30 Mar 2023 00:00:00 +0000https://uvatoc.github.io/class18/Slides from class: class18.pdf
Here are the links to the Turing Machine simulations:
4-state Busy Beaver candidate
5-state Busy Beaver candidate
As mentioned in class, there are lots of different ways to define a Turing Machine, and no agreed upon standard definition. None of the small changes to the definition impact the set of functions that can be computed (as we will see in upcoming classes), but they do impact how hard it might be to write programs and prove properties about Turing Machines.Class 17: NFA vs. RE
https://uvatoc.github.io/class17/
Tue, 28 Mar 2023 00:00:00 +0000https://uvatoc.github.io/class17/Slides from class: class17.pdf
There is a Quiz due Wednesday at 9:59pm, posted in Gradescope.
Problem Set 7 is due on Monday, 27 March. The latex template is https://www.overleaf.com/read/krxvcbgfpkgk.Class 16: Completing DFA=RE Proof
https://uvatoc.github.io/class16/
Thu, 23 Mar 2023 00:00:00 +0000https://uvatoc.github.io/class16/Slides from class: class16.pdf
Problem Set 6 is due on Monday, 27 March. The latex template is https://www.overleaf.com/read/bfftypdhtryf.
Python’s Regular Expression library code is here: https://github.com/python/cpython/blob/3.11/Lib/re/_parser.py (see lines starting at 634 for the implementation of repetition patterns including the (bogus?) Kleene star).
Cloudflare Outage, July 2, 2019
Class 15: Deterministic and Nondeterministic FAs
https://uvatoc.github.io/class15/
Tue, 21 Mar 2023 00:00:00 +0000https://uvatoc.github.io/class15/Slides from class: class15.pdf
Notes of Finite Automata (these are the completed version of the notes that were handed out in class today)
Problem Set 6 is due on Monday, 27 March. The latex template is https://www.overleaf.com/read/bfftypdhtryf.Class 14: Regular Expressions
https://uvatoc.github.io/class14/
Sat, 18 Mar 2023 00:00:00 +0000https://uvatoc.github.io/class14/Slides from class: class14.pdf
Problem Set 5 is posted in grade scope (latex template available here: https://www.overleaf.com/read/jmpfnvfffgrb), and is due 9:59pm, Monday, 20 March.Class 13: Finite Automata and Regular Expressions
https://uvatoc.github.io/class13/
Wed, 15 Mar 2023 00:00:00 +0000https://uvatoc.github.io/class13/Slides from class: class13.pdf (video is available for students in collab)
Problem Set 5 is posted in grade scope (latex template available here: https://www.overleaf.com/read/jmpfnvfffgrb), and is due 9:59pm, Monday, 20 March.
There is no quiz this week.
If you are unclear on the difference between the Kleene-* (the * used in regular expressions introduced in class today) and Kleene-X, the videos here will almost certainly not help you.Midterm Comments
https://uvatoc.github.io/midterm-comments/
Tue, 14 Mar 2023 00:00:00 +0000https://uvatoc.github.io/midterm-comments/The midterm exam and comments on its are now posted:
Midterm Exam Midterm Comments - AI-bot Claude’s answers to the midterm questions, with our comments on them Class 12: Review
https://uvatoc.github.io/class12/
Tue, 28 Feb 2023 00:00:00 +0000https://uvatoc.github.io/class12/Slides from class (including slides that were not used): class12.pdf (video is available for students in collab)
The Midterm Exam will be in class on Thursday, 2 March.Class 11: Universal Circuits, Quiz Questions, Practice Problems
https://uvatoc.github.io/class11/
Thu, 23 Feb 2023 00:00:00 +0000https://uvatoc.github.io/class11/Slides from class: class11.pdf (video is available for students in collab)
The Midterm Exam will be in class on Thursday, 2 March. Tuesday’s class with be a review. If there are any topics you would like covered, or particular problems to go over, please let us know in the Discord. See Preparing for Exam 1 for suggestions on how to prepare for the exam.Class 10: Circuit Complexity and Universal Circuits
https://uvatoc.github.io/class10/
Tue, 21 Feb 2023 00:00:00 +0000https://uvatoc.github.io/class10/Slides from class: class10.pdf (video is available for students in collab)
Quiz 5 is posted in GradeScope, and is due Wednesday, 9:59pm.
The Midterm Exam will be in class on Thursday, 2 March. See Preparing for Exam 1 for suggestions on how to prepare for the exam.Preparing for Exam 1
https://uvatoc.github.io/preparing-for-exam-1/
Mon, 20 Feb 2023 00:00:00 +0000https://uvatoc.github.io/preparing-for-exam-1/Exam 1 will be in class on Thursday, 2 March.
It will cover material from Classes 1 – 9, Problem Sets 1 – 4 (including the provided comments), Quizzes 1 – 4, and Chapter 1 – 5 of the TCS Book. Nearly everything on the exam will have been covered in at least three of these places (e.g., in class, on a problem set, and in the textbook; or in multiple classes, the textbook, and a quiz).Class 9: Circuit Size Hierarchy
https://uvatoc.github.io/class9/
Thu, 16 Feb 2023 00:00:00 +0000https://uvatoc.github.io/class9/Slides from class: class9.pdf (video is available for students in collab)
Problem Set 4 is due on Monday, 20 February (9:59pm): https://overleaf.com/read/hsxfrxnsvyfw (there is no Jupyter notebook part of this problem set).
The Midterm Exam will be in class on Thursday, 2 March.Class 8: Syntactic Sugar, Complexity of Functions
https://uvatoc.github.io/class8/
Tue, 14 Feb 2023 00:00:00 +0000https://uvatoc.github.io/class8/Slides from class: class8.pdf (video is available for students in collab)
Quiz 4 is in GradeScope (after noon today) and due Wednesday, 9:59pm. As posted in discord, the collaboration policy for the quizzes has changed (including for this quiz): From now on, you are permitted to use resources for quizzes, but not to discuss the problems with other people. You may use your notes, the course textbook, posted class slides/videos, and any other materials you want while you take the quiz.Problem Set 4 Posted
https://uvatoc.github.io/ps4/
Mon, 13 Feb 2023 00:00:00 +0000https://uvatoc.github.io/ps4/Problem Set 4 is now posted and due on Monday, 20 February (9:59pm).
This problem set focuses on understanding the asymptotic notations, syntactic sugar (Chapter 4), and the circuit complexity and the size hierarchy theorem (Chapter 5 of TCS).
The latex template for Problem Set 4 is here: https://overleaf.com/read/hsxfrxnsvyfw (there is no Jupyter notebook part of this problem set).
The problems PDF is: ps4.pdf.Class 7: Universal Circuits
https://uvatoc.github.io/class7/
Thu, 09 Feb 2023 00:00:00 +0000https://uvatoc.github.io/class7/Slides from class: class7.pdf (video is available for students in collab)
Problem Set 3 (Overleaf, Jupyter) is due Monday, 13 February, 9:59pm.
As was pointed out to me by an intrepid student after class, what I said about { OR, NOT } being not universal since we included AND in our AON Circuits is badly wrong! One easy way to see this is we know we can convert between { AND, NOT } and { OR, NOT } using De Morgan’s laws, so we can construct AND from { OR, NOT }.Class 6: Modeling Boolean Circuits
https://uvatoc.github.io/class6/
Tue, 07 Feb 2023 00:00:00 +0000https://uvatoc.github.io/class6/Slides from class: class6.pdf (video is available for students in collab)
Quiz 3 is in GradeScope and due Wednesday, 9:59pm.
Problem Set 3 (Overleaf, Jupyter) is due Monday, 13 February, 9:59pm.Problem Set 3 Posted
https://uvatoc.github.io/ps3/
Mon, 06 Feb 2023 00:00:00 +0000https://uvatoc.github.io/ps3/Problem Set 3 is now posted and due on Monday, 13 February (9:59pm).
This problem set focuses on understanding finite computation in the Boolean circuit and programming models (Chapter 3 of TCS), and understanding how we prove Boolean circuits can compute every finite function (Chapter 4 of TCS).
The latex template for Problem Set 3 is here: https://www.overleaf.com/read/kvfjnywhnxrw
The problems PDF is: ps3.pdf.
The Jupyter notebook for PS3 is ps3.ipynb.On Mappings
https://uvatoc.github.io/on-mappings/
Fri, 03 Feb 2023 00:00:00 +0000https://uvatoc.github.io/on-mappings/As discussed in Class 5, there was a problem on Quiz 2 that both the professors got wrong probably more than once.
Although it was meant to be a fairly straightforward multiple choice question, it illustrates how tricky it is to think about the subtleties of simple definitions on binary relations and the importance of precise definitions.
The question, as asked on Quiz 2 is below:
Question 2: Notions of RelationsClass 5: Defining Computation
https://uvatoc.github.io/class5/
Thu, 02 Feb 2023 00:00:00 +0000https://uvatoc.github.io/class5/Slides from class: class5.pdf (video is available for students in collab)
Problem Set 2 is due Monday, 9:59pm.Answers to Course Registration Survey Questions
https://uvatoc.github.io/surveyanswers/
Wed, 01 Feb 2023 00:00:00 +0000https://uvatoc.github.io/surveyanswers/Here are my (Dave) answers to questions from the course registration survey. If you have new questions that weren’t answered, or want to follow-up on anything, please feel free to do so either in office hours, on Discord, or by email.
Do you two have a passion for computer science or a specific topic within computer science, why is that? What do you think about you or your past primed you to develop this interest?Class 4: More Infinities
https://uvatoc.github.io/class4/
Tue, 31 Jan 2023 00:00:00 +0000https://uvatoc.github.io/class4/Slides from class: class4.pdf (video is available for students in collab)
Quiz 2 is available in GradeScope, and due 9:59pm Wednesday (1 Feb).Problem Set 2 Posted
https://uvatoc.github.io/problem-set-2-posted/
Tue, 31 Jan 2023 00:00:00 +0000https://uvatoc.github.io/problem-set-2-posted/Problem Set 2 is now posted and due on Monday, 6 February (9:59pm).
The latex template for Problem Set 2 is here: https://www.overleaf.com/read/rzzzgwrfmmwh
The problems PDF is: ps2.pdf.Class 3: What can be represented by bits?
https://uvatoc.github.io/class3/
Thu, 26 Jan 2023 00:00:00 +0000https://uvatoc.github.io/class3/Slides from class: class3.pdf (video is available for students in collab)Class 2: Defining Definitions
https://uvatoc.github.io/class2/
Tue, 24 Jan 2023 00:00:00 +0000https://uvatoc.github.io/class2/You will find Quiz 1 in GradeScope and should submit it by Wednesday at 9:59pm.
Problem Set 1 is due Monday, 30 Jan at 9:59pm.
Slides from class: class2.pdf (video is available for students in collab)Problem Set 1
https://uvatoc.github.io/ps1/
Mon, 23 Jan 2023 00:00:00 +0000https://uvatoc.github.io/ps1/Due: Monday, 30 January, 9:59pm This problem set includes problems that you will do on ``pencil-and-paper’’ and writeup using the LaTeX template we provide, and problems that involve programming that you will do using a Jupyter notebook, a convenient way to edit and run Python code and integrate code with formatted text.
LaTeX Problems To start PS1, visit the overleaf repository using this link: https://www.overleaf.com/read/qzzjybkydrmv. This provides the template for you to use to provide your answers.Problem Set 1
https://uvatoc.github.io/ps1/
Mon, 23 Jan 2023 00:00:00 +0000https://uvatoc.github.io/ps1/Due: Monday, 30 January, 9:59pm This problem set includes problems that you will do on ``pencil-and-paper’’ and writeup using the LaTeX template we provide, and problems that involve programming that you will do using a Jupyter notebook, a convenient way to edit and run Python code and integrate code with formatted text.
LaTeX Problems To start PS1, visit the overleaf repository using this link: https://www.overleaf.com/read/qzzjybkydrmv. This provides the template for you to use to provide your answers.Problem Set 1 Posted
https://uvatoc.github.io/problem-set-1-posted/
Mon, 23 Jan 2023 00:00:00 +0000https://uvatoc.github.io/problem-set-1-posted/Problem Set 1 is now posted and due on Monday, 30 January (9:59pm).
You should be able to access the problem set through gradescope, and you will need to submit your answers there.Class 1: Introduction
https://uvatoc.github.io/class1/
Thu, 19 Jan 2023 00:00:00 +0000https://uvatoc.github.io/class1/Here’s the material for the first class:
Syllabus (which includes the Course Pledge Jeremy Kun, Habits of highly mathematical people (you should read this before submitting the course registration survey) Course Registration Survey (Due: Monday, 23 January, 8:59pm) Slides from class: class1.pdf (video is available for students in collab)Course Pledge
https://uvatoc.github.io/pledge/
Tue, 17 Jan 2023 00:00:00 +0000https://uvatoc.github.io/pledge/Honor Expectations As a student at the University of Virginia, you are trusted to be honorable and expected to behave in ways that merit that trust. We take advantage of this trust to provide a better learning environment for everyone. In particular, students in cs3120 are expected to follow these rules throughout the course:
I will not lie, cheat or steal. If I am unsure whether something would be considered lying, cheating or stealing, I will ask before doing it.Schedule
https://uvatoc.github.io/schedule/
Mon, 16 Jan 2023 00:00:00 +0000https://uvatoc.github.io/schedule/Weekly Office Hours Check the calendar below to confirm in case there are any changes this week.
Mondays
9:30 - 10:30am (Dave, Rice 507)
1:00 - 3:00pm (Gillian, Rice 442)
1:30 - 3:00pm (Ratik, Rice 442)
3:30-5:30pm (Catherine, Rice 442)
Tuesdays
1:00 - 2:00pm (Mohammad, Rice 511)
3:00 - 5:00pm (Leah, Rice 442) 4:00 - 6:00pm (Zihan, Rice 442)
Wednesdays
12:30 - 2:30pm (Catherine, Rice 442)
2:00 - 3:00pm (Ratik, Rice 442)Welcome to Theory of Computation
https://uvatoc.github.io/welcome/
Mon, 09 Jan 2023 00:00:00 +0000https://uvatoc.github.io/welcome/Theory of Computation (renumbered as cs3120, but very similar to the course previously numbered as cs3102) will be offered in Spring 2023, co-taught by Mohammad Mahmoody and David Evans.
Class meetings will be Tuesdays and Thursdays, 9:30 – 10:45am in Olsson Hall 120.
We’ll be putting more information here about the course as the start of the semester approaches.
For now, you can see what the course was like in previous semesters from Prof.Syllabus
https://uvatoc.github.io/syllabus/
Tue, 11 Jan 2022 00:00:00 +0000https://uvatoc.github.io/syllabus/This syllabus is not yet finalized, and is subject to change until distributed on the first day of class. The course website is managed through a public github repository, so you can see past versions there. The version as posted on the first day of class is here.
Overview Course Description: The goal of this course is to understand the fundamental limits on what can be efficiently computed in our universe and other possible (or imaginary) universes.Resources
https://uvatoc.github.io/resources/
Tue, 15 Sep 2020 00:00:00 +0000https://uvatoc.github.io/resources/Here are links to some useful resources for cs3102. If you discover other resources you think would be helpful for students in the class, please let us know to add them here.
Course Book Main Website
Full Text PDF
Github (if you have corrections or suggestions for the book, submit them to Boaz Barak here; useful contributions will be worth bonus points in the course, so let us know if you have a pull request accepted or start a useful issue)Classes
https://uvatoc.github.io/classes/
Mon, 01 Jan 0001 00:00:00 +0000https://uvatoc.github.io/classes/Definitions Countability Class 1: Introduction [Slides]
Goals of the Course Adding and Multiplying Class 2: Defining Definitions [Slides]
Babylonian numbers Why study theory? Is 0 a Natural Number? Class 3: What can be represented by bits? [Slides]
Meaning of “optimal” Representing the numbers and binary strings Set cardinality Class 4: More Infinities [Slides]
Cantor’s Power Set cardinality theorem Implications of Cantor’s result Finite Computation Class 5: Defining Computation [Slides]Installing Python
https://uvatoc.github.io/python/
Mon, 01 Jan 0001 00:00:00 +0000https://uvatoc.github.io/python/If you already have python3 on your machine, you should be good to go for the programming problems.
If you don’t, please follow these directions to download Python and PyCharm (you’re welcome to use any IDE that you want, we semi-arbitrarily picked PyCharm).
Windows Install Python 3.6.4 (If you have a different version of Python, you still must install 3.6.4 seperately!):
Download the executable x86-64 installer from python.