In my experience, if it is difficult to calculate a probability, it is sometimes easier to calculate the inverse.
So how many 10 digit strings do not contain consecutive 0s?
We can ignore the first digit since one digit in of itself will have no impact on the probability.
From there, the probability that a single digit does not cause that string to contain consecutive 0s is inverse of the the probability that both the previous and the current digits are 0.
So if we were solving for 2 digit strings, the probability would simply be the inverse of the probability of having 0 digit followed by another 0 digit, or $1 - (\frac{1}{10\times10})$.
If we were to then apply this to a 3 digit string, the probability would be compounded with the inverse of the probability of the last digits having 0. This simply means to find the probability of not finding 0s in the first two digits and not finding 0s in the second two digits. This also covers the case of both finding digits in the first 2 digits as well as finding digits in the last 2 digits.
The probability of the first two digits not both having 0 is $1 - (\frac{1}{10\times10})$, and the probability of the last two digits not both having 0 is $1 - (\frac{1}{10\times10})$. Compounded, you would get $$1 - \frac{1}{\frac{1}{1 - (\frac{1}{10\times10})}\times\frac{1}{1 - (\frac{1}{10\times10})}}$$ Simplying a bit, we get:
$$1 - (1 -\frac{1}{10\times10})^{2}$$
Why the 2? Because we have 3 digits and 2 pairs of digits to consider. Generalizing, we would have:
$$1 - (1 - \frac{1}{10\times10})^{n-1}$$
Where $n$ is the number of digits. Take this probability and multiply times $10^n$ or in this case $10^{10}$ (total number of possible combinations) and you get the number of digits containing consecutive zeros.
It would seem that you're making the mistake of assuming the pattern is linear. When you're finding all configurations of non-0 digits in the case in which m is 1, there should be just as many configurations of 0 digits in the case in which m is 9. So:
$$xxxxxxxxx0,0xxxxxxxxx$$
If your linear calculation were accurate, then there should be 10000000000 ways to place that singular 0 digit! Hope that helps!
You can have a committee with
- No freshmen
- No sophomores
- No juniors
- No seniors
- Neither freshmen nor sophomores
- Neither freshmen nor juniors
- Neither freshmen nor seniors
- Neither sophomores nor juniors
- At least one from each class
But as for all of the others, they're impossible with the composition of the council.
So the full answer would be:
$$N = {16 \choose 8} - {13 \choose 8} - 2{12 \choose 8} - {11 \choose 8} + 2{9 \choose 8} + 2{8 \choose 8}.$$
Best Answer
You are right that one way to solve this problem is with the principle of inclusion and exclusion.
For the "at least 3 consecutive digits" case, note that there are 8 possible sets of 3 consecutive digits. These digits can be at the right of the pin (like X234) or at the left (234X), where X can be any digit. This gives $8 \cdot 2 \cdot 10 = 160$ pins. However, we have now counted pins with 4 consecutive digits 2 times: for example, 1234 is counted as 123X and X234. Thus we subtract the number of these pins which is 7 to get $153$ pins with at least 3 consecutive digits.
You can extend this method to the second part too. Add all pins with 2 known consecutive digits, subtract some with 3 known consecutive digits, add some with 4 consecutive digits, where "some" is chosen such that each of those categories is counted exactly once.