This syllabus is available on-line at http://www.cs.bc.edu/~straubin/cs385-07/385.html.
More specifically, we shall see how the notions of computing machine, computational problem, and syntax can be fomally defined, beginning with very simple models and proceeding to more elaborate and powerful ones. Our first efforts in this direction (Chapters 1 and 2 of the textbook), concerning finite-state automata and context-free languages, have important applications to pattern-matching and to parsers and compilers.
The centerpiece of the course is the formalization of the notions of algorithm and computability (Chapters 3 and 4 of the text), and the proof that certain problems cannot be solved by any computer.
If time permits we should finish with a look at computational complexity, which is the subject of active current research. Here one tries to establish that certain problems, while solvable in principle, make such exorbitant demands on computing resources that they cannot possibly be solved in practice.
The course material will be drawn from Chapters 0-5, and parts of Chapters 6 and 7, of the textbook. I will also introduce some additional material concerning applications. (Pattern-matching programs that take regular expressions as inputs, and parser generators.)
We study the capabilities of computers by reasoning about the properties of mathematical models of computation, so a strong background in mathematics is also required, enough so that you can work comfortably with the terminology and notation introduced in Chapter 0 of the textbook, and be able to follow and write mathematical proofs. If you are a computer science major, the required course in Discrete Mathematics, if successfully completed, should provide ample background.
You can obtain copies of the homework assignments, and, after the due date, their solutions, by clicking on the links below. I will post solutions a few days after the assignments are due. Late homework will be given 80% of the credit it would have received if submitted on time, and no homework will be accepted after the solutions are posted. While I encourage you to discuss homework problems with one another, and to ask about them in class, you are required to prepare your solutions to the homework problems individually.
| Date |
Notes
and Handouts |
Material
Covered |
Assigned Work |
|
| 9/4/2007 |
Parenthesis
Testing A Rube Goldberg solution to the problem, illustrating a reduction (to compilation). (A Unix script.) (In case you're curious about this term, ou can find literally hundreds of videos of "Rube Goldberg Machines" on YouTube. Read about the Rube Goldberg Machine Contest, or about Mr. Goldberg himself. |
Review of Discrete Math. Chapter
0. Pay special attention to the section on Strings and Languages, and on Types of Proofs. A Problem in the theory of Computation, and its solution (attached Lecture Notes). |
Assignment 1,
due September 11 Solutions (prepared by Peter S., with some editing by me). Solution to the programming problem |
|
| 9/11/2007 |
Finite
Automata (A roadmap to Chapter 1) The other meaning of "automata". Grammar police on criterion/criteria, phenomenon/phenomena Along with automaton, these are the only words of English I can think of that form their plural this way. Are there any others? |
DFA's and Regular
Languages. Nondeterminism. Sections 1.1-1.2. |
Assignment 2,
due Septermber 18 Assignment 2 Solutions |
|
| 9/17/2007 |
More on nondeterminism;
converting NFAs to DFAs; regular expressions. |
Assignment 3,
due September 27. Assignment 3 Solutons |
||
| 9/24/2007 |
|
Extracting regular expressions
from automata. Proving languages are nonregular. |
Assignment 4,
due October 4. (Corrected version.) You may hand in problems 1.29, 1.46 and 1.53 on Tuesday, October 9. Assignment 4 Solutions |
|
| 10/1/2007 |
Context-free grammars and
languages. |
Assignment 5,
due October 11. Assignment 5 Solutions |
||
| 10/14/2007 |
A yacc
grammar for postfix expressions. The parsing table for this grammar generated by yacc. Trace of the parsing given by this table of two expressions. Last year's first midterm. This year's test, and its solutions. |
Pushdown automata and parsing;
non-context-free languages. First Test. |
Assignment 6,
Due November 2 I did not assign problems on PDAs, but you should be able to work Exercise 2.5 and show traces of the PDA on both accepted and rejected input strings. Assignment 6 Solutions (textbook problems) Yacc grammar and table for prefix expressions Yacc grammar and table for infix expressions traces of these parses. |
|
| 11/1/2007 |
Turing's
original paper on Turing machines. Look at Sections 1 and
9.I, 9.II, for the justification of Turing machines as capturing the
intuitive notion of computation. Countable and Uncountable Sets |
Turing Machines; decidable and
recursively enumerable (=Turing-recognizable). |
Assignment 7,
Due November 15 Assignment 7 solutions |
|
| 11/13/2007 |
Who Shaves
the Barber? The second test (note the error described in the solutions file), and its solutions. |
Undecidability of the Halting
Problem Decidable and undecidable problems about automata and Turing machines. |
||
| 11/27/2007 |
Notes
on Tiling problems. (This shows that the problem of tiling
the plane with a fixed set of oriented tiles is undecidable; it also
shows that a bounded version of the problem is NP-complete.) |
Undecidability of combinatorial
problems. Time complexity. The class P. |
Assignment 8,
Due December 10 Solutions. |
|
| 12/3/2007 |
Win a million
dollars. (The Clay Mathematics Institute page on the P-NP Problem. Read as much as you can of the linked article by Cook and the article about Minesweeper.) |
The class NP. NP-complete
problems. |
||
| Last
year's final exam |
Review |