Professional Documents
Culture Documents
PastExamSolutions PDF
PastExamSolutions PDF
2011–2012 EXAMINATION
1. (a) (i) [2] × [1] × [3] = {(1, 1, 1), (1, 1, 2), (1, 1, 3), (2, 1, 1), (2, 1, 2), (2, 1, 3)}.
(ii) P({a, b, c}) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.
(iii) P(P(∅)) = P({∅}) = {∅, {∅}}.
(iv) The elements of P([5]) of cardinality 2 are:
{1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 3}, {2, 4}, {2, 5}, {3, 4}, {3, 5}, {4, 5}.
(v) The partitions of [4] into 2 blocks are:
{{1}, {2, 3, 4}}, {{2}, {1, 3, 4}}, {{3}, {1, 2, 4}}, {{4}, {1, 2, 3}},
{{1, 2}, {3, 4}}, {{1, 3}, {2, 4}}, {{1, 4}, {2, 3}}.
1
[Any choice for the fixed element of f −1 (t) can be made for each t ∈ T .]
Therefore, for each t ∈ T , f ◦ g(t) = f (g(t)) [using the definition of f ◦ g]
= t [using g(t) ∈ f −1 (t), and the definition of f −1 (t)].
Therefore f ◦ g = IT [using the definition of IT ],
and so f has a right inverse g, as required.
(iii) f has six right inverses:
• g: {a, b} → [5] with g(a) = 2 and g(b) = 1
• g: {a, b} → [5] with g(a) = 2 and g(b) = 3
• g: {a, b} → [5] with g(a) = 2 and g(b) = 4
• g: {a, b} → [5] with g(a) = 5 and g(b) = 1
• g: {a, b} → [5] with g(a) = 5 and g(b) = 3
• g: {a, b} → [5] with g(a) = 5 and g(b) = 4.
(iv) f has no left inverses (since it is not injective).
2
• The integers placed into boxes are the elements of f (S) ∈ B.
(v) Explicitly, the box diagrams for each element of A are
{1, 2, 3}: × 1 1 1 × ×, {1, 2, 4}: × 1 1 × 2 ×,
1 2 3 4 1 2 3 4
n−1 n−1 (n−1)! (n−1)!
(b) (i) RHS = + = +
k−1 k (k−1)! (n−k)! k! (n−k−1)!
(n−1)! k (n−1)! (n−k) (n−1)! k (n−1)! (n−k)
= + = +
k (k−1)! (n−k)! k! (n−k) (n−k−1)! k! (n−k)! k! (n−k)!
(n−1)! (k+n−k) n (n−1)! n! n
= = = =
k! (n−k)! k! (n−k)! k! (n−k)! k
= LHS, as required.
(ii) Let A be the set of all selections of k elements from [n] with order unimportant
and repetition not allowed, A1 be the set of elements of A which contain n,
and A2 be the set of elements of A which do not contain n.
(In fact, any other fixed element of [n] could be used here instead of n, although
slight modifications would then be needed in the rest of the proof.)
Thus, A = {S ⊂ [n] | |S| = k},
A1 = {S ∈ A | n ∈ S} and
A2 = {S ∈ A | n ∈ / S} = {S ⊂ [n−1] | |S| = k}.
n n−1
Therefore, |A| = and |A2 | = .
k k
It also follows that A = A1 ∪ A2 and A1 ∩ A2 = ∅, so that |A| = |A1 |+|A2|.
Now let B be the set of all selections of k−1 elements from [n−1] with order
unimportant and repetition not allowed, i.e., B = {T ⊂ [n−1] | |T | = k−1}.
n−1
Therefore, |B| = .
k−1
Finally, define functions f and g by f : A1 → B with f (S) = S \ {n} for
each S ∈ A1 , and g: B → A1 with g(T ) = T ∪ {n} for each T ∈ B.
It can be seen that f and g are well-defined, and that g is an inverse of f .
Therefore, using the standard results that if a function has an inverse then
it is a bijection, and that if a function is a bijection between two finite sets
then those sets have the same size, it follows that f is a bijection, and that
|A1 | = |B|.
n n−1 n−1
Hence, = |A| = |A1 | + |A2 | = |B| + |A2 | = + , as
k k−1 k
required.
3
(iii) For n = 4 and k = 3, A is the set of all selections of 3 elements from [4] with
order unimportant and repetition not allowed, A1 is the set of elements of A
which contain 4, A2 is the set of elements of A which do not contain 4, and B
is the set of all selections of 2 elements from [3], again with order unimportant
and repetition not allowed.
The functions f and g are given by f : A1 → B with f (S) = S \ {4} for each
S ∈ A1 , and g: B → A1 with g(T ) = T ∪ {4} for each T ∈ B.
Diagrammatically:
A
A1 B
f
{1,2,4} • • {1,2}
g
f
{1,3,4} • • {1,3}
g
f
{2,3,4} • • {2,3}
g
A2
{1,2,3}
4
(viii) Number of partitions of [3] is 5.
(ix) Number of partitions of 3 is 3.
(x) Number of functions = 6 . 5 . 4 = 120.
(iii) For n = 5 and k = 4, A is the set of selections of 3 elements from [4], with
order unimportant and repetition not allowed, and B is the set of composi-
tions of 5 into 4 parts. The functions f and g are given by f : A → B with
f ({s1 , s2 , s3 }) = (s1 , s2 − s1 , s3 − s2 , 5 − s3 ), for each {s1 , s2 , s3 } ∈ A with
s1 < s2 < s3 , and g: B → A with g((a1 , a2 , a3 , a4 )) = {a1 , a1 +a2 , a1 +a2 +a3 },
for each (a1 , a2 , a3 , a4 ) ∈ B.
Diagrammatically:
A B
f
{1,2,3} • • (1,1,1,2)
g
f
{1,2,4} • • (1,1,2,1)
g
f
{1,3,4} • • (1,2,1,1)
g
f
{2,3,4} • • (2,1,1,1)
g
(iv) For n = 5 and k = 4, the diagrams for each element of A are explicitly
{1, 2, 3} : • • • • • ,
1 2 3 4 5
{1, 2, 4} : • • • • • ,
1 2 3 4 5
{1, 3, 4} : • • • • • ,
1 2 3 4 5
{2, 3, 4} : • • • • • .
1 2 3 4 5
5
4. (a) (i) S(n, k) is the number of partitions of [n] (or any finite set of size n) into k
blocks.
(ii) S(n, 1) = 1, since there is only the single partition { {1, . . . , n} } of [n] into 1
block.
(iii) S(n, n) = 1, since there is only the single partition { {1}, {2}, . . . , {n} } of [n]
into n blocks.
(iv) Let A be the set of all selections of 2 elements from [n] with order unimportant
and repetition not allowed (i.e., subsets of [n] of size 2), and let B be the set
of all partitions of [n] into n−1 blocks.
n
Therefore, |A| = and |B| = S(n, n−1).
2
Now let the function f : A → B be given, for each T ∈ A, by f (T ) =
{ T, {x1 }, . . . , {xn−2 } }, where {x1 , . . . , xn−2 } = [n] \ T . In other words, for
each T ∈ A, f places the 2 elements of T into a single block of size 2, and
places the remaining n−2 elements of [n] into individual blocks, each of size 1.
It can be checked that f is well-defined and a bijection. Therefore, using the
standard result that if a function is a bijection between two finite sets then
n
those sets have the same size, S(n, n−1) = |B| = |A| = , as required.
2
(v) For the case of n = 4, the sets A and B, and the function f , are given by:
T ∈A f (T ) ∈ B
{1, 2} { {1, 2}, {3}, {4} }
{1, 3} { {1, 3}, {2}, {4} }
{1, 4} { {1, 4}, {2}, {3} }
{2, 3} { {2, 3}, {1}, {4} }
{2, 4} { {2, 4}, {1}, {3} }
{3, 4} { {3, 4}, {1}, {2} }
6
Therefore, since there are S(n, k) partitions of [n] into k blocks, and k! per-
mutations of each partition, there are k! S(n, k) surjective functions from [n]
to [k].
5.4
(b) (i) Number of graphs = 2 2 = 210 = 1024.
5.4
2 10
(ii) Number of graphs = = = 252.
5 5
0 1 0 1
1 0 1 1
(c) (i) The adjacency matrix is .
0 1 0 1
1 1 1 0
3
0 1 0 1 2 5 2 5
1 0 1 1 5 4 5 5
(ii) Number of paths of length 3 from 3 to 2 = =
0 1 0 1 2 5 2 5
1 1 1 0 32 5 5 5 4 32
(iii) The paths of length 3 from 3 to 2 are: (3, 2, 1, 2), (3, 2, 3, 2), (3, 2, 4, 2),
(3, 4, 1, 2) and (3, 4, 3, 2).
7
2012–2013 EXAMINATION
8
(d) (i) Let f : S → T be injective.
Then f −1 (t) contains at most one element of S for each t ∈ T .
More specifically, f −1 (t) contains a single element if t is in the range of f (i.e.,
if t ∈ f (S)) and is empty if t is not in the range of f (i.e., if t ∈ T \f (S)).
Now define g: T → S by
the single element of f −1 (t), t ∈ f (S)
g(t) = an arbitrarily-chosen element of S
[different choices being possible for each t], t ∈ T \f (S).
It then follows that g(f (s)) = s for any s ∈ S [since f (s) ∈ f (S), so that
g(f (s)) is the single element of f −1 (f (s)), which is simply s].
Therefore, g ◦ f (s) = s [using the definition of g ◦ f ],
and so g ◦ f = IS [where IS is the identity function on S].
Therefore f has a left inverse g, as required.
(ii) It can be seen that, if S and T are finite, then the different choices for each
t ∈ T \f (S) in the expression for g in (i) give all possible left inverses of f .
Therefore, since g(t) is uniquely determined for each t ∈ f (S), and there
are |S| choices for g(t) for each t ∈ T \ f (S), the number of left inverses is
|S||T \f (S)| = |S||T |−|f (S)|. But since f is injective, it follows that |f (S)| = |S|,
and hence that the number of left inverses is |S||T |−|S|.
(ii) The selections of 2 elements from {a, b} with order important and repetition
allowed are (a, a), (a, b), (b, a), (b, b).
(iii) The selections of 2 elements from {a, b, c} with order important and repetition
not allowed are (a, b), (a, c), (b, a), (b, c), (c, a), (c, b).
(iv) The injective functions f from {a, b} to {a, b, c} are:
• f : {a, b} → {a, b, c} with f (a) = a, f (b) = b,
• f : {a, b} → {a, b, c} with f (a) = a, f (b) = c,
• f : {a, b} → {a, b, c} with f (a) = b, f (b) = a,
• f : {a, b} → {a, b, c} with f (a) = b, f (b) = c,
• f : {a, b} → {a, b, c} with f (a) = c, f (b) = a,
• f : {a, b} → {a, b, c} with f (a) = c, f (b) = b.
9
(v) The selections of 2 elements from {a, b, c} with order unimportant and repe-
tition allowed are {a, a}M , {a, b}M , {a, c}M , {b, b}M , {b, c}M , {c, c}M .
(vi) The selections of 4 elements from {a, b, c, d, e} with order unimportant and
repetition not allowed are {a, b, c, d}, {a, b, c, e}, {a, b, d, e}, {a, c, d, e},
{b, c, d, e}.
(vii) The permutations of {a, a, b, b}M are (a, a, b, b), (a, b, a, b), (a, b, b, a), (b, a, a, b),
(b, a, b, a), (b, b, a, a).
(viii) The compositions of 5 into 3 parts are (1, 1, 3), (1, 2, 2), (1, 3, 1), (2, 1, 2),
(2, 2, 1), (3, 1, 1)
(ix) The partitions of 5 into 3 parts are {1, 1, 3}M, {1, 2, 2}M.
(c) (i) The identity can be proved algebraically by setting x = y = 1 in the binomial
n
n
X n k n−k
theorem (x + y) = x y . In particular, this gives:
k=0
k
n n
X n X n
LHS = = 1k 1n−k = (1+1)n = 2n = RHS, as required.
k=0
k k=0
k
(ii) A selection of k elements from [n] with order unimportant and repetition not
n
allowed is a subset of [n] of size k, and the number of these is .
k
Therefore, the LHS is the total number of subsets of [n] of any size between 0
and n. But the total number of subsets of [n] is |P([n])| = 2n (using the
formula for the size of a power set), which gives the RHS, as required.
10
3. (a) (i) Number of subsets = |P([7])| − |P({1, 3, 5, 7})| = 27 − 24 = 128 − 16 = 112.
(ii) Number of terms = number of weak compositions of 5 into 3 parts =
5+3−1 7
= = 21.
5 5
6−1
(iii) Number of ways = number of compositions of 6 into 4 parts = =
4−1
5
= 10.
3
(iv) Number of ways = number of selections of 4 elements from [6] with order
important and repetition not allowed = 6 . 5 . 4 . 3 = 360.
(v) In any path, there are 1 − (−2) = 3 horizontal steps and 4 − (−1) = 5 vertical
3+5 3+5 8 8
steps. So the total number of paths is = = = =
3 5 3 5
56.
(vi) Number of ‘words’ = 4 . 3 . 2 . 1 + 4 . 3 . 2 + 4 . 3 + 4 = 24 + 24 + 12 + 4 = 64.
(vii) Number of surjective functions = 5! = 120.
4.3
(viii) Number of graphs = 2 2 = 26 = 64.
6.5
2
15
(ix) Number of graphs = = = 455.
3 3
5
(x) Number of edges = = 10.
2
(xi) Number of edges = 5 . 8 = 40.
n+k−1 n+k−1
(b) (i) |A| = |B| = |C| = =
k−1 n
(ii) f ((a1 , . . . , ak )) = (a1 −1, . . . , ak −1), for each (a1 , . . . , ak ) ∈ A
g((c1 , . . . , ck )) = (c1 +1, . . . , ck +1), for each (c1 , . . . , ck ) ∈ C
11
(iv) F (b) = (number of 1’s in b, number of 2’s in b, . . . , number of k’s in b),
for each b = {b1 , b2 . . . , bn }M ∈ B
G((c1 , . . . , ck )) = {1, . . . , 1 , 2, . . . , 2 , . . . , k, . . . , k }M ,
| {z } | {z } | {z }
c1 times c2 times ck times
for each (c1 , . . . , ck ) ∈ C
4. (a) (i) S(n, k) is the number of partitions of a finite set of size n into k blocks.
(ii) Let A be the set of partitions of [n] into k blocks, A1 be the set of elements
of A which contain the block {n}, and A2 be the set of elements of A which
do not contain the block {n}. (In fact, {m}, for any fixed m ∈ [n], could be
used instead of {n}, with certain modifications then being necessary to the
rest of the proof.) It follows that A = A1 ∪ A2 , A1 ∩ A2 = ∅ and S(n, k) =
|A| = |A1 | + |A2 |.
First, |A1 | will be determined. Let B1 be the set of partitions of [n−1] into
k −1 blocks, so that |B1 | = S(n−1, k −1), and define functions f and g by
f : A1 → B1 with f (P ) = P \ {{n}}, for each P ∈ A1 , and g: B1 → A1 with
g(Q) = Q ∪ {{n}}, for each Q ∈ B1 .
It can be seen that f and g are well-defined, and that g is an inverse of f .
Therefore, f is a bijection and |A1 | = |B1 | = S(n−1, k−1).
Next, |A2 | will be determined. Let B2 be the set of partitions of [n−1] into k
blocks, so that |B2 | = S(n−1, k), and define a function h by
the partition of [n−1] obtained from P
with h(P ) = by replacing T by T \ {n}, where T
h: A2 → B2 ,
is the block of P which contains n
for each P ∈ A2 (i.e., h simply removes n from the partition P ).
12
It can be seen that h is well-defined, and that, for each Q ∈ B2 , |h−1 (Q)| = k,
since h−1 (Q) consists of the k different partitions of [n] into k blocks in which n
is inserted into one of the k different blocks of Q. Therefore, |A2 | = k |B2 | =
k S(n − 1, k).
Finally, it now follows from previous equations that
S(n, k) = |A| = |A1 | + |A2 | = |B1 | + k |B2 | = S(n−1, k−1) + k S(n−1, k), as
required.
(iii) For n = 4 and k = 2:
A is the set of partitions of [4] into 2 blocks, A1 is the set of elements of A
which contain {4}, A2 is the set of elements of A which do not contain {4}, B1
is the set of partitions of [3] into 1 block, and B2 is the set of partitions of [3]
into 2 blocks.
Diagrammatically, these sets and the functions f , g and h are:
A1 B1
f
{{4}, {1,2,3}} • • {{1,2,3}}
g
A2 B2
h
{{1}, {2,3,4}} •
• {{1}, {2,3}}
{{1,4}, {2,3}} • h
h
{{2}, {1,3,4}} •
• {{2}, {1,3}}
{{1,3}, {2,4}} • h
h
{{3}, {1,2,4}} •
• {{3}, {1,2}}
{{1,2}, {3,4}} • h
13
By the definition of a graph (as used in this module), each edge must contain
two distinct vertices. Therefore, {i, i} = {i} ∈/ E for any i ∈ [n], which implies
that Aii = 0 for all i ∈ [n], i.e., that A has only zeros on the main diagonal.
(iv) Using the definition of matrix multiplication, the ij entry of the mth power
of A is
n
X n
X n
X n
X
(Am )ij = ... Aiv1 Av1 v2 . . . Avm−2 vm−1 Avm−1 j .
v1 =1 v2 =1 vm−2 =1 vm−1 =1
First note that, using the definition of a Cartesian product, the multiple sums
over v1 , . . . , vm−1 are equivalent to a single sum over all (v1 , . . . , vm−1 ) ∈ [n]m−1 ,
i.e.,
X
(Am )ij = Aiv1 Av1 v2 . . . Avm−2 vm−1 Avm−1 j .
(v1 ,...,vm−1 )∈[n]m−1
14
2014–2015 EXAMINATION
1. (a) (i) {1, 3} × {2, 4} = {(1, 2), (1, 4), (3, 2), (3, 4)}.
Therefore, the elements of P({1, 3} × {2, 4}) of cardinality 2 are
{(1, 2), (1, 4)}, {(1, 2), (3, 2)}, {(1, 2), (3, 4)}, {(1, 4), (3, 2)},
{(1, 4), (3, 4)} and {(3, 2), (3, 4)}.
(ii) The partitions of [4] into 3 blocks are
{{1}, {2}, {3, 4}}, {{1}, {3}, {2, 4}}, {{1}, {4}, {2, 3}},
{{2}, {3}, {1, 4}}, {{2}, {4}, {1, 3}} and {{3}, {4}, {1, 2}}.
15
(In fact, this expression remains valid even if f is not surjective, since in that
case there are no right inverses, and there exists some t ∈ T with f −1 (t) = ∅,
so that |f −1 (t)| = 0 and the product gives zero as required.)
(b) (i) The selections of 2 elements from {2, 4} with order important and repetition
allowed are (2, 2), (2, 4), (4, 2), (4, 4).
(ii) The selections of 2 elements from {2, 4, 6} with order important and repetition
not allowed are (2, 4), (2, 6), (4, 2), (4, 6), (6, 2), (6, 4).
(iii) The selections of 3 elements from {2, 4} with order unimportant and repetition
allowed are {2, 2, 2}M, {2, 2, 4}M, {2, 4, 4}M, {4, 4, 4}M.
16
(iv) The selections of 2 elements from {2, 4, 6, 8} with order unimportant and
repetition not allowed are {2, 4}, {2, 6}, {2, 8}, {4, 6}, {4, 8}, {6, 8}.
(v) The permutations of {2, 2, 4, 4}M are (2, 2, 4, 4), (2, 4, 2, 4), (2, 4, 4, 2), (4, 2, 2, 4),
(4, 2, 4, 2), (4, 4, 2, 2).
(vi) The weak compositions of 5 into 2 parts are (0, 5), (1, 4), (2, 3), (3, 2), (4, 1),
(5, 0).
(vii) The compositions of 5 into 2 parts are (1, 4), (2, 3), (3, 2), (4, 1).
(viii) The partitions of 5 into 2 parts are {1, 4}M, {2, 3}M.
n−1 n−1 (n−1)! (n−1)!
(c) (i) RHS = + = +
k−1 k (k−1)! (n−k)! k! (n−k−1)!
(n−1)! k (n−1)! (n−k) (n−1)! k (n−1)! (n−k)
= + = +
k (k−1)! (n−k)! k! (n−k) (n−k−1)! k! (n−k)! k! (n−k)!
(n−1)! (k+n−k) n (n−1)! n! n
= = = =
k! (n−k)! k! (n−k)! k! (n−k)! k
= LHS, as required.
(ii) Let A be the set of all selections of k elements from [n] with order unimportant
and repetition not allowed, A1 be the set of elements of A which contain n,
and A2 be the set of elements of A which do not contain n.
(In fact, any other fixed element of [n] could be used here instead of n, although
slight modifications would then be needed in the rest of the proof.)
Thus, A = {S ⊂ [n] | |S| = k},
A1 = {S ∈ A | n ∈ S} and
A2 = {S ∈ A | n ∈ / S} = {S ⊂ [n−1] | |S| = k}.
n n−1
Therefore, |A| = and |A2 | = .
k k
It also follows that A = A1 ∪ A2 and A1 ∩ A2 = ∅, so that |A| = |A1 |+|A2|.
Now let B be the set of all selections of k−1 elements from [n−1] with order
unimportant and repetition not allowed, i.e., B = {T ⊂ [n−1] | |T | = k−1}.
n−1
Therefore, |B| = .
k−1
Finally, define functions f and g by f : A1 → B with f (S) = S \ {n} for
each S ∈ A1 , and g: B → A1 with g(T ) = T ∪ {n} for each T ∈ B.
It can be seen that f and g are well-defined, and that g is an inverse of f .
Therefore, using the standard results that if a function has an inverse then
it is a bijection, and that if a function is a bijection between two finite sets
then those sets have the same size, it follows that f is a bijection, and that
17
|A1 | = |B|.
n n−1 n−1
Hence, = |A| = |A1 | + |A2 | = |B| + |A2 | = + , as
k k−1 k
required.
(iii) For n = 4 and k = 3, A is the set of all selections of 3 elements from [4] with
order unimportant and repetition not allowed, A1 is the set of elements of A
which contain 4, A2 is the set of elements of A which do not contain 4, and B
is the set of all selections of 2 elements from [3], again with order unimportant
and repetition not allowed.
The functions f and g are given by f : A1 → B with f (S) = S \ {4} for each
S ∈ A1 , and g: B → A1 with g(T ) = T ∪ {4} for each T ∈ B.
Diagrammatically:
A
A1 B
f
{1,2,4} • • {1,2}
g
f
{1,3,4} • • {1,3}
g
f
{2,3,4} • • {2,3}
g
A2
{1,2,3}
m+n m+n
3. (a) (i) Number of paths = = .
m n
m+n−1 m+n−1
(ii) Number of solutions = = .
n m−1
m+n−1 m+n−1
(iii) Number of terms = = .
n m−1
(iv) Number of functions = n(n − 1) . . . (n − m + 1).
n(n−1)/2
(v) Number of graphs = .
m
(b) (i) The identity can be proved algebraically by simply setting x = −1 and y = 1
n
n
X n k n−k
in the binomial theorem (x + y) = x y .
k=0
k
This gives LHS = (−1+1)n = 0n = 0 and
18
n n n n
X n k n−k
X n k
X n X n
RHS = (−1) 1 = (−1) = − ,
k=0
k k=0
k k=0
k k=0
k
k even k odd
n n
X n X n
which gives = , as required.
k=0
k k=0
k
k even k odd
(ii) Let A be the union of the sets of selections of k elements from [n] over all even
integers k between 0 and n, and let B be the union of the sets of selections
of k elements from [n] over all odd integers k between 0 and n, where in all
cases the selections are with order unimportant and repetition not allowed.
n n
X n X n
Then |A| = and |B| = .
k=0
k k=0
k
k even k odd
Equivalently, A is simply the set of all even-sized subsets of [n] and B is simply
the set of all odd-sized subsets of [n], i.e.,
A = {S ⊂ [n] | |S| is even} and B = {T ⊂ [n] | |T | is odd}.
Now define functions f : A → B and g: B → A by
( (
S \{n}, n∈S T \{n}, n∈T
f (S) = and g(T ) =
S ∪ {n}, n ∈
/S T ∪ {n}, n ∈
/ T,
for each S ∈ A and each T ∈ B.
Thus, f or g take a subset of [n] and if in n is in the subset, then it is removed,
whereas if n is not in the subset then it is added.
It follows that f and g are well-defined since adding or removing n from a
subset of [n] changes the parity of the size of the subset. It also follows that g
and f are respective inverses, since g ◦ f and f ◦ g are both identity functions,
as they involve taking a subset of [n], and then both adding and removing n
in one or other order, thereby giving back the original subset.
Therefore, using the standard results that if a function has an inverse then
it is a bijection, and that if a function is a bijection between two finite sets
then those sets have the same size, it follows that f is a bijection, and that
|A| = |B|.
n n
X n X n
Hence, = as required.
k=0
k k=0
k
k even k odd
[Note that any other fixed element of [n], instead than n, could have been
used in the definitions of f and g. Also, for the case of n odd, there is another
bijection f : A → B defined by f (S) = [n] \ S, for each S ∈ A.]
19
(iii) For n = 4:
A B
f
∅• g
• {4}
f
{1,2} • • {1,2,4}
g
f
{1,3} • • {1,3,4}
g
f
{1,4} • • {1}
g
f
{2,3} • • {2,3,4}
g
f
{2,4} • • {2}
g
f
{3,4} • • {3}
g
f
{1,2,3,4} • • {1,2,3}
g
20
(iv) For n = 5 and k = 4, the diagrams for each element of A are explicitly
{1, 2, 3} : • • • • • ,
1 2 3 4 5
{1, 2, 4} : • • • • • ,
1 2 3 4 5
{1, 3, 4} : • • • • • ,
1 2 3 4 5
{2, 3, 4} : • • • • • .
1 2 3 4 5
4. (a) (i) S(n, k) is the number of partitions of [n] (or any finite set of size n) into k
blocks.
(ii) Let A be the set of all nonempty subsets of [n−1], i.e., A = P([n−1])\{∅},
and let B be the set of all partitions of [n] into 2 blocks.
Then |A| = 2n−1 −1 and |B| = S(n, 2).
Now let the function f : A → B be given by f (T ) = { T, [n]\T },
for each T ∈ A.
It can be checked that f is well-defined and a bijection.
Therefore, using the standard result that if a function is a bijection
between two finite sets then those sets have the same size,
S(n, n−1) = |B| = |A| = 2n−1 −1, as required.
(iii) For the case of n = 4, the sets A and B, and the function f , are given by the
table:
T ∈A f (T ) ∈ B
{1} { {1}, {2, 3, 4} }
{2} { {2}, {1, 3, 4} }
{3} { {3}, {1, 2, 4} }
{1, 2} { {1, 2}, {3, 4} }
{1, 3} { {1, 3}, {2, 4} }
{2, 3} { {2, 3}, {1, 4} }
{1, 2, 3} { {1, 2, 3}, {4} }
21
i.e., a bijection can be formed between the set of surjective functions from [n]
to [k], and the set of permutations of partitions of [n] into k blocks.
Therefore, since there are S(n, k) partitions of [n] into k blocks,
and k! permutations of each partition, there are k! S(n, k) surjective
functions from [n] to [k].
0 1 0 1
1 0 1 0
(b) (i) For C4 , V = [4], E = {{1, 2}, {2, 3}, {3, 4}, {1, 4}} and A =
0
.
1 0 1
1 0 1 0
0 0 1 1
0 0 1 1
(ii) For K2,2 , V = [4], E = {{1, 3}, {1, 4}, {2, 3}, {2, 4}} and A =
1
.
1 0 0
1 1 0 0
(c) (i) Two graphs with vertex sets V1 and V2 , and respective edge sets E1 and E2 , are
defined to be isomorphic if there exists a bijection f : V1 → V2 which satisfies
{ {f (u), f (v)} | {u, v} ∈ E1 } = E2 .
(ii) The first graph has vertex set V1 = [5] and edge set
E1 = {{1, 2}, {1, 4}, {1, 5}, {2, 3}, {3, 4}, {3, 5}}, and
the second graph has vertex set V2 = [5] and edge set
E2 = {{1, 2}, {1, 3}, {1, 4}, {2, 5}, {3, 5}, {4, 5}}.
A bijection f : [5] → [5] which satisfies { {f (u), f (v)} | {u, v} ∈ E1 } = E2 is
f (1) = 1, f (2) = 4, f (3) = 5, f (4) = 3 and f (5) = 2. This can be explicitly
checked using the table
{u, v} ∈ E1 {f (u), f (v)}
{1, 2} {1, 4}
{1, 4} {1, 3}
{1, 5} {1, 2}
{2, 3} {4, 5}
{3, 4} {3, 5}
{3, 5} {2, 5}
where the edges of the first column are taken to be all those of E1 , and it is
then found that the edges of the second column comprise all those of E2 .
Therefore, the graphs are isomorphic.
(Note that there are other functions which satisfy the required condition. For
example, f : [5] → [5] with f (1) = 5, f (2) = 4, f (3) = 1, f (4) = 2 and f (5) = 3
is also a bijection which satisfies { {f (u), f (v)} | {u, v} ∈ E1 } = E2 .)
22