Old Midterm 2
Old Midterm 2
(There are 20 MCQs, each question is worth 0.5 points. Answers in bold : ; cancel out to deselect: @
.)
Question 1. Represent the sentence “All Vietnamese speak the same languages” in predicate calculus.
A ∀x, ∀y, ∃l V ietnamese(x) ∧ V ietnamese(y) ∧ Speak(x, l) −→ Speak(y, l).
B ∀x, ∃l V ietnamese(x) ∧ Speak(x, l).
C ∀x, ∃y, ∃l V ietnamese(x) ∧ V ietnamese(y) ∧ Speak(x, l) −→ Speak(y, l).
D ∀x, ∀y, ∀l V ietnamese(x) ∧ V ietnamese(y) ∧ Speak(x, l) −→ Speak(y, l).
Question 2. If a student randomly guesses at 20 multiple choice questions, find the probability that the
student gets exactly four right. Each answer has four possible choices.
1 1
A 20 .
B . C 3.5692 × 10−7 . D 0.1897.
4
5
Question 3. Translate the specification ∃p(F (p) ∧ B(p)) → ∃jL(j) into English where
Question 6. How many ways of coloring 5 objects a1 , a2 , a3 , a4 , a5 with 3 colors, such that each color must
be used at least once?
A 15. B 60. C 10. D 150.
f :Z8 −→ Z8
x 7−→ 2x
A is a surjection but not an injection. B is a bijection.
C is neither surjective nor injective. D is an injection but not a surjectiion.
Question 9. How many of the natural numbers between 100 and 1000 are either multiples of 3 or multiples
of 7?
A 300. B 128. C 428. D 385.
Question 10. Let X, Y be two nonempty sets and let f : X −→ Y be a function. Consider A, B ⊆ X, and
C, D ⊆ Y . Which of the following is correct?
A f −1 (C) = f −1 (C). B f (A ∪ B) = f (A) ∪ f (B).
C f (A) = f (A). D f (f −1 (D)) = D.
I. ∀x(P (x) → A) ←→ ∃xP (x) → A, where x does not occur as a free variable in A.
II. ∃x(P (x) → A) ←→ ∀xP (x) → A, where x does not occur as a free variable in A.
Question 13. A sequence is defined by the recurrence relation Un+1 = 2Un − 5 and U0 = 10. Which term of
this sequence is the first to exceed 90?
A U5 . B U3 . C U4 . D U6 .
Question 16. How many ways are there to distribute 40 identical jelly beans among 7 CSE-HCMUT students,
if each student gets at least 1 bean?
39
A 33 . B 40 7 . C 46 6 . D 46
7 .
propositional formula p −→
The contrapositive of the
Question 19. (q ∨ r) is
A ¬q ∧ ¬r −→ p. B ¬p −→ ¬(q ∨ r). C ¬q ∨ ¬r −→ p. D q ∨ r −→ p.