How many decimal strings of length 55 contain exactly ten 7s?

178 Views Asked by At

Some more questions, I believe I have them right but I have no way to check my answers.

  1. How many decimal strings of length 55 contain exactly ten 7s?

The way I think this one is answered is by filling in the 10 spots that have to be 7 first. That gives you 45 spots for 8 possible numbers... so the answer is simply $8^{45}$?

  1. How many ways are there to pick a dozen donuts from 5 types?

    $5^{12}$

(Sorry I'm on my phone or I would use latex or whatever)

2

There are 2 best solutions below

0
On

$$\binom {55}{10}9^{55-10}\text{ and }\binom{5+12-1}{12-1}$$ Choose 10 positions for sevens, fill them, choose the remaining numbers, for the last use stars and bars.

0
On

Suppose all the 7s are the 10 firsts numbers of our string. So we still have 45 "bits" that we can fill with numbers in the set $\{1,..,6,8,9\}$ which has 8 elements. So, we can put each number of this set in each bit of our string. This gives to us $8^{45}$ possible strings. BUT, remember we fixed the positions of the 7s. How many positions we can chose to the ten 7s? Well, $ 55 \choose 10$. So the answer should be ${55}\choose{10}$$8^{45}$.

Now, for the second question we can translate it in another language. Let $x_i$ be the number of donuts of type $i$ we have chose. So, the quantities $x_i$'s must satisfy $$ x_1 + ... + x_5 = 12$$

But, you can make your choice in many ways. You can decide to don't to chose the donut of type 1, in this case you have $x_1 = 0$

This link http://en.wikipedia.org/wiki/Stars_and_bars_%28combinatorics%29 can help you how to get the answer $ {5+12-1} \choose {12-1}$