Professional Documents
Culture Documents
DM SampleExam (Q)
DM SampleExam (Q)
DM SampleExam (Q)
Suppose that you must study two out of three programming languages namely C++, Java and
Perl.
(a) How many possible options do you have?
(2 marks)
(b) List all the possible options.
(3 marks)
A computer password consists of five characters. How many different passwords are possible
if
(a) it can be any lower case letters and digits?
(2 marks)
(b) the first two must be lower case letters and the remaining three can be either digits or
lower case letters?
(3 marks)
When tree coins are flipped, what is the probability that there will be
(a) exactly three heads?
(2 marks)
(b) one head and two tails?
(3 marks)
(a) State whether each of the following is a proposition, and state the truth values of those
that are propositions.
(i) 2x + 3 = y
(ii) Rectangle has four equal sides.
(3 marks)
(b) Write a negation for the statement below.
Justin fails his driving test today.
(2 marks)
Construct a truth table for the compound proposition ( ~ p∧q ) → ~ q , and state whether it is
tautology, contradiction or indeterminant.
F
y
(a) Find the Boolean expression that represents the output F of the circuit above.
(2 marks)
(b) Evaluate the expression obtained in part (a) if x = 0, y = 1, and z = 1.
(3 marks)
Obtain the simplified Boolean function from the Karnaugh maps below.
(a)
BC
A 00 01 11 10
0 1
1 1 1 1 1
(2 marks)
(b)
CD
AB 00 01 11 10
00 1 1 1
01 1 1 1
1
11 1 1 1
1
10 1 1
(3 marks)
(a) Draw an undirected graph based on the set of vertices, V and set of edges, E given
below.
V = {a, b, c, d, e}
E = {{a, c}, {a, e}, {b, d}, {b, e}, {c, d}}
(3 marks)
(b) Find a Euler circuit for the graph in part (a).
(2 marks)
e d
(a) (i) A particular brand of shirt comes in 8 colours, has a male version and a female
version, and comes in 5 sizes for each sex.
(A) How many different types of this shirt are made?
(2 marks)
(B) How many different types of this shirt are made for blue and red?
(2 marks)
(ii) Which counting principle is used in part (i)?
(1 mark)
(b) A class consists of 16 boys and 17 girls. A committee of four members are to be
selected at random. Determine the probability that
(i) all the committee members are girls
(4 marks)
(ii) three members are boys and one is a girl
(5 marks)
1 2 8
P ( A )= P ( A∩B )= P ( A∪B )=
(c) Let A and B be the events with 3, 9 and 12 . Find
P (B) .
(4 marks)
(d) An urn contains 7 red marbles and 3 white marbles. Three are drawn from the urn one
after the other. Find the probability that the first two are red and the third is white.
(3 marks)
(e) The following table shows sales, in thousands of units, of laptops of brand A, B and C
in year 2013 and 2014.
A B C Total
2013 350 460 220 1030
2014 450 640 380 1470
Total 800 1100 600 2500
If one of the laptop is selected at random, find the probabilities of the following
events:
(i) It is a laptop of brand B sold in year 2013.
(2 marks)
(ii) It is a laptop of brand A, or C.
(2 marks)
x y z F(x, y, z)
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
(i) State the minterm and maxterm expressions of the outputs given in the table.
(5 marks)
(ii) Simplify the minterm expression in part (i) using Karnaugh Map.
(5 marks)
(iii) Draw the logic circuit of the simplified minterm expression in part (ii).
(3 marks)
b c
d e f g
h i j k
l m
d c
(2 marks)
a
c
e
d
(i) Represent the graph using adjacency matrix.
(5 marks)
(ii) Find a Hamilton circuit from the graph given above.
(2 marks)