How do I approach this combinatorics problem about composition?

719 Views Asked by At

The question is from Bogart's

A composition of the integer k into n parts is a list of n positive integers that add to k. How many compositions are there of an integer k into n parts.

To begin, does the integer k itself qualify as a composition? i.e., if we look at 5, then one answer is 5... then 1 & 4, 2 & 3, etc.?

1

There are 1 best solutions below

0
On BEST ANSWER

Here's a hint to get you started. Write a list of $k$ $1$s with a space between each term. Using only two symbols, a comma and a plus sign, count the number of ways to distribute these two symbols among the $k-1$ spaces.