CS200: Computer Science, Spring 2003
Notes: Friday 24 January 2003
- 27 January: Read GEB, Little Harmonic Labyrinth and Chapter 5
- 29 January (needed for PS2): Read SICP, 1.3
- 3 February: Problem Set 2
GEB Reading GuideAs you read GEB Little Harmonic Labyrinth and Chapter 5, here are some things to think about:
- Is music you know recursive like the Little Harmonic Labyrinth?
- How do the Recursive Transition Networks he uses to describe languages compare to the Backus Naur Form we saw in class? Can any Recursive Transition Network be rewritten as in Backus Naur Form? Which notation is more compact? Which notation is easier to understand?
- Can you translate his definition of FIBO (p. 136) into a Scheme procedure that calculates Fibonacci numbers?
- Are Feynman diagrams a formal system? Are they a language?
Richard Feynman won the Nobel Prize in Physics in 1965 and was important in the Manhattan Project and in the Space Shuttle Challenger investigation. He also made important contributions to Computer Science (a few of which we will see later in this class). In 1984, Richard Feynman and Gerry Sussman co-taught a course at Caltech using an early version of the Wizard Book. Here's a story about that from Feynman Online:
In the beginning part of 1984, Feynman was teaching a course on computing at Caltech. The course was also co-jointly taught by Gerald Sussman from MIT. On one occasion Feynman was lecturing at the blackboard, but this time Sussman kept coming up and correcting him. Later that week Feynman was supposed to come over for dinner. On the night in question, Feynman's wife Gweneth called to say that Feynman was in the hospital and that they would not be able to come over. She told me not to tell anyone, as she didn't want the word to get around. Apparently Feynman in his excitement to purchase a new computer tripped on the sidewalk curb and hit his head. This caused some internal complications and bleeding. In a week or so, Feynman was back on his feet and returned to class. At lunch Feynman related what had happened. After bumping his head, he paid little or no attention to it. He was bleeding when he entered the computer store. What was interesting is that he gradually began to loose his sense of what was happening around him without internally realizing it. First, he couldn't locate his car. Then he had a very strange session with one of his artistic models. And on another day, he told his secretary Helen Tuck that he was going home, and proceeded to undress and lie down in his office. He forgot that he was to give a lecture at Hughs aircraft, and so on... Everything was just rationalized away. But you know, he said, NO ONE told me I was going crazy. Now why not? I said, Come on. You are always doing weird stuff. Besides there such a fine line between genius and madness that it sometimes difficult to tell! Listen, ape, the next time I go crazy around here, you be sure to tell me!
For more stories about Feynman, "Surely You're Joking, Mr. Feynman!": Adventures of a Curious Character is highly recommended summer reading.
Defining Recursive Procedures
- Be optimistic.
- Assume you can solve it.
- If you could, how would you solve a bigger problem.
- Think of the simplest version of the problem, something you can already solve.
- This is called the base case.
- Usually something like solve for 0 or the empty list
- Combine them to solve the problem.(define (find-closest goal numbers) (if (= 1 (length numbers)) (first numbers) (if (< (abs (- goal (first numbers))) (abs (- goal (find-closest goal (rest numbers))))) (first numbers) (find-closest goal (rest numbers))))
Ghost Cat by Clay Yount (CS200 Spring 2002 graduate!), Cavalier Daily, 24 January 2003.
Using these Materials