0
$\begingroup$

In an Icecream store there are $10$ different flavors. In how many ways we can choose an icecream of $5$ flavors such that there is no flavor shows more than two times?

  • 0
    is it like one icecream can have 1 or 2 or .. 10 flavors?2017-02-07

4 Answers 4

1

Let's start with how many ways overall to pick 5 flavors from 10 (where flavors can repeat themselves)

Using the stars and bars method we come up with a total of $2002$ ways to choose.

Now instead of trying to figure out how many ways you can pick where just one flavor repeats twice, let us use the complement rule and figure out how many ways we can pick where a particular flavor repeats 3, 4, and 5 times.

Starting with 3:

$$10 * {9+2-1 \choose 2} = 450$$

Now 4:

$$10 * {9+1-1 \choose 1} = 90$$

And for when all the flavors are the same, there are only $10$ ways that can happen.

Now for the final answer, just subtract:

$$2002 - 450 - 90 - 10 = 1452$$

There are $1452$ ways to choose an ice cream of 5 flavors where no flavor appears more than twice.

0

coefficient of $x^5$ in $$ (1 + x + x^2)^{10}$$ gives the desired number of ways.

where 1 is for not choosing the particular flavor x is for choosing the flavor once and $x^2$ for choosing the flavor twice.

$$ (1 + x + x^2)^{10} = [(1-x^3 )/(1-x)]^{10}$$

expanding by binomial we get

$$ {(10\choose0}(-x^3)^0+{10\choose0}(-x^3)^1 \underbrace{+.........}_{terms having power of x greater than 5})*1/(1-x)^{10}$$

and we have.

$$\dfrac{1}{(1-x)^{10}} = \sum_{i=0}^{\infty} \binom{10 + i - 1}{i} x^{i}$$

Now we need to add the coefficient of x^5 and x^2 from the above series wwhich gives $ -{14 \choose 5} + 10*{11 \choose 2} $

which turns out t be 1452 the same as waveX's answer :P

  • 0
    and how to calculate that?2017-02-07
  • 0
    If you see closely the series inside the brackets is a Geometric progression. $ 1+x+ x^2 = x^3 - 1 $ expand the same using bionomial and coefficient can then be found. Can you take it from here? @z00x2017-02-07
0

We divide the counting in three disjoint cases.

1) All the flavours are distinct: $\binom{10}{5}=252$.

2) Precisely one flavour shows two times: $10\cdot\binom{9}{3}=840$.

3) Precisely two distinct flavours show two times: $\binom{10}{2}\cdot 8$=360.

The total number is $252+840+360=1452$.

0

An ice cream with 5 different flavours.

So we can choose any 5 ditinct flavours out of 10 for an ice cream in -

$$\binom{10}{5}$$ ways.

One flavour two times -

$$10 \cdot \binom{9}{3}$$ ways.

Two distinct flavours show two times -

$$\binom{10}{2} \cdot 8$$ ways.

Total number of ways = $$\binom{10}{5} + 10 \cdot \binom{9}{3} + \binom{10}{2} \cdot 8$$