[Math] How many ways can you build a football/soccer team

combinatorics

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?

Best Answer

It turns out there is a simple rephrasing of the problem that makes it easy to count. Rather than write down a list of numbers like (3,5,2) that add to 10, you can write down 10 objects, and place dividers that separate the 10 objects into groups:

* * *|* * * * *|* *

Exercise: convince yourself of the following:

  • given any list of numbers that add to 10, you can draw a corresponding diagram like the above
  • given any diagram like the above, you can find a corresponding list of numbers that add to 10
  • If you have a list of numbers, convert it to a diagram then back to a list, you get your original list
  • If you have a diagram, convert it to a list, then back to a diagram, you get the original diagram

There is an easy way to count how many diagrams can be drawn: there are 9 places where we can put a divider, and for each place, we have a choice to put a divider there or not. Therefore, there are $2^9 = 512$ possible choices.

This sort of diagram is called "stars and bars", and there are a number of kinds of problems that can be solved by finding a way to convert back and forth between the problem you want to solve and diagrams like the one above.


If you want to count specifically the number of lists that have a given number of entries, we can do something similar. e.g. if we want there to be exactly three positions (each with at least one person), then we want to count the number of ways to insert two dividers into a list of 10 objects.

Again, convince yourself that you can translate back and forth between lists and diagrams. It can be tricky to get these arguments exactly right sometimes.

If we want there to be $k$ positions, then we want to place $k-1$ dividers into the 9 possible places, and thus there are $\binom{9}{k-1}$ choices.

If you haven't seen binomial coefficients (a.k.a. combinations) before, this is equal to

$$ \binom{n}{r} = \frac{n!}{r! (n-r)!} $$

where $s!$ means the factorial of $s$: that is,

$$ s! = 1 \cdot 2 \cdot \ldots \cdot s $$

(and $0! = 1$)