CS1231Y Exam
CS1231Y Exam
INSTRUCTIONS TO CANDIDATES
1. This examination paper comprises EIGHT(8) printed pages, including this page.
MATRICULATION NUMBER:
u0 u1 u2
u3 u4
u5 u6 u7
G
(i) Draw two different paths between u0 and (ii) Draw a path with the longest length in G.
u7 . [2 marks] [2 marks]
/..3
PAGE 3 CS1231Y
(iii) Give an example of an edge e such that (iv) Give an example of a subgraph (V ′ , E ′ )
removing e disconnects G. [2 marks] that is not a tree, and has |E ′ | = |V ′ | − 1.
[3 marks]
(v) Give an example of a subgraph (V ′′ , E ′′ ) (vi) Draw a spanning tree T = (VT , ET ) for
that is acyclic, and has |E ′′ | =
6 |V ′′ | − 1. G. [2 marks]
[3 marks]
/..4
PAGE 4 CS1231Y
(vii) Draw a spanning tree T ′ = (VT ′ , ET ′ ) for (viii) For (vii), give a permutation
G such that T ′ is isomorphic to your T in (vi), π : VT → VT ′ that shows T ≃ T ′ . [2 marks]
but T ′ 6= T . [2 marks]
(ix) Draw a spanning tree T ′′ for G such that (x) Explain why T ′′ in (ix) is not isomorphic
T ′′ is not isomorphic to your T in (vi). to T . [2 marks]
[2 marks]
/..5
PAGE 5 CS1231Y
2. Let U be the universal set, so that S = U − S for any S in the power set P(U). Define
fU : P(U) → P(U) by fU (S) = S.
(i) Determine fU ({Y }) for U = {CS, 1231Y, Y, 0708}. [2 marks]
(ii) Determine fN (Z+ ), where N is the set of non-negative integers and Z+ is the set of
positive integers. [2 marks]
/..6
PAGE 6 CS1231Y
(ii) How many passwords are there of length at least 6 and at most 8? [2 marks]
(iii) How many passwords of length 6 are there with 4 different symbols from Γ and 2 different
symbols from N? [5 marks]
/..7
PAGE 7 CS1231Y
/..8
PAGE 8 CS1231Y
— End of Paper —