Theory of Computation
CSE105F24
Is there a problem that NO computer can ever solve?
What resources are needed to solve a problem?
Are some problems harder than others?
In this course, we will explore what it means to be "computable".
We begin with a very constrained model of computation, and work our way to the most powerful, the Turing machine. We'll see how remarkable this model is in terms of how much it captures about the capabilities of computation, even though it appears far removed from implementation. Alan Turing formalized the notion of "algorithm" using this model even before there were any physical computers. Remarkably, it is still relevant today and is equivalent to supercomputers and quantum computers!
We'll also explore the relationship of these models to some essential tools in a computer scientist's toolkit, such as regular expressions and reductions. Throughout the course, you'll develop your technical communication skills in writing formal arguments and proofs.
Syllabus
- A typical week
- We'll meet in class on Mondays, Wednesdays, and Friday. Each week, we'll release a packet of notes that we'll work through together during class. You can download a PDF of these notes to annotate, or you can pick up a printed version in class. The notes will also refer to textbook sections we ask you to read before class. Wednesday afternoons are discussion sections, where you can work through additional questions and review homework. Weekly review quizzes will test your understanding and prepare you to complete the weekly open-ended homework assignments. In addition to these quizzes and homework assignments, you'll demonstrate what you learned in two in-person, self-scheduled tests, and you'll complete an individual, open-ended project. We recommend talking about CSE 105 concepts with other students, and with the instructional team in class, discussion, and drop-in office hours.
- Pre-class survey
- Please fill out the pre-class survey on Canvas labelled #FinAid .
- Notes and resources
- Use our Calendar to get links to class times and notes. Lecture material is available in PDF, tex, and html formats so you can download and annotate or print it if you'd like. In class, we'll explore concepts and work through examples. There will often be some pre-class reading (listed on the notes PDF) to help you prepare for class. The reading is often just a few lines of text or an example in the book and will be very helpful so we can jump into problem solving in class. You can also watch the posted supplementary videos listed with each week.
- Learn by doing
- After each class, you'll work on review quizzes to track and confirm your understanding of the concepts and examples we covered in class. Quizzes are on PrairieLearn; we recommend completing the quiz questions for each week's material before the next week begins. Open-ended (group-optional) homework assignments will stretch your understanding and will ask you to put together complete, coherent, convincing explanations. You will upload PDFs of your typed solutions on Gradescope. There will also be a project and two (in-person, self-scheduled at the Computer Based Testing Facility) tests. In each of these assessments you will practice using precise language to represent and solve technical problems and to communicate your solutions, and you will get feedback on your work.
- Collaborate
- In-class, in office hours, and on the online discussion board, we encourage you to discuss the course concepts and examples. Review quiz questions are open to collaboration with everyone in CSE 105. To get the maximum benefit from working on homework assignments, we encourage you to find a group to work with. Students in previous versions of the class often found group conversations helped them learn the material more deeply, and were fun (and also an evidence-based practice for learning). To find group members: reach out to people sitting around you in class, in discussion section, or during office hours; you can also use the "find teammate" tool on Piazza. The pre-survey asks if you want help finding group members: the CSE 105 instructional team can help you connect with other students. We highly recommend meeting synchronously so that your group can work through the homework problems *together* ( in person or online). Permitted collaboration is described in the grading and academic integrity section.
- Ask for help
- Reach out to the CSE 105 team if you have questions. The CSE 105 instructional team this quarter is one instructor (Mia Minnes), two TAs, and eight tutors. On our Canvas page, select "People" and filter by "Roles" to see our names, contact information, and brief profiles. This term we will be using Piazza for class discussion; you can access Piazza through our Canvas site or directly (the Piazza roster is synced to the Registrar class list and waitlist). Drop-in (in person and Zoom) Q&A times are listed on the office hours page. You can also reach out to your instructor directly by email: minnes@ucsd.edu . To address me, please use Prof. Minnes, Dr. Minnes, and/or Mia (with pronouns she/her), as you feel comfortable. Please do not use the title Ms./ Mrs. for me.
Resources
Textbook and lecture resources
Lecture material is available in PDF and html formats so you can download and annotate or print it if you'd like. If you would like a hard copy of the notes and don't have access to a printer, please let your instructor know (minnes@ucsd.edu).
The required textbook for this course is Sipser, Michael Introduction to the Theory of Computation . We highly recommend this book for the class - it's very well-written and we'll be using it extensively. For a physical copy, the Third Edition of this book is available through multiple vendors; we've seen it listed online for approximately 30 dollars. The library has a copy on reserves. I also have a number of copies of the textbook available to borrow for the term if you have difficulty accessing the book. Please reach out (minnes@ucsd.edu) to arrange a time to pick up a copy.
To brush up on proofs, you can refer to: Richard Hammack, Book of Proof, 2nd ed. (available for download here).
Typesetting (LaTeX) Resources
All submitted homework for this class must be typed. Diagrams may be hand-drawn and scanned and included in the typed document. You can use a word processing editor if you like (Microsoft Word, Open Office, Notepad, Vim, Google Docs, etc.). You might find it useful to take this opportunity to learn LaTeX. LaTeX is a markup language used widely in computer science and mathematics. The homework assignment prompts are typed using LaTeX and you can use the source files as templates for typesetting your solutions (click the "LaTeX" button at the top of each assignment on the Assignments page to download the source files).
If you have never used LaTeX, we recommend cloud resources that don't require you to download and install LaTeX on your local machine. A good example is Overleaf, which has lots of documentation. Overleaf works similar to Google Docs in that all members can edit the file in parallel and changes are updated in real time. There is a way to directly invite group members to your document, but the free version of Overleaf only allows two people to work at the same time. If your group has 3 people, you can turn on link sharing: Click on “Share” in the top right, Click “Turn on link sharing”, Copy the displayed link and share it with your group members. To export your work, click on the “Download PDF” button on the right-hand side. If you want to export the raw source files, click on the "Menu" button in the top-left, then click on "Source".
This open source LaTeX reference can be helpful when getting started, and you can use the .tex source of all the files we use in class as templates.
Alternatively, you can use Google Docs, which is available through your @ucsd.edu account. You can create documents and then share them with your group members with manual invites or a shareable link. Google Docs has a LaTex add-on that lets you type formulas in a math typesetting environment: search for "Auto-LaTeX Equations" if you want to try this option. You'll need to use the display environment (start and end with $$) for all the portions you want rendered with LaTeX.
Software tools for state diagrams and formal models
flap.js is a webapp under development by a group of UCSD students that is being piloted in CSE 105. Click the "Help" icon for a tutorial for using the app, and hit "Save" to download an image of the diagram you create or to get a permalink for your machine. flap.js is being customized for use in this class; the github repo is https://github.com/flapjs . You can find older versions of the app there, e.g https://flapjs.github.io/FLAPJS-WebApp/ , if you're curious in its development. At the end of the quarter, you can also let me know if you're interested in joining the development team for flap.js to help future CSE 105 students.
JFLAP was developed starting in the 1990s by a team led by Susan Rodger (RPI, then Duke). It is now a mature tool with a lot of functionality, but some of the conventions and notation it uses are different from the course textbook for CSE 105. You can follow the instructions on the JFLAP website to download and install the current stable version (you may need to install the Java Virtual Machine as well). If you use JFLAP, here are some things to keep in mind:
- Regular expressions
- Do not use whitespace in your regular expressions unless a space is a valid symbol in the alphabet. JFLAP uses a + symbol instead of the U used in the textbook to indicate union.
- Start and Accept States
- Don't forget to specify these when drawing your automata!
- Multiple Transitions
- If you need multiple possible inputs for the same arrow in your diagram (e.g. if you can move between states on either a 0 or a 1), this is done by creating separate edges in JFLAP for each input symbol. JFLAP will combine these into one arrow on your diagram. Automata with transitions labeled with a comma (e.g. "0,1") are not equivalent, because those transitions will not be followed unless "0,1" actually appears in your input string.
- Empty String
- In class and in the textbook, we use ε (epsilon) to denote the empty string. The instructions above help you change the JFLAP default λ (lambda) to match our conventions. If you need a state transition (or a stack symbol for PDA's) for ε, do not enter any characters into the text box for that transition and ε will appear. Entering a space does not work; that transition will be followed only if the input string has a space on it. Similarly, entering E or "epsilon" will not work because JFLAP will try to match those exact symbols in your input string for the transition.
- Push Down Automata
- Each transition has three labels: an input symbol, a stack symbol to pop, and a stack symbol to push. JFLAP uses the semicolon (;) instead of a right arrow to separate the stack symbols. Any of the three labels can be the empty string. Settings: Your PDAs should be "Single Character Input" (this option appears when you first create an automaton), and they should accept by final state, not by empty stack.
- Context Free Grammars
- If you have a production rule of the form "S -> A | B", enter it as two rules "S -> A" and "S -> B"
Grading and academic integrity
Grades in this class are designed to reflect your work and to document evidence of your learning this core material. Please reach out to your instructor (minnes@ucsd.edu) if you face extenuating circumstances that you think will impede your ability to participate in the planned CSE 105 activities; I'd like to work out a solution together.
There are two kinds of graded components for CSE 105: assignments and tests.
- Assignments
-
Homework: open-ended, group optional homework is due (most) Tuesdays at 5pm and is associated with the
class material from the previous week or two.
Assignments are listed on the assignments
page.
Homework assignments give you practice with the main concepts and techniques of the course, while getting to know and learn from your classmates. These homework assignments may be done individually or in groups of up to 3 students. You may switch homework partners for different homework assignments. Please ensure your name(s) and PID(s) are clearly visible on the first page of your homework submission and then upload the PDF to Gradescope. If you're working in a group, submit only one submission per group: one partner uploads the submission through their Gradescope account and then adds the other group member(s) to the Gradescope submission by selecting their name(s) in the "Add Group Members" dialog box. You will need to re-add your group member(s) every time you resubmit a new version of your assignment.
Each homework question will be graded either for correctness (including clear and precise explanations and justifications of all answers) or fair effort completeness. On the "graded for correctness" questions, you may only collaborate with CSE 105 students in your group; if your group has questions about a problem, you may ask in drop-in help hours or post a private post (visible only to the Instructors) on Piazza. On the "graded for completeness" questions, you may collaborate with all other CSE 105 students this quarter, and you may make public posts about these questions on Piazza.
Review quizzes: weekly, multi-attempt quizzes on PrairieLearn. The review quizzes can also be used to demonstrate your achievement with relevant concepts even after the homework is due: earning full credit on the quizzes relevant to a homework assignment will increase your grade on that assignment by one letter grade (if possible). For example, if your homework assignment earned a grade of B and have credit for the quiz(zes) associated with that assignment, then that assignment will be recorded as an A. Also, if you did not submit a homework assignment but you have credit for the quiz(zes) associated with that assignment, then that assignment will be recorded as a C.
Project: In the project you'll go deeper and extend your work to explore an application of your choosing. The project is an individual assignment, and is listed on the assignments page. It will serve as the take-home final for the class and is due on Gradescope during the published final exam time.
The late submission deadline for assignments is there as a buffer if you have technical issues or extenuating circumstances at the deadline. There are no submissions after the late submission deadline. I recommend starting homework assignments well before the deadline and submitting early drafts so that last minute extenuating circumstances do not have as big an impact. If there are extenuating circumstances that prevent you from submitting a homework please use this form to let us know: https://forms.gle/ju7tcSZXSjSvfe9x5 . Completing this form does not mean that we will be able to accept a late submission of the assignment. However, it can help us work with you to support your work in this class.
- Tests
-
There are two 45-minute tests in the course, and you can sign up for
up to two attempts at each. You must self-schedule the tests to be
taken in-person at the Computer Based Testing Facility (CBTF).
Test 1: Attempt 1 available 11/4/2024 - 11/6/2024, Attempt 2 available 12/2/2024 - 12/6/2024.
Test 2: Attempt 1 available 11/25/2024 - 11/27/2024, Attempt 2 available 12/2/2024 - 12/6/2024.
Having two attempts for each test helps the tests serve as learning opportunities so that you can study any mistakes you make and re-apply that knowledge on the second attempt. You do not need to take both attempts for each test. At the end of the quarter, for each test we will record your highest attempt grade.
Tests for this course will be administered by the Triton Testing Center (TTC) in the Computer-Based Testing Lab in AP&M B349. The TTC's rules concerning testing are the rules for this course.
You must schedule your tests in advance, and it is recommended that you do so as soon as possible. Scheduling for all tests opens on the first day of instruction. To schedule, visit prairietest.com and log in with your UC San Diego credentials (after selecting "Sign in with Google").
More information about testing policies and procedures can be found on the TTC's website. You may also email tritontesting@ucsd.edu for assistance.
Please note that, if you plan to use OSD-approved accommodations for your test, you will take it at the TTC's Pepper Canyon Hall location. You must schedule your test at least three days in advance through the RegisterBlast system.
There are no make-up tests for the tests during the quarter.
At the end of the quarter, grades will be assigned according to the following standards:
- A
- A on one test and B or above on the other test
- And:
A on at least 4 homeworks, B or above on at least one homework, any grade on remaining homework - And:
Passing grade on the project. Modifiers: A+ for exceptional projects; A- if the grade on the project is B or lower. - B
- B or higher on both tests or A on one of the tests and C on the other
- And:
B or above on at least 4 homeworks, C or above on at least one homework, any grade on remaining homework - And:
Passing grade on the project. Modifiers: B+ if the grade on the project is A; B- if the grade on the project is C or lower. - C
- C or higher on both tests
- And:
C or above on at least 3 among the homeworks and the project, any grade on rest of assignments. Note: you do not need to pass the project to pass the class if you earn passing grades on at least three assignments (after review quiz credit is factored in). Modifiers: C+ if the grade on the project is B or higher; C- if the grade on the project is not passing.
The assigned letter grade will be the highest grade for which the standards are met. The project is also used to add +/- modifiers at the end of the quarter. We may adjust the above scale to be more lenient, but we guarantee that we will not adjust the scale to make it harder to get a better grade.
The UC San Diego Academic Integrity pledge is here. Academic integrity violations will be taken seriously and reported to the campus-wide Academic Integrity Office. Key facts about academic integrity related to CSE 105:
- ✓ Use only resources explicitly allowed for each assignment. Resources not affiliated with this quarter's version of the class may use inconsistent notation or definitions. If you need help, please reach out to the instructor, TAs, and tutors.
- ✓ Do not share written solutions or partial solutions for homework with other students in the class who are not in your group. Doing so would dilute their learning experience and detract from their success in the class.
- ✓ Before and during taking any individual assessment, do not attempt to obtain information about the contents of the test from students who have already taken it or from any nonauthorized source.
- ✓ You may not ask for help from anyone while taking individual assessments since they are intended to reflect your own mastery of the material. In particular, you may not collaborate on exam questions with other students in the class and you may not post any portion of the exam on forums where others may assist you.
- ✓ After taking an exam or test, do not discuss its contents with anyone in the class who has not yet taken it. Do not post information about it or share information about it with others who haven't taken it.
UC San Diego has fantastic resources to support your learning, with integrity. Of course, the instructional team for CSE 105 is here to help you navigate the course content. The Jacobs School of Engineering IDEA Center organizes group study sessions and can connect you with student organizations. The Teaching and Learning Commons continues to offer their full suite of student success programs, including learning strategies coaching.
Sometimes, circumstances beyond a student's control prevent them from completing a class even once they have completed the majority of the coursework at a passing level. UCSD has a process in place for you to request an Incomplete (I) if this happens to you. Here is the campus policy about the Incomplete grade: https://senate.ucsd.edu/Operating-Procedures/Senate-Manual/Regulations/500 and some information about it: https://students.ucsd.edu/academics/exams-grades-transcripts/grades/request-remove-incomplete.html
Policies
Late Adds
I follow the CSE department guidance on Late Adds, namely that "all students are expected to attend class for the first two weeks and complete assignments if they are on the waitlist for a course. Attending class and completing course assignments does not guarantee enrollment. If students choose to miss class or not turn in assignments while on the waitlist, the student will receive a "0" on all missed assignments, if they secure a seat in the course off the waitlist."
Regrades
The window for requesting regrades once assignment feedback has been published will be set in Gradescope and will typically be 2-3 days. If you submit a regrade request, please include a brief but detailed explanation of why you think there was an error in the grading. A regrade request may lead to us reviewing the entire assignment and may lead to the score being adjusted up or down depending on any errors found in the original grading. All regrades will be considered once the regrade window closes; thank you in advance for your patience while we carefully look through them.
Computer Based Testing Facility (CBTF)
Tests for this course will be administered by the Triton Testing Center (TTC) at AP&M B349. The TTC's rules concerning testing are the rules for this course. You must schedule your tests in advance. To do so, visit http://us.prairietest.com and log in with your UC San Diego credentials after selecting "Sign in with Google". More information about testing policies and procedures can be found on the TTC's website https://tritontesting.ucsd.edu/. You may also email tritontesting@ucsd.edu for assistance.
Students must schedule their tests in advance. Walk-ins are not permitted. Students are allowed to change their reservation until 10 minutes before the test begins.
Students must store all personal belongings in the designated lockers before entering the testing room. The only permitted items are writing utensils and physical identification. All other items are strictly prohibited.
Accommodations for students with disabilities
We would like to work with each of you to make this course accessible and approachable. All course material is available in multiple formats to improve support for screen readers. Videos will also be captioned (to the best of our abilities). We need and want to hear from you if additional accommodations would improve your experience in the course. If you have documented need for accommodations because of a disability, please work with the Office for Students with Disabilities (OSD) to get a current Authorization for Accommodation (AFA) letter. The office is located in University Center 202 behind Center Hall and also provides the OSD Student Portal. We ask that you work to organize the AFA and to let us know about it as early in the quarter as possible so that we can best support your needs. For more information, see Disability Resources at UCSD.
Class material and intellectual property
Our lectures and course materials, including videos, assignments, and similar materials, are protected by U.S. copyright law and by University policy. We are the exclusive owner of the copyright in those materials we create. We acknowledge the cumulative contributions to this course material of previous CSE 105 instructors, TAs, and tutors, as well as contributions to the class structure from colleagues in CSE and at UCSD.
You may take notes and make copies of course materials for your own use. You may also share those materials with another student who is enrolled in or auditing this course. You may not reproduce, distribute or display (post/upload) lecture notes or recordings or course materials in any other way — whether or not a fee is charged — without our express prior written consent. You also may not allow others to do so. If you do so, you may be subject to student conduct proceedings under the UC San Diego Student Code of Conduct.
Similarly, you own the copyright in your original work. If I am interested in posting your answers or papers on the course web site, I will ask for your written permission.
Solicitation
Individuals are not permitted to approach students to offer services of any kind in exchange for pay, including tutoring services. This is considered solicitation for business and is strictly prohibited by University policy.
Satisfactory Academic Progress
Satisfactory Academic Progress (SAP) refers to the academic standards students must maintain to remain eligible for federal, state, and institutional financial aid. If you are receiving financial aid, please ensure you review the SAP requirements and the appeals process. https://fas.ucsd.edu/forms-and-resources/sap/index.html
Student Conduct Policy
UC San Diego strives to maintain a climate of fairness, cooperation, and professionalism. It is expected that you practice basic principles, including, but not limited to, mutual respect, civility, and decency, towards maintaining an atmosphere free of abusive or demeaning treatment. Non-academic student misconduct will be reported to the Center for Student Accountability, Growth, and Education for violating UC San Diego's Principles of Community.
Learning goals
You can find the learning outcomes for CSE 105 in this overview page. The Theory-CS homepage also links to archived course sites.