COS 341: Computability and Complexity
Fall 2024
Basic Information
- Instructor: Jed Yang, CC221,
- Office hours: Tuesday 10:55–11:55 and Friday 11:55–12:55; or by appointment (instructions)
- Lectures: Mod D (MWF 12:30–13:40) in RC229
- Course website: https://www.mathcs.bethel.edu/yang/cos341.24f/
Calendar
Schedule to be updated throughout the term; topics and exam dates are tentative and subject to change.Before class, please read the textbook section(s) to be covered. After class, start doing homework as soon as possible.
Week | Monday | Wednesday | Friday |
---|---|---|---|
Unit 1: automata theory | |||
1 | 1. 09/04 W introduction an undecidable problem | 2. 09/06 F 0.1–4 computational problem | |
2 | 3. 09/09 M 1.1 deterministic finite automata | 4. 09/11 W regular operations | 5. 09/13 F 1.2 nondeterminism |
3 | 6. 09/16 M DFA-NFA equivalence $\varepsilon$-transitions | 7. 09/18 W regular operations (reprise) 1.3 regular expressions | 8. 09/20 F DFA-regexp equivalence |
4 | 9. 09/23 M 1.4 nonregular languages | 10. 09/25 W pumping lemma | 11. 09/27 F 2.1 context-free grammars |
5 | 12. 09/30 M 2.2 pushdown automata | 13. 10/02 W context-free languages wrap-up | (fall break) |
Unit 2: computability theory | |||
6 | 14. 10/07 M exam1 | 15. 10/09 W 3.1 Turing machines | 16. 10/11 F recursive languages - examples |
7 | 17. 10/14 M recursively enumerable languages - closure | 18. 10/16 W 3.2 TM variants - nondeterminism | 19. 10/18 F 3.3 encoding 4.2 diagonalization |
8 | 20. 10/21 M 5.1 undecidable problems - halting problem - universality | 21. 10/23 W reductions - acceptance problem | 22. 10/25 F more reductions - emptiness problem |
9 | 23. 10/28 M 3.2 enumerators | (advising day) | 24. 11/01 F 3.3 Church–Turing thesis |
Unit 3: complexity theory | |||
10 | 25. 11/04 M 7.1 measuring complexity | 26. 11/06 W undecidability discussion | 27. 11/08 F exam2 |
11 | 28. 11/11 M 7.2 P | 29. 11/13 W 7.3 NP | 30. 11/15 F verifiers |
12 | 31. 11/18 M 7.4 Karp reductions | 32. 11/20 W NP-completeness | 33. 11/22 F Tilings |
13 | 34. 11/25 M some NP-complete problems | (Thanksgiving) | (Thanksgiving) |
14 | 35. 12/02 M Cook–Levin theorem | 36. 12/04 W SAT variants | 37. 12/06 F 7.5 more NP-complete problems |
15 | 38. 12/09 M even more NP-complete problems | 39. 12/11 W (catch-up) | 40. 12/13 F (wrap-up) |
Final Exam: 12/16 Monday 14:45–16:45 |
Course Information
- Official course description: Investigate two big questions: How efficiently can computers solve problems? Are there problems that cannot be solved by computers at all? Computability theory: formal models of computation, Turing machines, universality, reductions, nondeterminism, and the Church–Turing thesis. Complexity theory: polynomial-time mapping reductions, NP-completeness, and the famous "P versus NP" problem.
- Unofficial course description:
In Computability and Complexity, we are interested in two big questions:
- What problems can be solved "efficiently" by a computer?
- Are there problems that cannot be solved by a computer at all?
We start with the second question, which is at the heart of computability theory. We will see there are many mathematical/programming problems that cannot possibly be solved by any computer of any kind: past, present, or future. Topics include formal models of computation, Turing machines, universality, reductions, nondeterminism, and the Church–Turing thesis.
In the second half of the course, we turn our attention to complexity theory, addressing the first question. After defining what "efficiently" means, we will examine problems that can or cannot be solved efficiently. Topics include polynomial-time mapping reductions, NP-completeness, and the famous "P versus NP" problem.
- Prerequisites:
To register for COS341, you should have both:
- MAT241 with C- or higher; AND
- COS100 with C- or higher (or equivalent proficiency)
These are the prereqs I actually care about. If you do not satisfy this list, please talk to me before registering.
- Textbook:
- Required:
Michael Sipser,
Introduction to the Theory of Computation,
3rd edition, 2013, ISBN: 9781133187790.
The textbook is available from Library Course Reserves for 3 hours at a time.
- Supplemental:
If you want a different perspective, here are two books you may consider:
What Can Be Computed? by John MacCormick is available from Library Course Reserves for 1 week at a time. It covers the same material but with a more practical perspective using Python as much as possible.
Automata and Computability by Dexter Kozen is available to read online. It is a bit more advanced; some parts will be presented in class.
- Required:
Michael Sipser,
Introduction to the Theory of Computation,
3rd edition, 2013, ISBN: 9781133187790.
Objectives
By the time you've completed the course, you will be able to:- Explain the difference between several models of computation (including finite automata and Turing machines) and prove results about what languages may be recognized by each model.
- Explain what different time complexity classes refer to (e.g., P, NP) and prove that particular languages are in each class.
- Explain what it means for a question to not be decidable by a computer, and give examples of undecidable problems.
- Relate the theoretical topics we discussed to more applied questions that come up in computer science. For example, why would it be useful to know that a problem you are trying to solve is NP-complete?
Grading
Your grade will be determined by a weighted arithmetic mean of various components with weights listed in the table on the right.component | weight |
---|---|
Participation | ±2% |
Homework and projects | 49% |
Exams and quizzes | 49% |
Note that there is no preset curve of how many of each letter grade will be given. If you all do A-level work, you will each get an A. As such, you are encouraged to help each other in the pursuit of perfection.
In many courses I intentionally make one exam harder than others, which gives me information (in a mathematical sense) in separating an A performance from an A- performance. Typically, I will let you know and adjust that exam's scores upward. What this means is that you should NOT care about how hard an exam is. If you do A-level work, you will get an A, regardless of the raw numerical score prior to adjustment.
Besides possibly adjusting scores upward for difficult exams, I also reserve the right to lower the grade cutoffs. Both of these help you. I will not hurt you by adjusting your exam scores downward or increasing the grade cutoffs.
Requirements
Whatever you do, work at it with all your heart, as working for the Lord, not for human masters, since you know that you will receive an inheritance from the Lord as a reward. It is the Lord Christ you are serving.I will be trying to make these verses true for me as I work with you throughout this course, and I hope that you will, too.- Colossians 3:23–24 NIV
Attendance and participation. I expect you to attend class. You may not notice me taking attendance during class meetings, but I will notice if you are not in class. Occasional absences will not impact your grade because what I look for is not mere attendance, but engagement and participation.
Indeed, coming to class is not just about showing up; it is also about being fully engaged in the learning experience. If you have a question, others in the class may also be wondering the same thing. So, please speak up and ask questions anytime you need to. Not only will you be helping yourself, but also you will be helping your peers. Attending office hours is another great opportunity to ask questions.
Be mindful of others. Refrain from using mobile phones or laptops for activities unrelated to the learning process. If you prefer to use laptops to take notes, please kindly sit in the back, as the screen may distract others. There is research that suggests taking notes by hand is better for long-term retention (P. A. Mueller and D. M. Oppenheimer, The pen is mightier than the keyboard, Psychological Science 25 (2014), 1159–1168).
Silence and put away mobile phones and do not use laptops for anything other than class-related activities.
It is my sincere hope that every one of you get all the points for attendance and participation.
Reading. Read the book! You should prepare for class by looking over the sections we will cover. Your aim is not to understand every detail, but to get a sense of where we are headed. Even a few minutes of pre-reading can help with class time. We will not have time to cover every single detail in class. As such, after class, read the sections carefully again to fill in the gaps. Keep up with the reading: reading large sections right before an exam is less effective.
Homework. Homework will be assigned most days. The goal of the homework is to give you an opportunity to continuously engage directly with the material. Some of the homework questions are meant to be challenging and to stretch you; simply put, I believe that the homework is where you will do the vast majority of your learning in this class. Grapple with the questions; talk to classmates about solution strategies if you are feeling stuck; do the homework.
-
LaTeX.
Solutions must be typeset with $\LaTeX$.
LaTeX is the standard tool for communicating technical material (in math, computer science, and beyond),
and so it is valuable to be familiar with it.
Here are some helpful links to references, tutorials, and a template you may use.
- (optional) homework template: hw-template.tex
- editors: Overleaf (cloud-based) | MiKTeX (cross-platform)
- getting started: a short introduction | more detailed tutorials
- reference: the not so short introduction | the LaTeX Wikibook
- tools: a symbol finder | a table editor | a finite state machine designer
\usepackage{graphicx}
in the preamble and use\includegraphics{image-file-name}
at the place where you want your image. Make sure your result is legible and clear.Occasionally, I may ask you to write some code for a question, which will not be typeset in LaTeX.
- Grading.
For the sake of providing better feedback,
only a random subset of homework problems will be graded.
Do all of the homework problems to ensure you get credit.
Most questions will be graded on a four-point scale: quality deserving of being a solution set (4); correct with minor errors or flaws of presentation (3); essentially correct idea but with significant technical or presentation errors (2); some good ideas but fundamentally flawed solution (1); no genuine attempt (0). To calibrate your expectations, please note that I will give out 4's sparingly.
Some homework grading may involve student input.
- Late work policy. Homework is due at the beginning of the class period on the day it is due, unless otherwise stated. You are given nine (9) late passes throughout the semester for homework. Each late pass delays the due date of a single problem by a day, which starts at the beginning of class and ends 48 or 72 hours later on the next Monday, Wednesday, or Friday. Extending multiple problems require the use of a corresponding number of late passes. This allotment is to cover for legitimate reasons for tardiness that may arise, including accidentally forgetting to submit homework before class, illness, emergencies, or other situations beyond your control. No explanation for the tardiness is necessary or desired, but please do inform me (in person in class is fine) that you are submitting an assignment late. Obviously, you must refrain from looking at solutions until you have submitted the work. If you are out of late passes, work handed in late will receive zero credit. You may recover each used late pass (to be used again) by turning in a problem a day earlier. You may not use more than one late pass for a single problem. Late passes may not be used for extensions beyond the final day of classes. To be fair to everyone in the class, I will generally not grant additional extensions without the intervention of a doctor or a dean. If there are special circumstances, talk to the instructor.
- Tips.
- Start assignments early. At the least, read the entire assignment the day that it is handed out. Doing so will let your brain work on the questions even while you are not actively working on the assignment.
- Do not limit yourself to solving the homework questions in order! I may order questions on a problem set for any of a number of reasons, including where the page breaks nicely, so do not use the order of the questions as a guide to difficulty.
- Unless indicated to the contrary, you must formally prove the correctness of your solution to every homework and exam problem.
- Treat your homework as you would an essay for an English class. Draft. Edit. Rewrite. Think about clarity as you write your answers; you are trying to communicate a solution.
- On any question in which you give a complicated proof or construction, please also give an English description of your ideas. This will help the reader understand what you have written, and will help you get the partial credit you deserve.
- Answers to homework questions are not always supposed to be obvious to you—you should have to think and struggle to answer many of the questions. To calibrate your personal expectations: do not worry if you cannot solve every problem! (Getting an A does not require solving all the questions.) Write up whatever progress you have made on each question. You will receive partial credit, especially for an answer like "Here's where I got stuck. I can't see how to finish the argument because $x$." (On the other hand, getting an A does require solving most of the problems; just do not panic if there is a question once every three or four weeks that stumps you.)
- If you are totally stuck on a question, find someone (me, a classmate, or a rubber duck) with whom to chat about it.
Projects. There may be occasionall small programming projects as part of the normal homework schedule. There may be a more substantial term project, with multiple mileposts due throughout the term to help keep you on pace. Late work policy for project mileposts will be clarified when the project is assigned.
Exams. There are several in-class midterm exams (see calendar for a tentative schedule). Subsequent exams will mainly focus on the material covered since the previous exam, but can include previous material too.
There are no make-up exams except in circumstances recognized by the instructor as beyond the control of the student. To receive this consideration, the instructor must be notified of the problem before the exam unless this is impossible, in which case as soon as possible.
Time outside of class. I expect a typical student to spend about two to three hours outside of class for each hour in class. Some students need to spend a bit more than that (which is okay). If you are spending more than 14 hours per week on this course outside of class time, please come talk to me so we can find ways to help you learn the material without spending so much time.
Illness. You should make every effort to attend class when you are healthy. If you become ill, for your well-being and the well-being of the rest of the class, you should not come to class. (Nor should you show up to my office with your germs!) Yes, this sounds like common sense, but it is tempting to try and power through as normal so as not to fall behind. If you become ill, or know that you will need to miss class for some reason, please contact me as soon as you are able, and we will work together to plan how you will keep up and/or make up any missed work.
Learning integrity.
Search me, O God, and know my heart;Collaborative work is an integral part of many successful ventures. As such, I expect that you should collaborate with your classmates a lot during your time in this course. However, it is important to understand that there is a big difference between thinking about and solving a problem as part of a group (which is good, both educationally and morally) and copying an answer or letting someone else copy your answer (which is bad, educationally and morally, and has punitive consequences).
Try me, and know my anxieties;
And see if there is any wicked way in me,
And lead me in the way everlasting.- Psalm 139:23–24 NKJV
In short, I trust you to maintain the utmost level of academic integrity in this course. Please do not break this trust; if you do, there will be repercussions. The formal policy below lays this out explicitly, and supplements Bethel's academic honesty policy.
Collaboration policy.
- You may collaborate on the homework assignments to the extent of formulating ideas as a group, but you may not collaborate in the actual writing of solutions (unless explicitly allowed in the instructions).
- In particular, you may not work from notes taken during collaborative sessions.
- You may not consult any materials from any previous offerings of this course or from any other similar course offered elsewhere unless explicitly permitted.
- You may not look up solutions in any form, including from solution manuals, online repositories, or AI chatbots.
- You are required to completely understand any solution that you submit and, in case of any doubt, you must be prepared to orally explain your solution to me. If you have submitted a solution that you cannot verbally explain to me, then you have violated this policy.
Getting Help
If you need help there are multitude of resources you can use:- Yourself. If you're stuck on a problem or struggling with a concept from class, take a break and think about something else (e.g., your Hebrew assignment, the economics of Star Trek) for a few hours and then try a fresh start.
- The book. Our text is very good, particularly at explaining the idea behind a proof; it's a great place to turn if you are having any trouble.
- Your classmates. You are each other's best resource: talking through
the course material with someone else who is also trying to master it is a
great way for you both to learn. (And don't discount the learning that you
will do while trying to explain to a classmate an idea covered during class
that you think you understand; I can't count the number of times that I've
discovered that I didn't really understand something until I tried to teach it
to someone.) The homework assignments are meant to challenge you, and figuring
some of them out together is a great approach.
- The instructor. Come to my office hours or email to make an appointment. Please read and follow instructions.
Bethel Policies
The following are policies that apply to every course at Bethel.Academic honesty policy. Violation of honesty standards can result in denial of credit (U or F) in a course, as well as dismissal from the university. Penalties are given at the discretion of the faculty member, and offenders will be referred to the associate provost of the College of Arts & Sciences. (See Bethel University's full policy on Academic Honesty in the catalog.)
Accessibility statement. Bethel University is committed to accessibility for students with disabilities and the Office of Accessibility Resources & Services (OARS) is a resource to ensure students experience access. Reasonable accommodations are approved after an interactive process with the student and OARS. The instructor will provide accommodations, but the student is required to initiate the process.
- Students with a documented disability may contact OARS to learn more about how to register for accommodations. Reasonable accommodations are approved after an interactive process with the student and OARS.
- Students registered with OARS are responsible for logging in to their AIM Accessibility Accommodation portal (via MyBethel) each term to request their Faculty Notification Letter of Accommodations. Accommodations cannot be applied prior to the faculty’s receipt of the letter.
- OARS recommends the student and faculty discuss how accommodations may apply in the specific course. Accommodations cannot modify essential requirements or fundamentally alter the nature of the course. Consultation with OARS may be necessary to clarify reasonable accommodations based on the course. If there are any questions or concerns, connect with OARS at accessibility-services@bethel.edu or 651.638.6833.
Multilingual learners support.
- If you are a multilingual student and believe you would benefit from support for this course, please see your instructor. Possible supports include access to lecture notes, additional time for completing assignments and/or tests, vocabulary lists, use of translation dictionaries, additional time for writing assignments.
- When you notify your instructor, s/he may refer you to the AESC office (HC324) so that you can meet with an academic counselor. The academic counselor will help determine the supports that could contribute to your success in the course and will notify your instructor to suggest these supports be made available to you.
- In addition to specific supports for this course, one-on-one writing support is available for multilingual students. Stop by HC324 or schedule an appointment for Multilingual Support. More information on multilingual support is available.
Concerns and appeals. If you have any concerns regarding the course, your grades, or the instructor, see the instructor first. If needed, see Bethel's academic appeals policy.