Y) ::Lxv'Y (Xy::Lx::Ly ( (X (2X (X: (D) Vxv'Y::Lz (Z
Y) ::Lxv'Y (Xy::Lx::Ly ( (X (2X (X: (D) Vxv'Y::Lz (Z
FACULTY OF ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE AND INFORMATION SYSTEMS
1. (8 marks] Determine the truth value of each of the following statements if the universe of
discourse of each variable is the set of real numbers:
(a) Vx:3y(x 2 = y); (b) ::lxV'y(xy = 0); (c) ::lx::ly[(x + 2y = 2) 1\ (2x + 4y = 5));
(d) VxV'y::lz(z = (x + y)/2).
2. [12 marks]: Determine whether each of the following arguments is valid. If an argument is
valid, what rule of inference is being used? If it is not, what fallacy occurs?
(a) [3 marks] If n is a real number with n > 2, then n 2 > 4. Suppose that n 2 > 4. Then n > 2.
(b) [3 marks] If n is a real number with n > 2, then n 2 > 4. Suppose that n 2 :::; 4. Then n :::; 2.
(c) [3 marks] If n is a real number with n > 2, then n 2 > 4. Suppose that n:::; 2. Then n 2 :::; 4.
(d) [3 marks] If n is a real number with n > 2, then n 2 > 4. Suppose that n > 2. Then n 2 > 4.
3. [10 marks] How many ways are there to distribute 5 different toys to 4 different children such
that each child gets at least one toy?
(a) [5 marks] Find a recurrence relation for the number of bit strings of length n that contain
three consecutive Os.
(c) [4 marks] How many bit strings of length 6 contain three consecutive Os?
5. [13 marks]: Let R be the relation on the set {1, 2, 3, 4} containing the ordered pairs (1, 2),
(1, 4), (3, 3), (4, 1).
1
(a) [2 marks] Form a matrix Mn to represent the relation R.
(b) [8 marks] Find the transitive closure of the relation R.
(c) [3 marks] Find the smallest relation containing the relation R that is both reflexive and
transitive.
6. [18 marks]: Consider the complete bipartite graph Km,n· Answer the following questions.
(a) [2 marks] For which values of m and n does the Km,n have an Euler circuit?
{b) [4 marks] For which values of m and n does the Km,n have an Euler path but not an Euler
circuit?
(c) [2 marks] Is the K2,6 planar?
(d) [2 marks] Is the K3,6 planar?
(e) [2 marks] What is the chromatic number of Km,n?
(f) [6 marks] Find the number of paths of length 4 between any two nonadjacent vertices in K 4 ,4 •
(a) (5 marks] Draw the ordered rooted tree corresponding to the compound proposition
+-+...,V pq !\ •p•q written in prefix notation.
(b) [5 marks] What is the postfix expression of this compound proposition?
(c) [5 marks) Draw a truth table for this compound proposition.
8. [6 marks]: Find a regular grammar that generates the regular set recognized by the finite-state
automaton shown in the following figure:
start
END OF PAPER