0% found this document useful (0 votes)
4 views

Tutorial 8

Uploaded by

b23cs1025
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Tutorial 8

Uploaded by

b23cs1025
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Maths for Computing

Tutorial 8
1. Give a combinatorial proof of

(0) (1) (2) (n)


n n n n
n! = D(n) + D(n − 1) + D(n − 2) + … + D(0)

2. How many permutations of {1,2,…, n} exist such that none of them contains (i, i + 1) for
i ∈ {1,2,…, n − 1}?

3. There are 10 questions on a discrete mathematics final exam. How many ways are there to assign
scores to the problems if the sum of the scores is 100 and each question is worth at least 5 points?

4. The number of all set partitions of [n] into nonempty parts is denoted by B(n), and is called the n
n


th Bell number. We set B(0) = 1. Clearly, B(n) = S(n, i ). Prove combinatorially that
i=0

∑(i)
n
n
B(n + 1) = B(i ).
i=0

5. Prove that if n ≥ 2, then n! < S(2n, n) < (2n)!.

6. Prove that the number of partitions of n into at most k parts is equal to the number of partitions
of n + k into exactly k parts. (Hint: Use Ferrer diagrams.)

7. Prove that for all integers n > 2, the number p(n) − p(n − 1) is equal to the number of
partitions of n in which the two largest parts are equal.

8. Prove that p3(n) = | X | , where X is the set of 3 length partitions of 2n, where every element of
the partition is at most n − 1.


9. Prove that Cn = Ci−1Cn−i, where Cn is the nth Catalan number for n ≥ 1. (Hint: Use North-
i=1
East lattice paths.)

10. Prove that the number of ways in which an n-sided polygon can be triangulated is equal to
(n − 2)th Catalan number. (Hint: Use recurrence relation in the previous problem)
Maths for Computing
Tutorial 8
Solution 1:
The LHS is simply counting the number of permutations of [n]. The RHS is counting the
permutations with respect to the number of fixed-points. How many permutations are there that

(i)
n
have i fixed points? We can first select the fixed points in ways and then the rest of the n − i

elements can be permuted in such a way that no element stays at the original position which can be

(i)
n
done in D(n − i ) ways. So the number of permutations with exactly i fixed points is D(n − i ).

The RHS is simply summing this value over all possible is.

Solution 2:
We can apply PIE here. Number of permutations of [n] with no (i, i + 1) in it = n! − Number of
permutations of [n] with at least one (i, i + 1) for some i ∈ [n − 1].

Let Ai = Set of permutations with (i, i + 1) present in them. Then, the number of permutations of
[n] with at least one (i, i + 1) for some i ∈ [n − 1] = | A1 ∪ A2 ∪ … ∪ An−1 | =
n−1
(−1) j−1
∑ ∑
| Ai1 ∩ Ai2 ∩ … ∩ Aij | .
j=1 1≤i1<i 2 <…<ij ≤n−1

(j)
n

Now, | Ai1 ∩ Ai2 ∩ … ∩ Aij | = (n − j )!. Using this we can say that the
1≤i1<i 2 <…<ij ≤n−1

(j)
n−1
n
(−1) j−1

number of permutations of [n] with no (i, i + 1) in it = n! − (n − j )!, which if
j=1

you simplify further will give D(n) + D(n − 1).

Solution 3:
The problem is similar to putting 100 identical balls in 10 distinct boxes such that every box gets at
least 5 balls. So we can first distribute 5 balls to each of the 10 boxes, and then distribute the rest of
59!
50 balls to 10 boxes in different ways without any restriction.
50!9!

Solution 4:
We will prove that both sides are counting the same thing. The LHS is, of course, the number of
different partitions of [n + 1]. The right side counts the same thing with respect to the placement of
some element, say x, of [n + 1].

x must be in some subset of the partition. This subset can contain n − i other elements, where

(n − i) ( i )
n n
0 ≤ i ≤ n. These n − i elements can be chosen in = ways, and the rest of the i

elements can be partitioned in B(i ) ways.

Solution 5:
Upper Bound: Let B(n) denote the number of all set partitions of [n]. We just proved that

∑(i)
n
n
B(n + 1) = B(i ). We will use this to prove that B(n) < n!, for n ≥ 3, using strong
i=0
induction.

Basis Step: B(3) = 5 < 3! (Notice that B(i ) = i!, for i ∈ {0,1,2})
Inductive Step: Assuming B(k) < k! for k ≥ 3 and B(k) = k! for k ∈ {0,1,2}, we will prove that
B(k + 1) < (k + 1)! for k ≥ 4.

∑(i)
k
k
B(k + 1) = B(i )
i=0

∑(i)
k
k
< i!
i=0
k
1
∑ i!
< k!
i=0
< k!(k + 1)
< (k + 1)!

Now, S(2n, n) < B(2n) < (2n)!, for n ≥ 2.

Lower Bound: Form a partition of 2n into n non-empty subsets by pairing every element of
{1,2,…, n} with an element from {n + 1,n + 2,…,2n}. This can be done in n! ways. Clearly, there
are more partitions of [2n] into n non-empty subsets, for n ≥ 2, such as partitions where some
subsets are not of size 2. Hence, n! < S(2n, n).

Solution 6:
Consider the Ferrer diagram of a partition of n into at most k parts. This diagram must have at most
k rows. Add k squares to this Ferrer diagram in the following manner. Add one square to every row,
and if there are less than k rows, create new rows of just one square. Clearing, the resulting Ferrer
diagram represents a partition of n + k into exactly k parts. It’s easy to show now that these
modifications are bijective in nature.

Solution 7:
We first prove that q(n) = p(n) − p(n − 1) is the number of partitions of n in which each part is at
least two. First rearrange the equation a bit to q(n) + p(n − 1) = p(n).
If we can show a bijection from the set of partitions of n in which each part is at least two + the set
of partitions of n − 1 to the set of partitions of n, we would be done. The bijection is simple. Map a
partition from the set of partitions of n in which each part is at least two to itself and map a
partition x from the set of partitions of n − 1 to a partition (x,1). I am leaving the proof of why it is
a bijection to you as it is very simple.

Now take a partition of n in which each part is at least two. Clearly, in the Ferrer diagram of such a
partition, its first two columns contain the name number of squares. If we take its conjugate, the top
two rows will contain the same number of cells. Hence, it corresponds to a partition whose two
largest parts are equal. We have already seen that conjugates are bijective in nature. Hence,
p(n) − p(n − 1) is equal to the number of partitions of n in which the two largest parts are equal.

Solution 8:
Let Y be the set of all partitions of n into 3 parts. The problem is asking to prove that | Y | = | X | .

We can do this by giving a bijection f between Y and X,


f ((x1, x 2, x3)) = (n − x3, n − x 2, n − x1)

Now, we prove three things:


f ’s range is X:
For any partition of n, say (x1, x 2, x3), (n − x3, n − x 2, n − x1) will be a 3 length partition of 2n,
where every element of the partition is at most n − 1 because
(i) n − x3 + n − x 2 + n − x1 = 3n − (x1 + x 2 + x3) = 2n,
(ii) n − x3 ≥ n − x 2 ≥ n − x1 as x1 ≥ x 2 ≥ x3, and
(iii) n − xi ≤ n − 1 because xi ≥ 1.

f is one to one:
Let (x1, x 2, x3) and (y1, y2, y3) be two distinct 3 length partitions of n. Then, for some i xi ≠ yi.
Therefore, (n − x3, n − x 2, n − x1) ≠ (n − y3, n − y2, n − y1) as for the same i, n − xi ≠ n − yi.

f is onto:
Let (w1, w2, w3) be some 3 length partition of 2n, where each part is at most n − 1. Then,
f ((x1, x 2, x3)) = (w1, w2, w3), for (x1, x 2, x3) = (n − w3, n − w2, n − w1).
(x1, x 2, x3) ∈ X because
(i) n − w3 + n − w2 + n − w1 = 3n − (w1 + w2 + w3) = 3n − 2n = n
(ii) x1 ≤ x 2 ≤ x3 as w1 ≤ w2 ≤ w3 ⟹ −w1 ≥ − w2 ≥ − w3 ⟹ n − w1 ≥ n − w2 ≥ n − w3
(iii) xi ≥ 1 as wj ≤ n − 1

Solution 9:
n


In Cn = Ci−1Cn−i, LHS is counting the number of north-east lattice paths which do not go below
i=1
the diagonal. Let us call north-east lattice paths which do not go below the diagonal as “good”
paths. Now, every “good” path will touch the diagonal at some point of time. In RHS, we are
counting the number of good paths by summing the number of “good” paths that are touching the
diagonal first time at (i, i ), i.e., Ci−1 . Cn−i, where i will range from 1 to n. For a visual explanation
(with an extremely energetic BGM) see this, https://www.youtube.com/watch?v=__w_MDQeUYc.

Solution 10:
Let Pn = the number of ways we can triangulate an n-sided polygon. It is easy to see that
P3 = C1 = 1, P4 = C2 = 2, and P5 = C3 = 5. For n ≥ 6, we can show that
n−2


Pn = Ci−1Cn−i = Cn−2. A visual proof can be accessed here https://youtu.be/LwqxXLwoenE?
i=1
t=215 (this one has a mild BGM though.) You can convert the visual proof in proof by induction as
well.

You might also like