Midterm 4 Key
Midterm 4 Key
Midterm 4 Key
MIDTERM EXAMINATION
Faculty of CSE
Course: Discrete structures for
Computing (CO1007)
Class: 2017-1-CO1007 Group: CC01
Duration: 60 minutes (Closed-book test)
Examination date: Oct. 19, 2017
Student name:
(There are 20 multiple-choice questions, each question is worth 0.5 point. Highlight the correct (best)
answer: . Cancel out to deselect: @ or clear the highlight)
Question 1. Let R be the relation on the set of people consisting of pairs (a, b) where “a is a parent of b”.
Let S be the relation on the set of people consisting of pairs (a, b) where “a and b are siblings
(brother or sisters).” What are S ◦ R and R ◦ S?
A S ◦ R = {(a, b)|a is a parent of b}; R ◦ S = {(a, b)|a is an aunt or uncle of b}
B S ◦ R = {(a, b)|a is an uncle or aunt of b}; R ◦ S = {(a, b)|a is a parent of b and b has a sibling }
C S ◦ R = {(a, b)|a is a parent of b and b has a sibling }; R ◦ S = {(a, b)|a is an aunt or uncle of b}
D All of the above statements are incorrect
Question 2. In an information sercurity survey engineers asked IT companys about risk level of their
websites under possible attacks by black hackers. The only three choices in the survey are high
risk, medium risk, and none. If 31% of the responders indicated high risk and 49% responders
indicated medium risk, then the percentage of respondents who chose the none category can be
the following options:
The statement p ∧ q → ¬q
Question 3. is equivalent with which
of the following statement
A q ∧ p. B 1 C p ∨ ¬q D ¬p ∨ ¬q
Question 4. Let F (x, y) be the statement “x can fool y”, where the domain consists of all people in the
world. Use quantifiers to express the statement: “Nancy can fool exactly two people.”
A ∀x∀y, (y 6= x ∧ F (N ancy, x) ∧ F (N ancy, y))
B ∃x∃y, (y 6= x ∧ F (N ancy, x) ∧ F (N ancy, y) ∨ ∃z(z = x ∨ z = y ∨ F (N ancy, z)))
C ∃x∀y, (y 6= x ∧ F (N ancy, x) ∧ F (N ancy, y) ∧ ∀z(z 6= x ∨ z = y ∨ ¬F (N ancy, z)))
D ∃x∃y, (y 6= x ∧ F (N ancy, x) ∧ F (N ancy, y) ∧ ∀z(z = x ∨ z = y ∨ ¬F (N ancy, z)))
Question 5. In a certain survey of a group of 200 students, 50% students indicated they can play volley ball,
65% indicated that they can play ping-pong, 15% indicate they cannot play both of them. How
many student can play both of two sport games?
A 70 B 60 C 50 D 40
Question 6. Let f : X → Y be a function, and let {Si : i ∈ I} be a family subsets of X. Which of the
following is incorrect?
S S
A f ( i∈I Si ) = i∈I f (Si )
B When f is a bijection function: f −1 (S1 ∪ S2 ) = f −1 (S1 ) ∪ f −1 (S2 )
C f (S1 ∩ S2 ) ⊆ f (S1 ) ∩ f (S2 ) D f (S1 ) ∩ f (S2 ) ⊂ f (S1 ∩ S2 )
Question 9. Let R be the relation on N × N defined by (a, b)R(c, d) if and only if ad = bc. Which of the
following answer is the most accurately?
A R is not a equivalence relation on N × N. B R is a equivalence relation on N × N.
C R is not a symmetric and ir-reflexive rela- D R is not a symmetric and transitive rela-
tion on N × N. tion on N × N.
Question 10. Let x be any integer. To prove the statement x2 + x is even, we follow these steps: First, because
an arbitrary integer is either even or odd, we setup for proof-by-cases inference p: x is even; q :
x is odd; r : x2 + x is even.
Verify premise 1. If x is even, then x = 2n, for some integer n. Hence, x2 + x = (2n)2 + 2n =
4n2 + 2n, which is even.
Verify premise 2. If x is odd, then x = 2n + 1, for some n. Hence, x2 + x = (2n + 1)2 + (2n + 1) =
(4n2 + 4n + 1) + (2n + 1) = 4n2 + 6n + 2, which is even.
What is the proving method used above?
A Contradiction B Contraposition C Direct D Induction
Question 11. Given the Venn diagram of 3 sets A, B, C and the universal set U
A C
Question 12. Express the mathematical statements “The difference of two negative integers is not necessarily
negative.” using predicates, quantifiers, logical connectives, and mathematical operators, where
the domain consists of all integers.
A ∀m∀n(m < 0 ∧ n < 0 ∧ ¬(m − n < 0)) B ∃m∀n(m < 0 ∧ n < 0 ∧ ¬(m − n < 0))
C ∃m∃n(m < 0 ∧ n < 0 ∧ ¬(m − n < 0)) D ∃m∀n(m ∧ n ∧ ¬(m − n < 0))
• Hearts 1, 2 and 3
• Clubs 1, 2, 3 and 4
• Diamond 1, 2, 3, 4 and 5
Take 5 cards (from 12 cards) such that there is at least one card of each type. In how many
ways is that possible? The
order of these five cards
is irrelevant.
A 590 B 690 C 790 D 490
Question 14. How many sequences contain 6 numbers from 1, 2, 3, 4, 5, 6 that meet the conditions: 6 numbers
in this sequence are different, and the sum of three first numbers less than the sum of three last
number a (1) unit?
A 12 B 36 C 72 D 108
Question 15. Suppose that R and S are reflexive relations on a set A. Which of the following statement is
correct?
A R ∪ S is reflexive, R ∩ S is ir-reflexive, R − S is reflexive,R ◦ S is ir-reflexive .
B R ∪ S is reflexive, R ∩ S is reflexive, R − S is ir-reflexive,R ◦ S is reflexive .
C R ∪ S is ir-reflexive, R ∩ S is reflexive, R − S is reflexive,R ◦ S is ir-reflexive .
D R ∪ S is reflexive, R ∩ S is ir-reflexive, R − S is ir-reflexive,R ◦ S is ir-reflexive .
Question 17. Translate the following statement into English expressions using predicates, quantifiers and
logical connectives. Let C(x) denote the predicate “x is in the correct place”, E(x) denote
the predicate “x is in excellent condition”. Suppose that the domain consists of all tools.
• We know that each type I batch has 8 good parts and 2 bad (malfunctioning) parts; and
each type II batch has 7 good parts and 3 bad parts. Also this year the firm W imported
80 type I batches, 20 type II batches and stored all in a warehouse.
• Each new computer mainboard need precisely 3 part to build, hence engineers go to the
warehouse and randomly choose a batch (either type I or type II batch) then get randomly
3 parts out of that batch to make the mainboard.
The probability that engineers rightly choose 3 good parts for making a new main-board is
A 3/10 B 6/70 C 26/70 D 27/70
Code: 1711
Question 1. C Question 6. D Question 11. C Question 16. D
Question 2. B Question 7. C Question 12. C Question 17. B
Question 3. D Question 8. C Question 13. A Question 18. D
Question 4. D Question 9. B Question 14. D Question 19. D
Question 5. B Question 10. C Question 15. B Question 20. A