DM Midterm Assessment 2020 21
DM Midterm Assessment 2020 21
CM120
BSc EXAMINATION
COMPUTER SCIENCE
Discrete Mathemaitcs
INSTRUCTIONS TO CANDIDATES:
This assignments consists of five questions. You should answer all five questions.
Full marks will be awarded for complete answers to a total of Five questions.
The marks for each part of a question are indicated at the end of the part in [.]
brackets.
There are 100 marks available on this paper.
UL21/120 Page 1 of 8
Question 1 Set Theory
[2]
ii. Rewrite the following set using the set builder method:
[2]
(b) In a survey of 200 student, it was found that: 150 students took programming
(P), 80 students took mathematics (M), 55 students took art (A), 60 students
took mathematics and programming (M & P), 25 students took took art
and mathematics (A & M), 40 students took art and programming (A & P),
and 15 students took art, mathematics and programming (A & M & P).
(c) Let A and B be two subsets of the universal set U . Prove or disprove that
[4]
A⊆B ⇔A∪B =U
[6]
UL21/120 Page 2 of 8
Question 2 Functions
iv. Say whether or not f (x) is surjective(onto), justifying your answer. [2]
i. f (x, y) = x2 + 1
ii. g(x, y) = x + y + 2
[4]
UL21/120 Page 3 of 8
Question 3 Propositional Logic
(a) Let p, q, r and s four propositions. Assuming that p and r are false and that
q and s are true, find the truth value of each of the following propositions:
(b) Let p and q be two propositions defined as follows: p means ’A student can
take the algorithm module ’ whereas q means ’Student passes discrete
mathematics’
Express each of the three following compound propositions symbolically
by using p, q and appropriate logical symbols.
ii. ‘A student can take the algorithm module only if they pass discrete
mathematics’.
iii. ‘ A student can takes the algorithm module if they pass discrete mathematics’.
iv. ‘ A student either passes discrete mathematics or can take the algorithm
module’
[4]
(c) Write in words and express symbolically in terms p and q, defined in (a),
the contrapositive, the converse and the inverse of the implication:
‘A student can take the algorithm module if they pass discrete mathematics
’ [6]
UL21/120 Page 4 of 8
i. “Samir goes to the party only if both Callum and ‘Jay aren’t going to
the party.
ii. “Either both Samir and Jay go to the party or Callum goes to the party,
but not both ”.
[4]
UL21/120 Page 5 of 8
Question 4 Predicate logic
(a) Let P (x, y) be a boolean function. Assume that ∀x∃yP (x, y) is T rue and
that the domain of discourse is nonempty. Which of the following must also
be true? If the statement is true, explain; otherwise, give a counter-example.
i. ∀x∀yP (x, y)
ii. ∃x∀yP (x, y)
iii. ∃x∃yP (x, y)
[6]
(c) Let p, q, r, s and t be statements variables. Use the valid argument forms
to deduce the conclusion, ¬q, from the premises, giving a reason for each
step.
(a) ¬p ∨ q → r
(b) s ∨ ¬q
(c) ¬t
(d) p → t
(e) ¬p ∧ r → ¬s
——————————————————
(f) ∴ ¬q [6]
UL21/120 Page 6 of 8
Question 5 Boolean Algebra
(b) Consider the following combinatorial circuit with three inputs x, y and z,
and one output f (x, y, z):
UL21/120 Page 7 of 8
HHxy
HH
00 01 11 10
z HH
0
1
[2]
iii. Use the previous K-map and find a minimisation, as the sum of three
terms, of the expression
[3]
END OF PAPER
UL21/120 Page 8 of 8