Exercise · ZW-INTEGER-COMPOSITION-001 · ★☆☆ Basic

How many compositions of n=3 exist in total?

Choose one option.

Show answer
  • A. 4

Explanation

There are 2^(3-1)=4 compositions: 3, 1+2, 2+1 and 1+1+1. The option of 3 counts only the parts without order, and the option of 8 ignores that n-1 is the exponent.

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-002 →