Exercise · ZW-INTEGER-COMPOSITION-010 · ★★★ Advanced

Give a counterexample showing that the number of compositions of n into k parts does not always match the number of partitions of n into k parts. For which n and k do they differ?

Choose one option.

Show answer
  • D. n=4, k=2: compositions 3, partitions 2

Explanation

For \(n=4\) and \(k=2\) the compositions are 1+3, 2+2 and 3+1 (3 cases), but the partitions are only 1+3 and 2+2 (2 cases), since 1+3 and 3+1 count once. The one with \(n=3\), \(k=3\) gives 3 compositions when only 1+1+1 exists, and the one with \(n=4\), \(k=1\) shows no difference at all.

Study Enumerative combinatorics in ZWMath →

Review the concept: Integer composition

A composition of a positive integer n is a way of writing it as an ordered sum of positive integers, where the order of the summands matters.

\[\binom{n-1}{k-1}\]

More practice problems: integer composition

← ZW-INTEGER-COMPOSITION-009