Verification of my answer for a partition problem

79 Views Asked by At

This problem is from Yufei Zhao's Olympiad Combinatorics note called Bijections. Link : http://yufeizhao.com/olympiad/bijections.pdf

Problem reads:

Let $n$ be a positive integer. In how many ways can one write a sum of at least two positive integers that add up to $n$? Consider the same set of integers written in a different order as being different. (For example, there are $3$ ways to express $3$ as $3 = 1 + 1 + 1 = 2 + 1 = 1 + 2.$)

I came up with an answer by considering a lines and spaces analogy. There are $n$ line segments oriented vertically and parallel to each other with a constant space between them.

Each of those lines correspond to a $1$. If we divide the lines into say $2$ parts, number of lines in each part sum to a particular number and the total sum is obviously $n$. This forms a bijection between partition of $n$ into two parts and dividing the lines into $2$ parts. Total number of ways of dividing the lines into two parts is $C(n - 1, 1)$ and so is the number of $2$-numbered partitions of $n$. Extending this to $3, 4, ...$ partitions, we come up with:

$C(n - 1, 1)+C(n - 1, 2)+C(n - 1, 3)+...+C(n - 1, n-1)$

This also includes all of the permutations of the numbers since each way of choosing spaces (to partition) is unique.

Is my answer correct? Is there a more "elegant" approach?

1

There are 1 best solutions below

3
On BEST ANSWER

Your answer is correct, but the "elegant" approach is to have a row of $n$ objects where between any adjacent pair of objects we may place a separator. All possible sums of positive integers that add up to $n$ can then be read off from the partition thus generated, e.g. $OO|OOO|O=2+3+1$. We have $n-1$ places in which we may insert a separator or not, and we cannot place $0$ separators, so the answer is $2^{n-1}-1$.