News Review of final exam problems 

Forum: U Chicago, Com Sci 221, autumn 2000
Re: News Final exam Monday 4 December (Mike O'Donnell)
Date: 2000, Nov 28
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

Here is a review of the 4 problems on the final exam. The content of the exam is not absolutely settled, since I want to go over it carefully for errors and confusion. I will post any updates to the review that arise due to revisions. But I don't expect it to change significantly.

  1. Datatypes: I define two datatypes, and ask questions about the encoding of one into the other. This is analogous to the encoding of arrays of structures as parallel arrays. I think the one on the exam is a bit trickier than the parallel array problem. I display the two datatypes in set-theoretic notation, and in ML notation, but the problem has nothing to do with ML.


  2. Loop invariant: I define a function and a loop invariant. You must fill in the code for a loop to compute the function using that invariant. This one uses integer arithmetic, rather than arrays.


  3. Higher-order programming: I define another ``mother of all xxxxx recursions'' as a higher-order function in Scheme. You must use my higher-order function to define another simple function.


  4. Pattern-matching in ML: I probe your understanding of function definition through pattern-matching in ML. The problem has nothing to do with subtleties or advanced features of pattern-matching. The patterns involved appear in the simplest programs, such as the ones in the lecture notes. But you need to understand the order of evaluation precisely. A minor subproblem requires you to calculate an intuitive, and very simple, case of ML type inference.

There is no problem involving logic programming or Prolog.

As a study aid, I recommend that you look at my archive of old exams. Both the finals and midterms are good things to study. I recycle problems a fair bit, often with some variation. In the past, I have sometimes repeated a midterm problem in the final for the same quarter. This quarter, I did not repeat any midterm problem on the final.

It's a fine idea to actually work problems from the old exams. You may include material from the old exams and your solutions to them in the material that you bring to your final exams. It's a bad idea to copy old solutions without reading very carefully to catch variations in the problems.



Mike O'D.


Messages

1. Question Untitled by Jake Bartolone, 2000, Nov 30
(_ Feedback Quick review of set-theoretic types by Mike O'Donnell, 2000, Nov 30

to: "Review of final exam problems"