retagged by
405 views
3 votes
3 votes
Let $n \in \mathbf{N}$ be a natural number, an ordered set of positive integers $(\lambda_{1}, \dots , \lambda_{k})$ such that $\lambda_{1} + \dots + \lambda_{k} = n$ is called a composition for $n \in \mathbf{N}.$ These integers are not necessarily distinct.
For example, The number $n = 3$ has the following $4$ compositions $(3), (2, 1),(1, 2),(1, 1, 1).$
The number of possible compositions for $n = 10$ is ________
retagged by

1 Answer

9 votes
9 votes

The number $n = 4$ has the following $8$ compositions $(4),(3, 1),(2, 2),(2, 1, 1),(1, 3),(1, 2, 1),(1, 1, 2),(1, 1, 1, 1).$
 
The equation $\lambda_{1} + \dots + \lambda_{k} = n$ has $^{(n-1)}\text{C}_{(n-k)}$ positive integral solutions.

$k$ can be $1$ Or $2$ Or $3$ Or $\dots n.$

So, total number of solutions OR total number of compositions for $n$ is :

$^{(n-1)}\text{C}_{0} + ^{(n-1)}\text{C}_{1} + ^{(n-1)}\text{C}_{2} + \dots + ^{(n-1)}\text{C}_{(n-1)}$  which is $2^{(n-1)}.$

So, for $n=10,$ the answer will be $512.$

https://www.goclasses.in/

$\textbf{Alternative Method :}$

Consider an array of $n$ ones. A composition of $n$ can be uniquely characterized by grouping the ones into blocks such that the fist block has $\lambda_{1}$ ones, the second block has $\lambda_{2}$ ones, and so on. To ”encode” such composition we can interlace $n - 1$ blank squares among the $n \;1\text{’s}.$



Each square can be either left empty or we can replace it by a plus sign. For instance for the composition $(2, 1, 1)$ of the number $4$ we have $11 + 1 + 1$ (ignoring the squares). At each square, we can either leave it blank or replace it by a plus sign. Clearly, there are $2^{(n-1)}$ ways to do this.

edited by
Answer:

Related questions

4 votes
4 votes
3 answers
1
5 votes
5 votes
3 answers
2