×

# Counting problem with a few restrictions (combinatorics)

Let's take Keno for example:

From number 1 to 80, there are $$\dbinom{80}{20} = 3,535,316,142,212,174,320$$ ways the casino can draw 20 numbers out of 80.

Given that the sum of the 20 numbers drawn is $$n$$, how many combinations satisfy the following conditions:

• $$x_1+x_2\ldots+x_{20} = n$$
• $$x_1,x_2,\ldots,x_{20}$$ are distinct
• $$1 \leq x_i \leq 80$$

Eg. If $$n = 210$$, which is the minimum sum, $$1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20 = 210$$, therefore there is only one possible combination for the sum of 20 numbers to be 210.

What about, say, $$n = 896$$? I have tried stars and bars but not really sure how to apply the distinct restriction.

Note by Lim Sy
1 week, 1 day ago

Sort by:

Comment deleted 3 days ago

edited, sorry sometimes even i get confused by my own question

- 5 days ago