Today:
Exam
For next time:
Do the reading from Lecture 9.
Start Homework 6.
Overall, good job!
Racket
(rational-divide) tripped up a few people who interpreted x and y and integers, rather than rationals.
(poly) was pretty good, but many people felt compelled to copy (eval-poly) rather than use it.
The box and pointer diagram was good. Most common error was not realizing that (cons blah '()) is the same thing as (list blah).
Lambda calculus
Don't forget about eta-reduction: λx. f x→ f
Unfortunately, (NOT OR) does not yield NOR. In general, the logical operators work when applied to booleans; otherwise all bets are off. But as it happens, (NOT OR) does yield a logical operator. Which one?
Regular expressions
The DFA and NFA were good.
Many people successfully used the pumping lemma to prove that the language of all palindromes is not regular (unless the alphabet has only one symbol).
Really good answers generalized across alphabets.
Less successful attempts included:
1) Arguing that the language is not regular because recognizing it would take infinite space.
2) Proving that there is a regular language that contains an infinite number of palindromes.
3) Using the pumping lemma, proposing an unpumpable string, and showing one way to split it up that does not work.
PDA
Generally good, considering that this question is prospective.
For the parse tree, I accepted anything in the neighborhood.