0% found this document useful (0 votes)
63 views8 pages

CS1231Y Exam

This document is an examination for CS1231Y Discrete Structures given in November/December 2007 at the National University of Singapore. It consists of 8 pages containing 10 questions. The questions test knowledge of graphs, sets, functions, strings, passwords, and counting principles related to discrete structures. Students are instructed to answer all 5 questions within the allotted 2 hours and show their work in the provided booklet.

Uploaded by

yuki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views8 pages

CS1231Y Exam

This document is an examination for CS1231Y Discrete Structures given in November/December 2007 at the National University of Singapore. It consists of 8 pages containing 10 questions. The questions test knowledge of graphs, sets, functions, strings, passwords, and counting principles related to discrete structures. Students are instructed to answer all 5 questions within the allotted 2 hours and show their work in the provided booklet.

Uploaded by

yuki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

CS1231Y

National University of Singapore


SCHOOL OF COMPUTING
EXAMINATION FOR
Semester 1 AY2007/2008

CS1231Y DISCRETE STRUCTURES

Nov/Dec 2007 Time Allowed: 2 Hours

INSTRUCTIONS TO CANDIDATES

1. This examination paper comprises EIGHT(8) printed pages, including this page.

2. Answer ALL FIVE(5) questions within the space in this booklet.


The marks for each question are indicated in brackets.

3. This is an OPEN book examination.

4. Please write your MATRICULATION NUMBER below.

MATRICULATION NUMBER:

EXAMINER’S USE ONLY


Question Marks Score Check
Q1 22
Q2 8
Q3 14
Q4 8
Q5 8
Total 60
PAGE 2 CS1231Y

1. Consider the following graph G:

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]

(iii) Prove that fU is bijective for any U. [4 marks]

/..6
PAGE 6 CS1231Y

3. Consider alphabets Γ = {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z} and


N = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. A password is a string of symbols from Γ and N such that
(I) the first symbol is from Γ and
(II) it has at least one symbol from N.

(i) How many passwords are there of length 6? [3 marks]

(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]

(iv) How many permutations of po88p881 are passwords? [4 marks]

/..7
PAGE 7 CS1231Y

4. Let b be a symbol. Prove that {S ∈ P({b}∗ ) | S is finite } is countable. [8 marks]

/..8
PAGE 8 CS1231Y

5. Prove, by induction, that a forest (V, E) has |V | − |E| trees. [8 marks]

— End of Paper —

You might also like