University of Virginia, Department of Computer Science
CS200: Computer Science, Spring 2004

Notes: Friday 5 March 2004
Schedule

Quicksort
(define (quicksort cf lst)
  (if (null? lst) lst
      (append 
        (quicksort cf 
           (filter (lambda (el) (cf el (car lst))) 
                    (cdr lst)))
        (list (car lst))
        (quicksort cf 
            (filter (lambda (el) (not (cf el (car lst))))
                     (cdr lst))))))  
Sort these evaluations according to how much time they are likely to take:
  1. (quicksort < (intsto 100))
  2. (quicksort < (rand-int-list 100))
  3. (quicksort < (reverse (intsto 100)))
  4. (quicksort > (reverse (intsto 100)))
  5. (tuttlesort < (intsto 100))
  6. (tuttlesort < (rand-int-list 100))
  7. (map (lambda (x) x) (intsto 100))
  8. (map (lambda (x) (* x x) (intsto 100))
  9. (quicksort < (apply append (map (lambda (n) (intsto n)) (intsto 100))))






GEB Study Guide

Your reading assignment for Spring Break is to finish reading the first part of Gödel, Escher, Bach (up through and including Chapter IX). The questions below might help you think about the reading. Then again, they might not. I am quite certain, however, that they will not help you prepare for the quiz that will not be given on March 15.

Answer all the answerable questions, but unask the unanswerable ones. This quiz will not be graded, but it won't be ungraded either.

1. If you knew the answer to this question, what would it be?


2. Does this question have no answer?

3. Is the next question trickier than this one?

4. Was the previous question fairer than this one?


5. If this exam were graded, would your answer to the previous question be different?

6. If this exam were graded, would your answer to the previous question be different?

6. If this exam were graded, would your answer to the previous question be different?

7. If you were Gödel, how would you answer this?

8. Richard Feynman once said "If you think you know how quantum mechanics works, you're wrong." If Feynman were a logician instead, would he have said "If you think you don't understand Gödel's Theorem, then you do." or "If you don't think you don't understand Gödel's Theorem, then you don't."?


9. If your final grade in CS200 depended only on your answer to this question, would your answer to this question be different?


10. Ask and answer the question should I have asked instead of this one.




Golden Ages Links
cs200-staff@cs.virginia.edu
Using these Materials