You are on page 1of 10

INTENSIVE CLASS MAT210

SEPTEMBER 2019 – JANUARY 2020

MARCH – JULY 2019

QUESTION 1

a) Given A= { a, b, c , d } , B={ 1, 4 , 8 } and C={ φ } . Find :


( A∪B ) ×C
(2 Marks)

b) Given that R is a relation on B = { 1, 2 , 3 4 , 5 } if and only if


y−x
{
R = ( x , y ) such that
2
∈ Z+ }
i) State the members of R
(2 Marks)

ii) Determine whether the relation R is reflexive, antisymmetric, or transitive. Hence,


state whether the relation is partial order or not. Give your reasons.
(4 marks)

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)

d) Given the function f (x )=2−x and f : Z+ → Z .

i) Sketch the graph of the function f (x ) and state the range of f (x ) .


ii) Is f (x ) is one-to-one function? Give your reason.
iii) Is f (x ) is onto function? Give your reason.
(7 marks)
6.25−8.6
⌈ ⌉
1.6
⌈ ⌉−⌊ 4.3(7.2−4.8)⌋ +⌈trunc(2.2)3⌉
e) Evaluate
trunc ( ⌊ 3.999−5.33 ⌋ )
(5 marks)
QUESTION 2

a) Given A = {1, 2, 3, 4}.


If a relation R = {(1,1) , (1, 2) , (2,1), (2,3), (3,1), (3,3), (3,4), (4,3)},

i) Draw a directed graph that represents R.


ii) Based on the directed graph, state the in-degree and out-degree of each vertex.
Hence, show that the total in-degrees equal total out-degrees.
iii) Based on the directed graph, determine whether R is reflexive. State your
reason(s).
(7 marks)

b) Based on graph below:

G E D
A

C
B

i) Find the size of the graph.


ii) Find the shortest length from A to C.
iii) State (if any), an example of a Hamiltonian circuit. If not possible give your
reason.
iv) State (if any), an example of an Eulerian path. If not possible give your reason.
v) Construct a spanning tree with B as a root with height 3.

(8 Marks)

QUESTION 3

a) Given an algebraic expression


(a−b )3 −8
4 x2 y

i) Construct a full binary tree for the given expression.


ii) List all the leaves
iii) Determine the height of the tree.
(6 marks)

b) Using the following Huffman code;

i) Decode each bit string of: 001101100001110 and 0000011000111.

ii) Encode the word: SPELL and NICE.


(4 marks)
SEPTEMBER 18 - JANUARY 2019

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.

i) State the properties of R either reflexive, symmetric or transitive. Hence, determine


whether R is an equivalence relation or not. Give reason for each answer.
(4 marks)

ii) If R is an equivalence relation, find the partition and an equivalent classes.


(3 marks)

QUESTION 2

+
a) Given f : Z → Z , such that f ( x )=2 x−3 .

i) Sketch the graph of f (x)


ii) Based on the graph in (i), determine the range of the f (x) .
iii) Is f ( x ) a one-to-one function? Justify your answer.
iv) Is f ( x ) an onto function? Justify your answer.
(5 marks)

b) Determine the following value:

⌊ −17 . 8+1. 9 ⌋−⌈1. 4−trunc (−2 . 789231) ⌉


⌈ ⌉
⌊ 2. 7 ⌋
(3 marks)

QUESTION 3

a) Given the following Huffman code:


i) Decode 111001111011110111000 and 01100111000101100
ii) Encode the word ‘SEAL’ and ‘PENS’
(4 marks)

b) Based on figure below:

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

i) Construct a full binary tree for the given expression.

3
a
[
4+ x y−
b
2
]
2 m−n

ii) Determine an ancestors for the node ‘+’.


iii) State the size of the graph.
(6 marks)
SEPTEMBER 2017 – JANUARY 2018

QUESTION 1

a) Given the function f (x )=x−3 and f : Z+ → Z .

i) Sketch the graph of the function f (x ) and state the range of f (x )


ii) Is f (x ) is one-to-one function? Give your reason.
iii) Is f (x ) is onto function? Give your reason.
(5 marks)

b) Given that R is a relation on B = { 1, 2 , 3 4 , 5 } if and only if


x− y
{
R = ( x , y ) such that
3
∈Z }
i) State the members of R
ii) Determine whether the relation R is reflexive, symmetric, antisymmetric, or
transitive. Hence, state whether the relation is partial order or an equivalent
relation. Give your reasons.
(7 marks)
7.25−8.6
1.67⌈ ⌉
3.6
⌈ ⌉
c) Evaluate
trunc ( ⌊ 3.999 ⌋ )
(3 marks)

QUESTION 2

a) Given R = {(1, 3), (1, 4), (1, 5), (2, 2), (2, 3), (3, 5), (4, 3), (4, 5), (5, 2)}

i) Draw a directed graph that represents R


ii) From i) draw a subgraph of R which consist of all the nodes in R.
iii) From i) determine the degree, in-degree and out-degree for each node

iv) From i) state the shortest path from node 1 to node 3.


(7 Marks)

b) Given a graph G a shown below.

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

a) Given A = { r , s , t , u } . If R = { ( r ,r ) , ( r ,s ) , ( r ,t ) , ( r ,u ) , ( s,s ) , ( s,t ) , ( t ,s ) , ( t , u ) , (u ,s ) } , state the


properties of R either reflexive, symmetric or transitive. Give your reason/s
(3 marks)

b) If B = { 2, 3 , 4,5 } and if B 1= { 3,4 } And B2 = { 2 } B 3= { 5 } .

i) Determine whether B1, B2 and B3 is a partition on B. Give reason for your answer(s)
(2 Marks)

ii) If B1,B2 and B3 is a partition on B, find an equivalent relation R on that partition.


(2 Marks)

QUESTION 2

a) If f : [0 ,∞ )→R , where f(x) = 1 – x .

i) Sketch the graph of f(x).


(2 Marks)

ii) State the domain and range of the function.


(1 Mark)

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

Consider the following graph


A

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

i) Draw a full binary tree that represent the expression above.


(3 marks)
ii) State the height of the tree.
(1 mark)
iii) state the size of the tree
(1 mark)
iv) List all the leaves of the tree.
(1 mark)

You might also like