2012 June 5,

Carleton College, Spring 2012

Prof. Joshua R. Davis, , Goodsell 106B, x4473

This course addresses two fundamental questions in computer science: What can computers do? And how much time and space do they require, to do it? While answering these questions, if only partially, we will touch on various fascinating topics in philosophy, linguistics, programming languages, etc. Your work will be a mixture of proofs and 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 201 (Data Structures) and CS 202 (Mathematics Of Computer Science). Math 236 may be substituted for CS 202. Talk to me, if you are concerned about your background.

Our class meets in CMC 210 during period 1A (MW 8:30-9:40, F 8:30-9:30). The course materials are

*Introduction to the Theory of Computation*, 2nd Ed, by Michael Sipser. (This book is different from those used in previous years at Carleton, because the course content has changed.)- Exams 1, 2, 3 from last time I taught the course. Be aware that they are missing some figures, and that the schedule of topics was quite different then.
- Exam A, Solutions from this term. (Percentiles: 75th=45/60, 50th=39/60, 25th=34/60.)
- Exam B, Solutions from this term. (Percentiles: 75th=31/36, 50th=27/36, 25th=26/36.)
- Exam C, Solutions from this term. (Percentiles: 75th=59.5/72, 50th=53/72, 25th=43.5/72.)

My office hours are 4A (Mon, Wed, and Fri) and Thu 1:00-2:00. I am often in my office during 2A as well. You can also schedule an appointment with me.

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 following elements contribute to the final grade.

- Participation: You are expected to attend every class meeting promptly, and to participate in the discussion and group work. You are also required to visit me in my office at least once during the first two weeks. 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 class grades.
- Assignments: Assignments are where you learn the material. They are a mixture of proving and programming. They count for 25% of your grade.
- Exam 1: The first midterm exam is given in class about 1/3 of the way through the term. It counts for 25% of your grade. Exam 2: The second midterm exam is cumulative and given as a take-home exam about 2/3 of the way through the term. It counts for 25% of your grade.
- Final Exam: The final exam is cumulative. It is scheduled for Monday 2012 June 4, 12:00PM-2:30PM. It counts for 25% of your grade. Self-scheduled final exams are not allowed.

You are expected to spend at least 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, say, 15 hours, then talk to me.

You are encouraged to work with others on all assignments. 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? The answer is simple: 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 short, if a classmate were to read one of your solutions, then she or he should be able to understand what the problem was and how you solved it.

When handing in multiple pages of paper, *staple* them into a single packet, in the correct order. Packets that are not stapled are unacceptable. I will not accept packets that are not stapled. Staple your packet. Your packet? Staple it. 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 is graded; in order to ensure full credit, do all of the assigned problems.

During the term, you have one free pass to hand in an assignment late. Instead of handing in the assignment, send me e-mail, by the due date, declaring that you are using your late pass and proposing a new due date. If the due date is extended by only one class meeting, then no explanation is necessary; if you need longer, then convince me. When you submit your late work, mark it "Late Pass Used" prominently at the top. Once you have used your late pass, no late assignments are accepted, except in extreme circumstances that are truly beyond your control.

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.

This schedule is incomplete and tentative; we will fill it in as we go along. (One reason is that the complexity theory material is new to our course this year. Another reason is that our textbook is new this year.)

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

M 3/26 | 01 | introduction | Assignment A | 0.1-0.4 | sosupersum.py |

W 3/28 | 02 | deterministic finite automata | Assignment B | 1.1 | |

F 3/30 | 03 | nondeterministic finite automata | Assignment C | 1.2 | |

M 4/02 | 04 | regular expressions | Assignment D | 1.3 | Python REs |

W 4/04 | 05 | catching up | |||

F 4/06 | 06 | pumping lemma | 1.29b, 1.35, 1.53, 1.54, 1.55c (due Fri) | 1.4 | |

M 4/09 | 07 | context-free grammars | 2.2, 2.4c, 2.6b, 2.17, 2.20 (due Fri) | 2.1 | |

W 4/11 | 08 | pushdown automata | 2.2 | ||

F 4/13 | 09 | catching up | Assignment G | ||

M 4/16 | 10 | exam | |||

W 4/18 | 11 | pumping lemma | 2.31, 2.34, 2.36 (due Fri) | 2.3 | |

F 4/20 | 12 | Turing machines | 3.1 | ||

M 4/23 | 13 | catching up | |||

W 4/25 | 14 | variants of Turing machines | 3.9b, 3.13 (due Fri) | 3.2 | |

F 4/27 | 15 | decidable problems | 4.12, 4.16, 4.18 (due Fri) | 4.1 | |

M 4/30 | midterm break | ||||

W 5/02 | 16 | undecidable problems | 4.2 | ||

F 5/04 | 17 | mapping reducibility | Assignment K | 5.1 | |

M 5/07 | 18 | Rice's theorem | 5.3 | ||

W 5/09 | 19 | time complexity | 7.1 | ||

F 5/11 | 20 | polynomial time | exam | 7.2 | |

M 5/14 | 21 | nondeterministic polynomial time | 7.4, 7.6, 7.7, 7.11 (due Fri) | 7.3 | |

W 5/16 | 22 | NP-completeness | 7.4 | ||

F 5/18 | 23 | Cook-Levin theorem | 7.4 | ||

M 5/21 | 24 | space complexity | 7.24, 7.25 (due Fri) | 8.0-8.1 | |

W 5/23 | 25 | PSPACE-completeness | 8.2-8.3 | ||

F 5/25 | 26 | Kolmogorov complexity | Assignment N | 6.4 | |

M 5/28 | 27 | Kolmogorov complexity | 6.4 | Kolmogorov Notes | |

W 5/30 | 28 | PSPACE-completeness | TQBF | ||

M 6/04 | final exam 12:00PM-2:30PM |

Topics removed from my earlier version of the course: minimizing DFAs, Myhill-Nerode, unrestricted grammars, combinatorial logic, Kolmogorov complexity.