- General note on recursion: Make sure the base-case is as simple as possible; in general it shouldn't repeat code from the non-base-case. E.g., in drawing a fern, you can have the base case draw a straight line, but even better you can have it draw nothing! -- the code doing straight line was already in the recursive case. (e.g., if base case of empty suffices, don't use base case of length-0-or-1.) [Quicksort can use empty as basecase, but mergesort needs length0-or-1.] -1 to -2 for repeating same code (e.g. in base-case and recursive-case.) - Look for magic numbers; e.g. pi/6 in "fern", ... (1) For mergesort termination: If they claim that merge-all-pairs always returns a list half as long, that's wrong; even if they say "nearly half as long", meaning half+1, they still need to argue that the list gets shorter. (After all, half+1, if you start at 2, doesn't get any smaller!) Only -1/2 if they missed this nuance. Full credit if they just said "merge-all-pairs returns a strictly shorter list", but didn't defend this (it's obvious enough). For mergesort: If they do not use the algorithm specified (using make-singles and merge-neighbors), give no more than half credit. The use of split in any form, i.e. splitting the list into two parts and calling merge-neighbors is absolutely wrong. If make-singles or merge-neighbors is not used at all, no credit for the problem. If some attempt is made to use them, up to half credit is to be given, depending on how well the solution follows the algorithm. (2) For the paragraph comparing the integration methods: They need to mention three thing for full credit: 1a non-adaptive needlessly spends much effort on relatively flat sections, 1b non-adaptive spends too little effort on relatively wiggly sections, 2 adapative method can be senstivie to endpoints (e.g. erroneously conclude that a function is relatively flat), 3 adapative method may not terminate. -2 for ignoring this problem; -1 if they missed one of {1a, 1b, 2}. -1/2 if they missed 3. -1/2 for claims that are true but unrelated to the problem, -1 for untrue claims. (3) bezier* (extra-credit): solution will be up shortly. +1/2 (only) if they recur on rest-of-rest; this works fine if you happen to have an odd number of control points. The tricky part is, generalizing to an even number of control points. Note that for full extra credit, you also need to handle lists of length 2, 1, and 0. Labbies: See also, hw08-soln-old.ss