A couple of mistakes have been corrected.
8c: The old solution included 0, but the formula fails at 0 (20 = 0! = 1).
13b: The problem was miscopied (a single "not" was missing). The corrected problem now appears in 13b. The original version [(p -> q) xor (q -> (p -> (not p) ) )] is satisfiable (p=T; q=F).
The use of extra material is not permitted during the exam (i.e., no textbook, no notes, no calculator, etc.).
The exam includes material from readings and lecture through Monday, September 30. See the Schedule for a list of topics covered in lecture and for the corresponding readings; the topics and readings are also summarized below. The exam will attempt to gauge your knowledge and understanding of course concepts. You shouldn't need to memorize long proofs given in the text or in class (although you should understand such proofs).
The topics covered on the exam (and the corresponding sections of the text) include:
The review questions given here are not meant to exhaust the possible topics for exam questions. Consider reviewing both the homework assignments and the appropriate sections of the text.
Please let me know via email (chew@cs.cornell.edu) if you discover mistakes in my solutions. Past experience indicates that I may have made some.
Basis: By formula f(0) = 21 + 20 -1 = 2 + 1 - 1 = 2 which agrees with the definition.
Induction Hypothesis: Assume that f(k) = 2k+1 + 2k -1 for some k > 0.
Consider f(k+1).
f(k+1) = 2f(k) + 1 by definition.
Thus, f(k+1) = 2(2k+1 + 2k -1) + 1 by the Induction
Hypothesis.
Multiplying out and adding, we have, f(k+1) = 2k+2 + 2k+1
- 1 which agrees with the formula.
Note that a valid picture divides the piece of paper into regions. For instance, one can make a picture with 5 regions: four triangular regions and a fifth region consisting of all the paper outside the drawing. A picture consisting of a single square would create two regions: one inside the square and one outside the square. A picture consisting of the single starting segment would have just one region. Let p represent the number of points, s represent the number of segments, and r represent the number of regions. Use induction on the number of operations to prove that p - s + r = 2 for any valid picture.
Basis: For the starting segment, p=2, s=1, and r=1, confirming that p-s+r=2.
Induction Hypothesis: After n operations, we have a picture with p-s+r=2.
Consider a picture after n+1 operations. Undo the last operation, leaving a picture made from n operations; by the Induction Hypothesis, this picture has p-s+r=2. Now we execute the last operation. There are 3 cases (we use p', s', and r' to represent the result after the (n+1)st operation):
Since each operation results in the same formula, the formula must hold for all valid pictures.
This is not satisfiable. To show something is not satisfiable we need to show that there is no assignment of truth values that makes the statement true. The easiest way to do this is with a truth table.
| p | q | p -> (not q) | q -> (p -> (not p)) |
| T | T | T F F | T F T F F |
| T | F | T T T | F T T F F |
| F | T | F T F | T T F T T |
| F | F | F T T | F T F T T |
| * | * |
The two columns marked * agree, so when we apply exclusive-or to them,
we get a column consisting entirely of F. Thus the statement is not satisfiable.