CSCI 1323 (Discrete Structures), Spring 2001:
Homework 4

Assigned:
January 30, 2001.

Due:
February 6, 2001, at the start of class.

Credit:
20 points.

Problems

  1. (4 points) Using the predicate symbols shown and appropriate quantifiers, write each English-language statement as a predicate wff. (The domain is the whole world.)

    W(x) is ``x is a positive integer.''
    P(x) is ``x is prime.''
    G(x, y) is ``x > = y.''

  2. (5 points) Do problem 12 on p. 57 of the textbook.

  3. (5 points) Do problem 16 on p. 57 of the textbook.

  4. (6 points) Verify the correctness of the following program segment to compute z = | x + y|, the absolute value of x + y. (Hints: You must first write a postcondition. Example 44 may be helpful in formulating a good one. You may also want to do some of the problems in Homework 5 before attempting this problem.)

    z = x + y
    if z > = 0 then
        z = z
    else
        z = - z
    end if



Berna Massingill
2001-01-31