2018 November 27,

CS 254: Computability and Complexity

Carleton College, Fall 2018, Joshua R. Davis, , CMC 324, x4095


This course considers two fundamental questions in computer science: First, what can computers do? Second, how much time and space do they require to do it? While addressing these questions we will touch on various fascinating topics in programming languages, information theory, linguistics, philosophy, etc.

Your work will be a mixture of writing proofs, executing algorithms by hand, and writing programs. For example, you will learn how to determine whether a programming problem is solvable by regular expressions, and solve it with them if it is. The official prerequisites for this course are CS 111 (Intro) and either CS 202 (Mathematics of Computer Science) or Math 236. Talk to me if you are concerned about your background.

The course materials are:

Our class meets in Boliou 104 during period 3A (MonWed 11:10-12:20, Fri 12:00-1:00). My office hours are currently

No appointment is needed during office hours; just drop in. If you can't make office hours, then consult my schedule and e-mail me a couple of possible meeting times.


Final grades (A, B, etc.) are assigned according to an approximate curving process. By this I mean that there are no predetermined percentages (90%, 80%, etc.) required for specific grades. The advantage of this system is that student grades don't suffer when I write a difficult exam. The disadvantage is that you cannot compute your own grade. Visit me in my office, if you want me to estimate your current grade for you. The following elements contribute to your final grade.

You are expected to spend about 10 hours per week on this course outside class. Some students need to spend more than 10 hours. If you find yourself spending more than 15 hours, then talk to me.

Standards for Work

You are encouraged to work with others on all assignments (but not exams). Work together to figure out the problems/programs, but write/type them up separately, in your own words. You may not copy someone else's work or allow them to copy yours. Presenting someone else's work as your own is an act of Academic Dishonesty. If Carleton College finds you to not to have upheld its Academic Honesty standards in this course, then you will receive an F for this course.

Writing is not just for English and history majors. Written and oral communication skills are essential to every academic discipline, and are highly prized by employers. In this course, your written work is evaluated both for correctness and for presentation. You may find it easier to type your solutions in LaTeX than to edit them by hand.

How much work should you show? Compose your solutions as if the intended audience is your fellow students. By doing so, you show enough detail that your grader can ascertain whether you yourself understand the material. Your solutions should also be self-explanatory. In this course, the required level of rigor in proofs is sometimes unclear. Mimic the book's level of rigor, preferably with explanation and motivation, and with note of any pitfalls in the logic. If a fellow student were to read your solution, she should be convinced that you understand the problem.

Although homework is assigned every day, it is collected only once a week (usually Fridays). When handing in a week's homework, staple your pages into a single packet, in the correct order. Packets that are not stapled are unacceptable. I will not accept packets that are not stapled. Is there a stapler in the classroom? Often not, so staple ahead of time. Is a paper clip okay? No.

Computer files should be submitted in plain text (.txt), PDF (.pdf), or Python (.py) formats only, unless otherwise specified. In particular, Microsoft Word documents are unacceptable. Fortunately, you can "print" any document to PDF easily.

Depending on time constraints in any given week, perhaps not all of your homework will be graded. In order to ensure full credit, do all of the assigned problems.

Special Accommodations

During the term, you have one free pass to hand in a week's homework packet late, no questions asked. Simply hand in your late packet when the next packet is due, writing "Late Pass Used" prominently at the top of the late packet.

Once you have used your late pass, no late assignments are accepted, except in extreme circumstances that typically involve interventions by physicians or deans.

If some medical condition affects your participation in class or your taking of exams, let me know in the first week of class. You may need to make official arrangements with the Office of Disability Services.


Here is some advice from actual students who have taken this course in the past:


To help you decode the schedule, here is an example. On Day 03 we discuss nondeterministic finite automata. Section 1.2 of our textbook covers that material; read it before or after class, to get another treament. You might also want to read my extra notes nfaDFA.pdf. You have homework called "Day 03", which you hand in on Day 06.

M 09/1001introductionDay 0101, 020.1-0.4soSuperSum.py
W 09/1202deterministic finite automataDay 02031.1
F 09/1403nondeterministic finite automataDay 03061.2nfaDFA.pdf
M 09/1704regular expressionsDay 04061.3regExp.pdf
W 09/1905pumping lemmaDay 05091.4Radiolab: Loops (6:40-15:33)
F 09/2106catching upDay 0609
M 09/2407context-free grammarsDay 07092.1
W 09/2608pushdown automataDay 08122.2Recursion
F 09/2809pumping lemmaDay 09122.3
M 10/0110Turing machinesDay 10153.1Wikipedia: Alan Turing
W 10/0311Exam A
F 10/0512variants of TMsDay 12153.2
M 10/0813nondeterminism, decidable examples3.15bcde, 3.16bcd153.3, 4.1
W 10/1014decidable, undecidable examplesDay 14174.1
F 10/1215undecidable, unrecognizable examplesDay 15174.2
M 10/15Midterm Break
W 10/1716Rice's theoremDay 16205.1
F 10/1917time complexitynone7.1
M 10/2218catching upDay 1820
W 10/2419polynomial-time problems7.6, 7.7237.2
F 10/2620nondeterministic polynomial-time problemsExam B217.3
M 10/2921polynomial-time mapping reducibilityDay 21237.4
W 10/3122SAT is NP-completeDay 22267.4
F 11/0223NP-completeness7.26, 7.27267.4
M 11/0524NPSPACE = PSPACE8.4, 8.11268.1-8.2
W 11/0725TQBF is PSPACE-completeDay 25288.3tqbf.pdf
F 11/0926TQBF is PSPACE-completenone8.3
M 11/1227catching upnone
W 11/1428what haven't we learned?none6.4this, this, this, ...
S 11/18Exam C 3:30PM-6:00PM