Professional Documents
Culture Documents
QUESTION 1
c) Given A= { p , q, r , s,t } if
A 1 ={ q , s , t } ,
A 2 ={ r } ,
A 3 ={ q , r } ,
A 4= { p , r , t } ,
A 5 ={ p }
i) Find the correct partition based on the given blocks. Give your reason(s).
(3 Marks)
ii) Based on your answer in (i), find the equivalence classes.
(2 Marks)
G E D
A
C
B
(8 Marks)
QUESTION 3
QUESTION 1
a) Given a set A = { p, q, r , s } . If R= { ( p , p ) , ( p , r ) , ( q , q ) , ( q , s ) , ( r ,r ) , ( r , p ) , ( s, q ) , ( s , s ) } is a
relation on A.
QUESTION 2
+
a) Given f : Z → Z , such that f ( x )=2 x−3 .
QUESTION 3
A B C D
E F G
H I J K
i) Find a Hamiltonian path in the graph. If there is none, give your reason(s).
ii) Find an Eulerian circuit in the graph. If there is none, give your reason(s).
iii) Give an example of a spanning tree rooted at node f , with height 3.
(5 marks)
QUESTION 4
3
a
[
4+ x y−
b
2
]
2 m−n
QUESTION 1
QUESTION 2
a) Given R = {(1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (3, 5), (4, 3), (4, 5), (5, 2)}
a b
c d
e
i) Give an example of a Hamilton circuit. Give a reason if the circuit does not exist.
ii) Give an example of an Eular path. Give a reason if the path does notf exist.
iii) Draw a spanning tree as node ‘h’ as a root.
(5 Marks)
i
g h
c) Based on Huffman Code below:
1 0
1 0 1 0
R E
1 0 0
1
I N
0
D 1
A
1 0
P
V
i) Decode 0111000010111101100111100
ii) Encode the word : VAN and RIPE
(3 Marks)
MARCH – JULY 2018
QUESTION 1
i) Determine whether B1, B2 and B3 is a partition on B. Give reason for your answer(s)
(2 Marks)
QUESTION 2
iii) State either F is one to one or/and onto function. Give your reason.
(3 Marks)
b) Evaluate:
trunc (−1 .5 )−⌈7 . 2−10 .3 ⌉
⌊ −2 .5 ⌋
(2 marks)
QUESTION 3
B D E
C
F G H I
A A A
J
i) Determine the size of the graph above. K
A (1 mark)
ii) Find the Hamiltonian path in the graph above. If it does not exist, give your reason for
your answer.
(2 Marks)
iii) Find the Eulerian path in the graph above. If it does not exist, give your reason for
your answer.
(2 marks)
iv) Find the Eulerian circuit in the graph above. If it does not exist, give your reason for
your answer.
(2 Marks)
v) Construct a spanning tree with K as a root with height 3.
(2 marks)
QUESTION 4
( a+5 ) c−9
1
( 4 )( 3 y )
x 2