# Number of ways of selecting teams in a competition

We have $25$ countries and $100$ teams. Teams can have variable sizes. Each team consists of a combination of players from different countries. Now we have to select $13$ teams in total subjected to following condition:

• If $i^{th}$ team is selected which has a player from $j^{th}$ country, then no teams having players of $j^{th}$ country can be selected.
• If say for example ,$3^{rd}$ team is selected with $2$ players $(P_0, P_1)$ in country $1$ and $1$ player in country $2$. So in one selection I can take $P_0$ and in other $P_1$ leading to 2 ways.

$T[i][j]$ represents the number of players of country $j$ in Team $i$.

For example

• $T[3][1] = 2$ means $3^{rd}$ team has $2$ players from country $1$.
• $T[1][2] = 7$ means $1^{st}$ team has $7$ players from country $2$.

We are given the matrix $T$. In how many ways can we select $13$ teams?

If question is not clear, it is basically the number of ways of selecting $13$ rows in a $25X100$ matrix such that the resulting $13X100$ matrix has columns with all values $0$ except at 1 place.

• How are the values in $T$ relevant? Isn't all that's relevant whether they're non-zero? – joriki May 8 '16 at 13:17
• Lets say if I select team $3$ with $2$ players $(P_0, P_1)$ in country $1$ and $1$ player in country $2$. So in one selection I can take $P_0$ and in other $P_1$ leading to 2 ways. I will add it in the EDIT history. – maverick May 8 '16 at 13:33
• The question has now become very unclear. You should differentiate clearly between a "team" in the sense of the $100$ pre-existing teams with given numbers of players and what you are now also calling a "team" but should be referred to by a different term (e.g. "selection"), which apparently has at most one player from any given country. – joriki May 8 '16 at 14:26