CS 201: Homework Assignments


  • Homework #1, due Monday January 31.
    Exercises 8, 10, 12, 28 in Section 2.1 of the text (pp. 51-52).
    Solutions.

  • Homework #2, due Monday, February 7.
    Exercises 18 (p. 52, notation is on previous page, before Ex. 14), 2 (p. 56), 18 (p. 57 -- first translate the statements into logic, then negate the logical statements, simplify the negation using our various rules, and finally translate the result back into better English than the original in the text!); and finally negate the following logical statements, where forall is the universal quantifier and exists the existential quantifier:
    exists x forall y forall z [(x and y) -> (exists w ((w and z) <-> x))]
    exists x exists y [((forall z [(~x or y) -> ~(x and z)]) -> (x or y)) <-> (x xor y)]
    
    (is either of these statements a falsehood or a tautology?).
    Solutions.

  • Homework #3, due Wednesday, February 16.
    Exercises 19, 21, 23, and 25, p. 63 in the text.
    Solutions.

  • Homework #4, due Wednesday, February 23.
    Exercises 16, 18, 25, and 29, pp. 69 and 70 in the text.
    Solutions.

  • Homework #5, due Wednesday, March 8.
    Exercises 24, 31, and 33 (note that while loop test is completely wrong; it should be while R > 0), pp. 69 and 70 in the text.
    Solutions.

  • Homework #6, due Monday, March 27.
    Exercises 8, 10, 18, 20, and 22, pp. 81 and 82 in the text.
    Solutions.

  • Homework #7, due Friday, March 31.
    Exercises 20, 22, 24, and 30, pp. 94 and 95 in the text.
    Solutions.

  • Homework #8, due Monday, May 1.
    Exercises 14, 16, 18, p. 127 and 7 and 8, p. 159 in the text, plus the following three problems. (a) Define an equivalence relation on the set of all integers (positive and negative) that has exactly 4 equivalence classes, each infinite. (b) Define an equivalence relation on the set of all integers that has an infinite number of equivalence classes. (c) If an equivalence relation R1 has n equivalence classes and another equivalence relation R2 has m equivalence classes, under what conditions does the new equivalence class R defined by aRb <=> aR1b and aR2 have m*n equivalence classes? (The word "orthogonal" may come to mind, but you would have to define carefully what is meant by that when applied to two relations.)
    Solutions.
  • Back to CS 201 home page