Discrete Mathematics Final Examination - Solutions
Discrete Mathematics Final Examination - Solutions
Section A
1) B (1 mk)
2) B (1 mk)
3) B (1 mk)
4) C (1 mk)
5) B (1 mk)
6) Negate the statement; All students do not take coffee. (do not use the statement, it is not
the case…or it is not true….) (1 mk)
Some students take coffee.
7) Determine the check digit for the ISBN – 13 digit 978-8-120-31502 (2 mks)
9 + 8 + 1 + 0 + 1 + 0 + 𝑥 + 3(7 + 8 + 2 + 3 + 5 + 2) = 0𝑚𝑜𝑑 10
19 + 𝑥 + 81 = 0 𝑚𝑜𝑑 10
𝑥 + 100 => 𝑥 = 0
8) Outline an area where each of the following concepts can be applied in technology,
graph theory, permutation functions, logic. (3 mks)
Graph theory – designing networks; permutation functions – cryptography/ciphers; logic –
automating reason for machines.
9) Explain a cryptosystem (2 mks)
It is a structure with 5 -tuples is (P, C, E, D, K) – P set of plaintexts, C – set of ciphertexts, E –
Encrypting functions, D – Decrypting functions, and K set of keys.
A compound proposition that is a tautology and involves an implication e.g. modus ponens.
15) Define the following terms and illustrate each with a relevant example: a proposition, a
theorem, and an axiom (6 mks)
Proposition is a statement that can be a signed a value e.g. today is Sunday.
Theorem is a proposition that has been proved to be true e.g. Pythagoras theorem.
An axiom is a statement that is assumed to be true e.g. a + b = b + a where a and b are any real
numbers.
Section B
Question 1 (Compulsory – 20 marks)
4 1 2 3 1 2 3 4
a) Consider the following permutation functions: p1 = ( ) ; 𝑝2 = ( )
3 4 1 2 2 4 1 3
hence evaluate; p−1 2 ∘ p2 ∘ p1
−1
(2 marks)
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
p−1 −1
2 ∘ p2 ∘ p1 = ( )∘( )∘( )=( )
3 1 4 2 2 4 1 3 2 3 4 1 2 3 4 1
b) Consider the statement; If I do not read then I will not go home. Write down its
converse and design a logic gate for the negation of the converse. (3 marks)
(Use p: I will not read; q: I will not go home)
If I will not go home, then I will not read i.e. 𝑞 → 𝑝
Its negation is ¬(𝑞 → 𝑝) ≡ 𝑞 ∧ ¬𝑝
Alternatively, prove by contradiction that the argument is invalid i.e. the conclusion is false, and the
assumptions are all true i.e.
1. ¬𝑝 is F
2. 𝑝 → 𝑞 is T (with p as T and q as T)
3. ¬𝑞 is F
Which is a contradiction, the argument is valid.
e) Determine the inverse of 17 (mod 31) using the Euclidean algorithm method (show
working). (4 marks)
17𝑥 = 1(𝑚𝑜𝑑 31) => (17, 31) = 1
31 = 17 × 1 + 14
17 = 14 × 1 + 3
14 = 3 × 4 + 2
3=2×1+1
=> 1 = 3 − 1(2)
1 = 3 − 1[14 − 4(3)] = 3 − 1(14) + 4(3) = 5(3) − 1(14)
1 = 5[17 − 1(14)] − 1(14) = 5(17) − 6(14)
1 = 5(17) − 6[31 − 1(17)] = 5(17) − 6(31) + 6(17)
∴ 1 = 11(17) − 6(31)
Hence, we have.
11(17)(mod 31) − 6(31)(mod 23) = 1 (mod 31)
11(17)(mod 31) = 1 (mod 31)
Hence the inverse of 17 is 11 mod 31.
ciphertext D U H E T T O T S S N D M A R O L F O A
ii) Decrypt the ciphertext; NEJEM DTYEOCLISHFRSSAAYMDOEEHRT
(2 marks)
ME ENJOYED THIS CLASS FROM DAY THREE