2014 June 11,

Carleton College, Spring 2014, Prof. Joshua R. Davis, , Laird 205A, x4473

This course considers two fundamental questions in computer science: What can computers do? 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.

Our class meets in CMC 206 during period 2A (MonWed 9:50-11:00, Fri 9:40-10:40). My office hours are

- Tue 1:00-2:00,
- Wed 11:10-12:20 (3A),
- Thu 11:00-12:00.

If you can't make office hours, then schedule an appointment with me. The course materials are

*Introduction to the Theory of Computation*, 2nd Ed, by Michael Sipser. The third edition is fine, except that you will have to reconcile the section and problem numbers yourself. Also, the third edition is more expensive.- Transition to Python may help you brush up on your Python skills.
- Here are our exams from this term, with quartiles (75th, 50th, and 25th percentiles) listed.
- Here are the three midterms and one final from Fall 2013.
- Here are the two midterms and one final from Spring 2013.
- Here are the two midterms and one final from Spring 2012.

Final grades (A, B, C, etc.) are assigned according to an approximate curving process. By this I mean that there are no predetermined percentages (90%, 80%, 70%, 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.

- Participation: You are expected to attend every class meeting promptly, take notes, and participate in discussion and group work. You can make up for a deficiency in class participation by talking with me frequently in office hours or generally demonstrating exceptional effort and interest. Participation is used to make small adjustments to the final course grade. Additionally, a requirement for passing this course is that you visit me in my office at least once during the first two weeks.
- Assignments: Assignments are the core of the course; they are where you learn the material. Altogether they count for 25% of your grade.
- Exam A: The first midterm exam is given in class sometime around the fourth week. It counts for 25% of your course grade.
- Exam B: The second midterm is a take-home exam given sometime around the seventh week. It counts for 25% of your grade.
- Exam C: The final exam is scheduled for Sunday June 8, 3:30PM-6:00PM. It counts for 25% of your course grade. Self-scheduled final exams are not allowed.

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.

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.

During the term, you have one free pass to hand in a week's homework packet late. Instead of handing in the packet, send me e-mail, by the due date, declaring that you are using your late pass. No explanation is necessary. Your packet is now due when the *next* packet is due. When you submit your late packet, write "Late Pass Used" prominently at the top. 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:

- Get started on homework assignments well before they are due.
- Work with others on the assignments.
- Use office hours. The work is hard, but the professor is happy to help.
- Be honest with yourself about whether you truly understand the material. You will be tested.
- Reading the book can actually be helpful.

This schedule is tentative. It will be adjusted as we go along. To help you decode the schedule, here is an example. On Day 02 we discuss deterministic finite automata, which are covered in Section 1.1 of our textbook. You have homework called "Day 02", which you hand in on Day 04.

Date | Day | Topic | Assignment | Due | Reading | Notes |
---|---|---|---|---|---|---|

M 3/31 | 01 | introduction | Day 01 | 01 | 0.1-0.4 | sosupersum.py |

W 4/02 | 02 | deterministic finite automata | Day 02 | 04 | 1.1 | |

F 4/04 | 03 | nondeterministic finite automata | Day 03 | 06 | 1.2 | NFA <-> DFA |

M 4/07 | 04 | regular expressions | Day 04 | 06 | 1.3 | Python regular expressions |

W 4/09 | 05 | pumping lemma | Day 05 | 09 | 1.4 | |

F 4/11 | 06 | catching up | Day 06 | 09 | Radiolab: Loops | |

M 4/14 | 07 | context-free grammars | Day 07 | 09 | 2.1 | |

W 4/16 | 08 | pushdown automata | Day 08 | 12 | 2.2 | Recursion |

F 4/18 | 09 | pumping lemma | 2.31, 2.36 | 12 | 2.3 | |

M 4/21 | 10 | Turing machines | 3.1 | Wikipedia: Alan Turing | ||

W 4/23 | 11 | EXAM A | ||||

F 4/25 | 12 | Turing machines | Day 12 | 15 | 3.2 | |

M 4/28 | 13 | Turing machines | 3.15bcde, 3.16bcd | 15 | 3.3 | |

W 4/30 | 14 | Turing machines | Day 14 | 17 | 4.1 | |

F 5/02 | 15 | Turing machines | Day 15 | 17 | 4.2 | |

M 5/05 | MIDTERM BREAK | |||||

W 5/07 | 16 | HALT is undecidable | Day 16 | 20 | 5.1 | |

F 5/09 | 17 | Rice's theorem | Day 17 | 20 | 5.1 | |

M 5/12 | 18 | time complexity | Day 18 | 20 | 7.1 | |

W 5/14 | 19 | time complexity | 7.6, 7.7 | 23 | 7.2 | |

F 5/16 | 20 | time complexity | EXAM B | 21 | 7.3 | |

M 5/19 | 21 | time complexity | Day 21 | 23 | 7.3 | |

W 5/21 | 22 | SAT is NP-complete | Day 22 | 26 | 7.4 | |

F 5/23 | 23 | space complexity | 7.24, 7.25 | 26 | 8.0-8.1 | |

M 5/26 | 24 | NPSPACE = PSPACE | Day 24 | 26 | 8.2 | |

W 5/28 | 25 | TQBF is PSPACE-complete | 8.3 | TQBF | ||

F 5/30 | 26 | TQBF is PSPACE-complete | 6.4 | |||

M 6/02 | 27 | Kolmogorov complexity | Day 26 or 27 | Kolmogorov | ||

W 6/04 | 28 | what haven't we learned? | this, this, this, ... | |||

S 6/08 | FINAL EXAM 3:30PM-6:00PM |