<s>[INST] How many ways can you build a football/soccer team? I'm reading a book on the history of soccer. There are several ways to position a team, for example, four defenders, four midfielders and two forwards is the common 4-4-2. How many ways can you build a team, given that there are 10 players that move because the keeper is always in the same position?
I made some schemes:
10
1-9
1-1-8
1-1-1-7
1-1-1-1-6
1-1-1-1-1-5
1-1-1-1-1-1-4
1-1 1-1-1-1-1-3
1-1-1-1-1-1-1-1-2
1-1-1-1-1-1-1-1-1-1

1-2-7
1-2-1-6
1-2-1-1-5
1-2-1-1-1-4
1-2-1-1-1-1-3
1-2-1-1-1-1-1-2
1-21-1-1-1-1-1-1

1-3-6
1-3-1-5

Then I thought of another scheme, one that would group all possible combinations of diagrams from the number of lines that are willing players on the court.
L1 10
L2 1-9,9-1,2-8,8-2,3-7,7-3,6-4,4-6,5-5
L3 

1-1-8,1-8-1,8-1-1,1-2-7,1-7-2, 2-7-1,2-1-7,7-2-1, 7-1-2,1-3-6,1-6-3 .....
I can not find the formula to translate this, if it is correct.
In looking for an answer I found this site. Could you guide me to a book or article to solve my problem?
 [/INST] You are looking for the number of compositions of 10, this is $2^{10 - 1} = 512$.
The proof of this fact is similar to stars-and-bars: To divide $n$ into $k$ nonempty pieces is to lay down $n$ stars, and place separators (bars) in $k - 1$ of the $n - 1$ positions between stars, i.e, $\binom{n - 1}{k - 1}$ ways. Adding over all possible numbers of divisions is:
$$
\sum_{1 \le k \le n} \binom{n - 1}{k - 1}
  = \sum_{0 \le k \le n - 1} \binom{n - 1}{k}
  = 2^{n - 1}
$$
</s>