CMPSCI 250: Introduction to Computation
First Midterm Exam
David Mix Barrington
13 October 2010
Directions:
- Answer the problems on the exam pages.
- There are five problems
for 100 total points plus 10 extra credit.
Actual scale is A=90, C=60.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.
- The first four questions are true/false, with five points for the correct
boolean answer and up to five for a correct justification.
Q1: 10 points
Q2: 20 points
Q3: 25 points
Q4: 15 points
Q5: 30+10 points
Total: 100+10 points
- Questions 1 and 2 deal with a set of four dogs: Ace, Biscuit,
Cardie,
and Duncan, and a predicate B(x), where x is a dog, meaning "x is
now barking".
- Question 1 (10):
Translate the following four statements as indicated, using constants
a, b, c, and d to represent the four dogs. (Note: As given, the
test confused notation, using "a" to represent the boolean "B(a)" as
well as the dog "a". The notation has been corrected here.)
- Statement I (to English) (B(a) ⊕ B(b)) → B(c)
- Statement II (to symbols) If any of the other three dogs
is barking, then so is Duncan.
- Statement III (to English) (B(d) ∨ ¬B(a)) →
B(b)
- Statement IV (to symbols) If Biscuit is barking and at
least one of Cardie and Duncan is barking, then Ace is not
barking.
- Question 2 (20): Using Statements I, II, III, and IV
from Question 1, determine exactly which of the four dogs are
barking and which are not. Make sure that your answer satisfies
all four of the statements. (You may use truth tables or a
deductive sequence proof.)
- Question 3 (25):
In this problem we have a set of dogs D, a set of colors C, and a
relation IC(x, y) meaning "dog x has color y". We also assume
that D contains the two particular dogs Cardie and Duncan (and
perhaps others), and that IC(Cardie, brown) and IC(Duncan, gray)
are both true.
- (a,5) Describe, in terms of dogs and colors, the two
conditions necessary for IC to be a function.
- (b,10) Now assume that IC is a function, and assume that
there are an equal number of dogs of each color. (That is, if e
and f are any two colors in C, the number of dogs of color e
equals the number of dogs of color f.) Prove or disprove: "If
there are a prime number of dogs in D, then IC is an injection."
(Recall that an "injection" is defined to be the same thing as a
"one-to-one function".)
- (c,10) With the same two conditions as in part (b), prove
or disprove: "If IC is an injection, then the number of dogs in
D is a prime number."
- The remaining questions on the test deal with a set D of dogs
that includes three particular dogs, Biscuit, Cardie, and
Duncan, denoted by constant symbols b, c, and d, and perhaps
other dogs as well. You are given that no two of the three
named dogs equal each other. We have a binary relation SC(x, y)
on D, defined to mean "dog x sometimes chases dog y". Note that
it is possible for a dog to sometimes chase itself.
- Question 4 (15):
Translate the following statements as indicated:
- (a,5) Statement V (to English): ∃x: ∃y:
∀z: SC(x, z) ∧ SC(z, y)
- (b,5) Statement VI (to symbols): Any dog sometimes
chases Biscuit if and only if it (that dog) is not Duncan, and (that dog)
is sometimes chased by Biscuit if and only if it is not Cardie.
- (c,5) Statement VII (to symbols): The relation SC is
reflexive and transitive.
- Question 5 (30+10):
Recall the following definitions:
- SC is symmetric: ∀x: ∀y: SC(x, y)
→ SC(y, x)
- SC is antisymmetric: ∀x: ∀y: [SC(x, y)
∧ SC(y,x)] → (x = y)
- (a,10) Prove that if SC satisfies Statements V, VI, and VII, it
is not an equivalence relation. (You may not need to use all three
statements in your proof.)
- (b,10) Assuming that Statements V, VI, and VII are true, prove
the following Statement VIII: ∀w: SC(w, d) ∧ SC(c, w).
- (c,10) For this part only, assume that D contains a fourth
dog, Ace (who is not equal to Biscuit, Cardie, or Duncan), perhaps
along with other dogs. From this assumption and Statements V, VI,
and VII, prove that SC is not a partial order.
- (d,10) For this part only, assume that D contains only
the three dogs Biscuit, Cardie, and Duncan. It turns out that in
this case, Statements V, VI, and VII determine SC entirely, in that
they imply truth values for SC(x, y) for all nine possible pairs of
dogs (x, y).
Determine these nine values. (Hint: You may use Statement VIII
even if you didn't get part (b) of this question.)
Show that in this case SC is a partial order, and give its Hasse diagram.
Last modified 19 October 2010