Requirements for this paper
Multiple-choice cards NO Non-programmable NO Open book test NO
calculator
Graph paper NO Laptop NO
Assessment Type : Class Test 02 - Mock Test Programme : BSc
Module Code : MATH236 Duration : Plenty
Module Name : Discrete Mathematics with Marks : 70 Marks
Applications
Examiners(s) : Dr Zekhaya B. Shozi Date : Any day < 14 May 2025
Moderator(s) : Dr. Cerene Rathilal Time : Any time < 11:25 that day
INSTRUCTIONS:
This question paper consists of FOUR questions.
Answer ALL questions.
Marks are awarded for completeness, clarity and style of presentation.
A correct solution, poorly presented, will not earn full marks.
Please Turn Over
MATH236 (Class Test 02 - Mock Test) Page 1 / 4
Question 01 [15 Marks]
1.1. Encrypt the message can we go out for dinner using a shift cipher with key 4. (3)
1.2. Decrypt the message WYVZMZEP SJ XLI JMXXIWX using a shift cipher
with key 4. (3)
1.3. Encrypt the message can we go out for dinner tonight using a permutation
cipher with key (143652). (5)
1.4. Decrypt the message OELV YU-O using a permutation cipher with key (2413). (4)
Question 02 [18 Marks]
2.1. Sihle and Akhona agree to use Diffie-Hellman key-exchange to agree on a secret key.
They decide that Y = 8 and P = 11. Sihle chooses A = 5 and Akhona chooses B = 3.
Find the shared secret key. (4)
2.2. Sihle wants to set up an RSA key-pair. Suppose he chooses p = 73, q = 89, and
e = 23. Find his public modulus, n.
2.2.1. Find his public modulus, n. (1)
2.2.2. What is his public key? (1)
2.2.3. Determine ϕ(n). (2)
2.2.4. Find his private key d. (3)
2.3. Sihle wants to set up an El-Gamal key-pair. Suppose he chooses p = 2777, α = 3, and
a = 9.
2.3.1. Verify that α generates Z∗2777 . (4)
2.3.2. What is his public key? (1)
2.3.3. What is his private key? (2)
Question 03 [21 Marks]
3.1. For each of the properties listed below, find a graph G that has the given property.
3.1.1. Every two vertices of G are adjacent and every two edges of G are adjacent. (2)
3.1.2. Every vertex of G is incident with an edge, but no two edges of G are adjacent. (2)
3.2. Prove the following theorem: In any graph graph, there is an even number of vertices
with odd degree. (6)
3.3. Determine whether or not the sequence s : 6, 3, 3, 3, 3, 3, 3 is graphical. If it is
graphical, draw a graph with degree sequence s. (5)
MATH236 (Class Test 02 - Mock Test) Page 2 / 4
3.4. Consider the graph G shown below:
3.4.1. Write down A, the adjacency matrix of G. (2)
2
3.4.2. Compute A and write down the number of v1 -v5 walks of length 2 in G. (3)
3.4.3. Write down a v1 -v1 walk of length 4. (1)
Question 04 [16 Marks]
4.1. A company has branches in each of the six cities c1 , c2 , c3 , c4 , c5 and c6 . The fare for a direct
flight from ci to cj is given by the (i, j)th entry in the matrix C (where ∞ indicates that
there is no direct flight).
0 500 ∞ 400 250 100
500 0 150 200 ∞ 250
∞ 150 0 100 200 ∞
C=
400 200 100 0 100 250
250 ∞ 200 100 0 550
100 250 ∞ 250 550 0
Use Dijkstra’s algorithm to find the cheapest route (and its length) from c1 to all five
other cities. (10)
4.2. Once upon a time there was a city that had no paved roads. Getting around the city was
particularly difficult after rainstorms because the ground became very muddy – cars got
stuck in the mud and people got their boots dirty. The mayor of the city decided that some
of the streets must be paved, but did not want to spend more money than necessary because
the city also wanted to build a swimming pool. The mayor therefore specified two conditions:
– Enough streets must be paved so that it was possible for everyone to travel from their
house to anyone else’s house by a route consisting only of paved roads, possibly via
other houses.
– The paving should be accomplished at a minimum total cost.
The diagram below shows the layout of the unpaved roads and the number of stones that
would be required to pave each road.
MATH236 (Class Test 02 - Mock Test) Page 3 / 4
What is the minimum number of paving stones that need to be used to pave a sufficient
number of roads so that people can get from any house to any other house on a paved road?
(The bridge does not need to be paved.) (6)
Total = 70 Marks
”The only way to learn mathematics is to do mathematics.” – Paul Halmos
The End
MATH236 (Class Test 02 - Mock Test) Page 4 / 4