title: Introduction to Theoretical Computer Science
# CS181: Introduction to Theoretical Computer Science Fall 2022
| [HOME](http://www.raghumeka.org) | [RESEARCH](http://raghumeka.github.io/research.html) | [TEACHING](http://raghumeka.github.io/courses.html) |
| -------- | -------- | -------- |
The official title for the course is ***Formal Languages and Automata Theory***. This offering will be geared towards introducing you to the beautiful and profundly impactful world of ***Theoretical Computer Science*** (TOC). The following three questions encompass our main learning goals:
:::spoiler 1. What is computation?
How different is the iMac Pro really from Apple III?
:::spoiler 2. Can we compute our way out of everything?
How about predicting `Stack Overflow` errors at compile time?
:::spoiler 3. What can we compute efficiently?
The computational version of *are we there yet?*
At the end of the course I hope you would have learnt something about the nature of computing, universality in computing, and limitations of computing. You can check last year's version [here](http://hackmd.io/@raghum/intrototcs21).
## Logistics and Resources
:::spoiler **Lecture hours: M-W 12-1:50 :** **Mong Learning Center, Engineering VI**
- [Zoom link](https://ucla.zoom.us/j/94844320897).
- Lecture 10 will be held remotely on Friday 10/28 from 2-3:50 (and recorded). (As we will have Exam 1 during regular class hours on 10/26).
- Lecture 16 will be held remotely on Friday 11/18 from 2-3:50 (and recorded). (As we will have Exam 2 during regular class hours on 11/16).
:::spoiler **Course notes**: We will use [ScribbleTogether](https://scribbletogether.com/).
- Note that each lecture is on a different sheet within the files.
- [Notes for Week 10](https://scribbletogether.com/whiteboard/397A85FC-26D6-4811-AD27-1E28EFD02391)
- [Notes for Week 9](https://scribbletogether.com/whiteboard/9D398216-C403-4C21-BC3D-EA6F6AABB940)
- [Notes for Week 8](https://scribbletogether.com/whiteboard/C37DE308-E6CA-443E-B4BC-7C1F59F40DEC)
- [Notes for Week 7](https://scribbletogether.com/whiteboard/58DDF802-DCB7-4D6E-8112-A3DD480C74EC).
- [Notes for Week 6](https://scribbletogether.com/whiteboard/34084067-ABB9-4F9A-BFFA-341F621A483F).
- [Notes for Week 5](https://scribbletogether.com/whiteboard/B5B1AB66-B192-4134-8474-7FC3EB549FDA).
- [Notes for Week 4](https://scribbletogether.com/whiteboard/7CD2FCB2-0D28-410C-BE04-BD60F0CD804E).
- [Notes for Week 3](https://scribbletogether.com/whiteboard/C1973078-F2EC-4064-945A-F9A464F200F2).
- [Notes for Week 2](https://scribbletogether.com/whiteboard/6210C4D3-A285-4022-941A-629A5BBBBD2F).
- [Notes for Week 1](https://scribbletogether.com/whiteboard/E6FBA4E3-E409-4C16-B158-95B213044D30).
:::spoiler **Course team**:
- Sahil Bansal: Sahil is a MS student in the Computer Science department interested in ML and NLP. Feel free to reach out at email@example.com.
- Evan Becker: Evan is a PhD student in the computer science department interested in ML theory. When not at the computer he enjoys going on hikes and playing intramural soccer. Feel free to reach out at firstname.lastname@example.org!
- Hadley Black: Hadley is a PhD student working in theoretical computer science. He also enjoys rock climbing and chess. You can email him at email@example.com.
- Ashutosh Kumar: Ashutosh is a Phd Student interested in theoretical computer science. Feel free to reach out at firstname.lastname@example.org.
- Yunus Chang: Yunus is an MS Student interested in AI. Feel free to reach out at email@example.com.
:::spoiler **Discussion Sections Hours**: Fridays. Expand for hours.
- Section A: 12 - 1:50 Royce Hall 362; (Ashutosh Kumar)
- Section B: 2 - 3:50 Haines Hall A2; (Sahil Bansal)
- Section C: 2 - 3:50 Perloff Hall 1102; (Evan Becker)
- Section D: 2 - 3:50 Public Affairs Building 2232; (Hadley Black)
- Section E: 4 - 5:50 Dodd Hall 175; (Yunus Chang)
:::spoiler **Office Hours:** Exploit these!
1. **Instructor office hours**: Monday, 2-3; Wednesday 4:30-5:30, Engineering VI 463 and on [Zoom](https://us05web.zoom.us/j/5083359390).
2. **TA office hours**:
- Sahil Bansal: Mon/Wed 10:30-11:30am (on [Zoom](https://ucla.zoom.us/j/93449538975)) (no OH Mon 9/26)
- Evan Becker: Tues/Thurs 10:30 - 11:30am (Boelter 3256S-E)
- Hadley Black: Tues 12-1pm (on [Zoom](https://ucla.zoom.us/j/4872080302)), Thurs 12-1pm (Boelter 3256S-A)
- Ashutosh Kumar: Mon/Wed 3:00 - 4:00pm (Engineering VI 478B/497)
- Yunus Chang: Mon/Wed 4:30-5:30pm (Boelter 3256S-D)
:::spoiler **edStem:** Our online space for asking, answering questions, and posting links to class material. Register [here](https://edstem.org/us/join/6Nfyej).
We will make use of edStem extensively. It will be our main way for communicating with each other. Please ask questions here so that others may also benefit from the knowledge.
We will also use it for releasing homework solutions. Homeworks themselves will be posted on the class website.
Register using the link emailed to your address on file (with CCLE). You can also register via the link above along with the code provided in first lecture.
:::spoiler **Homework submission**: On Gradescope; Due 9:59PM (Pacific time) on due date.
We will use Gradescope for homework and they have to be submitted by 10PM on their due date. Things to keep in mind: 1) Within a week of the course, you should receive a registration link from Gradescope. If you don't receive it before the first homework, contact the TAs immediately; this will give you access to the website. 2) Watch [this](https://www.youtube.com/watch?v=u-pK4GzpId0) one-minute video with complete instructions. Follow them to the letter! The simple guidelines make the process considerably smoother. 3) Make sure you start each problem of a homework on a new page. 4) To generate a PDF scan of the assignments, you can follow the instructions [here](https://raghumeka.github.io/CS180/submitting_hw_guide.pdf); you can also use the scanners in the library.
:::spoiler **Homework writing**: LaTeX recommended highly
It is strongly recommended to use LaTeX or other word processing software for submitting the homework. Grades will take into account both the correctness and the quality of the solutions. Correctness is a prerequisite but clarity is also important: you are responsible for communicating your solution in a legible and understandable way.
Some helpful guidelines: (1) Start early to use office hours. (2) Serious/honest attempts count - there will be reasonable partial credit for attempts that show understanding of the problem/concepts involved.
:::spoiler **Textbook**: [Introduction to Theoretical Computer Science by Boaz Barak](https://introtcs.org/public/index.html)
The textbook is available for free on the web with many other very useful resources. We will follow this very closely. Another great textbook to peruse is the classical [Introduction to Theory of Computation](https://www.cengage.com/c/introduction-to-the-theory-of-computation-3e-sipser/9781133187790/) by Michael Sipser.
If you are interested in learning more about TOC, for advanced but high-level overview these [two](https://www.cambridge.org/core/books/quantum-computing-since-democritus/197A4CD13738E10AAD787DBB78D8E92C) [books](https://www.math.ias.edu/avi/book) are highly recommended.
- [Homework 6](https://ucla.box.com/s/cujnrsxawqzsci0bbgoe7ss06tfg3y89) . [Tex Source](https://ucla.box.com/s/zr5bk4odxr82usw4vnkjbww5ijxqipb8)
- [Homework 5](https://ucla.box.com/s/bhih8w8fyj98dbdhrlfs3qxkpwd5cd35) . [Tex source](https://ucla.box.com/s/dg65qhrscvqvkanah70nwi94yz6gb2ny)
- [Homework 4](https://ucla.box.com/s/kabex59c0blfw3fimaodc3j4ssizrir1) . [Tex source](https://ucla.box.com/s/y0svkukz0bs483v1824gn3kfy598lh7n)
- [Homework 3](https://ucla.box.com/s/1w1996oqgqy7ttbrihca3s0o45f60ogp) . [Tex source](https://ucla.box.com/s/ivy13bbi4dut7demwi8m3prd3a82ec7c)
- [Homework 2](https://ucla.box.com/s/lj4zt9od3mep6spnqxa37l4qthbaybdm) .[Tex Source](https://ucla.box.com/s/x5nmhyd88ee3tb0kr4saynk8qt772l7i)
- [Homework 1](https://ucla.box.com/s/68bkgq3mm7zorfjjawtsn2of2gsp3lhm) . [Tex Source](https://ucla.box.com/s/cg4zsh0rc3fsdi9d83lv7aa0eqcrxeip)
::: spoiler **Homeworks: 6 x 4 pts**.
Homeworks are released on Monday (by 7PM Pacific). Homeworks 1-5 will be due the following Monday (by 9:59 PM Pacific). Homework 6 will be due on Sunday at 9:59 PM Pacific (as final is on Tuesday).
::: spoiler **Homework Coverage and Dates**: Expand to see details.
- HW 1 Oct 3 - 10: Lectures 1,2,3,4.
- HW 2 Oct 17 - 24: Lectures 5,6,7,8.
- HW 3 Oct 31 - Nov 7: Lectures 9,10,11.
- HW 4 Nov 7 - 14: Lectures 12,13,14.
- HW 5 Nov 21 - Nov 28: Lectures 15,16,17,18.
- HW 6 Nov 28 - Dec 4: Lectures 19,20
::: spoiler **Exams: 25, 25, 26 pts**. We will have three non-cumulative exams in the course. Exam 1, Exam 2 will be in class (Mong Learning Center) during lecture hours. Exam 3 will be as per university schedule (but only two hours).
::: spoiler **Exam Coverage and Dates**: Expand to see details.
- Exam 1 Oct 26 12-1:50 (Lecture time - Mong): Lectures 1,2,3,4,5,6,7,8.
- Exam 2 Nov 16 12-1:50 (Lecture time - Mong): Lectures 9,10,11,12,13,14.
- Exam 3 Dec 6 (Scheduled: 8-10 AM): Lectures 15,16,17,18,19,20.
Broad outline of the course content.
- Introduction: 2 Lectures (Chapters 0,1,2)
- Circuits: 3 Lectures (Chapter 3,5)
- Automata: 4 Lectures (Chapter 6)
- Turing Machines: 3 Lectures (Chapter 7,8)
- Universality and Computability: 3 Lectures (Chapter 9)
- Restricted Models of Computation: 2 Lectures (Chapter 10)
- Godel's Incompleteness Theorem and Recursion: 3 Lectures
## Course Policies
- There will be no makeup exams for the course. If the above dates do not work for you, you need to talk to me within the first week of classes.
- Regrade requests need to be submitted electronically on Gradescope within a week of receiving the graded work. Requests later than a week will not be handled (mainly to keep things flowing).
- If you are unsatisfied with the online response for your regrade request, bring it up during TA office hours. If that also does not resolve it, and only then, you can bring it up during instructor office hours (so that we have time to discuss course material during the limited office hours).
- We will use edStem for questions and discussions. Please ask questions related to assignments on that platform and not via email. Use this platform so that others can also benefit from your questions; if you want to communicate a private question, you can also do that on edStem.
- Collaboration on homeworks is encouraged, but each student must write their solutions independently and should clearly mention the collaborators. Keep in mind that just attempting the homeworks itself will get you reasonable partial credit and will go a long way towards better performance in the exams (which carry significantly more weight). You should never share your written solutions with someone else or copy from someone else's written solutions. Under no circumstances may you use solution sets to problems from previous year courses or from similar courses elsewhere or other resources on the web.