Faculty Of Computer Studies
M131 - Form A
Discrete Mathematics
Final Exam
Summer Semester – 2011-2012
Date: ___________
Number of Exam Pages:
(5) Time Allowed:
(Including this cover sheet)
(2) Hours
Instructions:
1) The Exam consists of two parts: Multiple Choice questions (20 marks) and
Essay Questions (80 marks)
2) Read carefully the instructions related to each part of the exam
3) Write your answers on the separate answer booklet
M131 – Summer 2012
1
Final Exam – Form A
I. MULTIPLE CHOICE PART (WORTH 20 POINTS).
You may try all questions. Each question is worth 4 points. Your grade in
this part is that of the best 5 questions. In the template below write down
the letter corresponding to the correct answer for each question.
Q
A
1
b
2
d
3
a
4
c
5
a
6
d
………………………………………………………………………………...
Q–1: The number of edges in a wheel W4 is:
(a) 4
(b) 8
(c) 6
(d) 16
(e) None of the above
1
0
Q–2: The relation R represented by the matrix M R =
1
0
0 1 0
1 0 1
is:
0 1 0
1 0 1
(a) Irreflexive
(b) Antisymmetric
(c) Partial order
(d) Equivalence relation
(e) None of the above
Q–3: A full 3-ary tree with 5 internal vertices has a total number of vertices n=:
(a) 16
(b) 15
(c) 8
(d) 6
(e) None of the above
Q–4: The quotient q and remainder r when -154 is divided by 3 are:
(a) q= 51 and r=1
(b) q= -51 and r=-1
(c) q=-52 and r = 2
(d) q= -52 and r=1
(e) None of the above
M131 – Summer 2012
2
Final Exam – Form A
Q-5: The number of equivalence classes of the equivalence relation
R= a, b Z Z : a b mod 13 is:
(a) 13
(b) 11
(c) 12
(d) 1
(e) None of the above
Q–6: If the cardinality of a set A is 3, then the number of elements of P (A) =:
(a) 6
(b) 29
(c) 9
(d) 8
(e) None of the above
II. ESSAY QUESTIONS PART (WORTH 80 POINTS).
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You may try all questions. Each question is worth 20 points. Your grade in this
part is that of the best 4 questions. Please show the details of your work and not
just the final answer. Write down your answers neatly in the Answer Book
provided.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Q–1.
(a) (4 marks) Decide whether 320 5mod 3 .
(b) (6 marks) Find the converse, inverse, and contrapositive of the statement:
“If x A, then x is an odd integer”.
(c) (4 marks) Find the base 3 expansion of the integer that has (97) 10 as a decimal
representation.
(d) (6 marks) Encrypt the message “SAFE MODE” using the Caesar cipher.
M131 – Summer 2012
3
Final Exam – Form A
Solution:
a) 320- 5 = 315.
315 = 3 x 105, so 3 divides 315, hence 320 5mod 3 .
b)
Converse: If x is an odd integer, then x A .
Inverse: If x A, then x is not an odd integer.
Contrapositive: If x is not an odd integer, then x A.
c) (97)10= (10121)3 (successive division by 3).
d) Caesar cipher means that every letter is shifted 3 positions to the right.
The message “SAFE MODE” becomes “VDIH PRGH”.
Q–2:
(a) (6 marks) Prove, using distributive laws that: A B C A C B C
(b) i) (8 marks) Draw the truth table of p q p r .
ii) (6 marks) Show that the statement q p p q is a tautology without
using a truth table.
Solution:
a) A B C = A B C
= A C B C
= A B C
M131 – Summer 2012
4
Final Exam – Form A
b) i)
q
r
pq
pr
p q p r
T
T
F
F
T
T
F
F
T
F
T
F
T
F
T
F
T
T
F
F
F
F
T
T
T
F
T
F
T
T
T
T
F
T
T
F
T
T
F
F
p
T
T
T
T
F
F
F
F
q p p q q p p q
q p p q
ii)
q p p q
T
Q–3.
(a)
(i)
(ii)
(iii)
(3 marks) Find the ordered pairs of the relation R on the set
{1, 2, 3, 4,5,6,7} defined by xRy 2x – y = 3.
(5 marks) Check whether the relation above is reflexive, symmetric,
antisymmetric, irreflexive, or transitive.
(2 marks) Find the symmetric and reflexive closure of R.
(b) Consider the relation R from the set {a, b, c} to {0, 1} and the set S from the set
{0, 1} to {a, b, c} defined by:
R= {(a,0), (a,1), (b,0), (c,0), (c,1)} and S = { (0,a),(1,a) , (0,b), (1,c)}
M131 – Summer 2012
5
Final Exam – Form A
(i)
(ii)
(3 marks) Find the ordered pairs of the relation R S.
(4 marks) Find the matrix representations MR and MS of the relations R
and S respectively.
(iii)
(3 marks) Deduce the matrix representation of R S
Solution:
a) i) R = {(2,1) , (3,3), (4,5), (5,7)}
ii) Not reflexive since (1,1) R.
Not symmetric since (2,1) R but (1,2) R.
Not irreflexive since (3,3) R.
Not transitive since (4,5) R and (5,7) R but (4,7) R.
It is antisymmetric since none of the pairs and their inverses exist at the same
time.
iii) Reflexive closure: {(1,1), (2,2), (3,3), (4,4), (5,5), (6,6),(7,7), (2,1) , (4,5),
(5,7)}
Symmetric closure: {(1,2), (2,1) , (3,3), (4,5),(5,4), (7,5), (5,7)}
b) i) R S = {(0,0), (0,1), (1,0), (1,1)}
1 1
1 1 0
ii) M R 1 0 and M S
1 0 1
1 1
c) M RS M s M R
1 1
1 1 0
=
1 0
1 0 1
1 1
1 1
=
1 1
M131 – Summer 2012
6
Final Exam – Form A
Q–4
1
0
(a) Let M
1
0
0 1 0 0
1 0 0 1
be the incidence matrix of a graph G with vertices a,b,c,
1 0 1 0
0 1 1 1
and d.
(i)
(ii)
(iii)
(4 marks) Draw the graph G.
(4 marks) Find the adjacency matrix of G.
(4 marks) Using the adjacency matrix of G, find the number of paths from c
to d of length 2.
(b) (2 marks) Does a graph G having 5 vertices where each vertex is of degree 3
exist? Justify your answer.
(c) (6 marks) Re-write the following without any negations on quantifiers:
(i) xy( x y )
(ii) xy(( x 3) ( y 4))
Solution:
a) i)
M131 – Summer 2012
7
Final Exam – Form A
0
0
ii) Adjacency matrix : A=
1
1
2 2 1 1
2 2 1 1
iii) A2 =
1 1 3 2
1 1 2 3
0 1 1
0 1 1
1 0 1
1 1 0
The number of paths from c to d of length 2 is 2.
b)
deg(v) = 2e (Handshaking Theorem)
So deg(v) should be an even integer, but
odd, so such a graph does not exist.
deg(v) = 3 x 5 =15 which is
c) (i) xy( x y )
(ii) xy(( x 3) ( y 4))
M131 – Summer 2012
8
Final Exam – Form A
Q– 5. Below is a binary rooted tree representation of an algebraic expression:
a) (4 marks) What algebraic expression does the above rooted tree represent?
b) For the above tree, find the: (4 marks each)
i)
infix notation
ii)
prefix notation
iii) postfix notation
c) (4 marks) Find the value of the prefix expression:
-6+*57/^329
Solution:
a) x 23 y 3 x 5
b) i) infix notation: x 2 3* y 3 x 5
ii) prefix notation: * ^ + x 2 3 – y - + 3 x 5
M131 – Summer 2012
9
Final Exam – Form A
iii) postfix notation: x 2 + 3 ^ y 3 x + 5 - - *
c) - 6 + * 5 7 / ^ 3 2 9
=-6+*57/99
=-6+*571
= - 6 + 35 1
= - 6 36
= -30
M131 – Summer 2012
10
Final Exam – Form A
© Copyright 2026 Paperzz