[Math] Probablity a randomised four digit number does not have two specific consecutive numbers

combinatoricsprobability

I am trying to work out the probability a four digit number does not have two consecutive numbers, for example two consecutive 5's, not starting with a 0 is assumed.

Now I could work out how many numbers in this range contain two consecutive numbers manually, but that seems like a terrible method and impractical if I get it on an exam.

My attempt:

$9×10^3=$ total ways to arrange a four-digit number

$10^2=$ ways to arrange a four-digit number starting with two consecutive numbers(55) (e.g. 5545)

$2=$ ways to arrange two consecutive numbers along the last 3 digits.

$9*10*2=$ ways to arrange a four-digit number with two consecutive 5's placed in the last three digits (e.g. 6550, 6155)

$$(9*10^3) – (10^2) – (9*10*2)$$
$$=8720$$
So I have a probability of $$8720/9000$$ or $$.96888\text{%}$$

Is this correct or have I made mistakes?

Best Answer

You say you have $9000$ four-digit numbers.

To count numbers with no consecutive repeat digits is quite easy: you say you have $9$ choices for the first digit; given the first you have $10-1=9$ choices for the second; given the second you have $9$ choices for the third; given the third you have $9$ choices for the fourth.

$$\dfrac{9^4}{9 \times 10^3} = 0.729$$ so if this is what you were trying to do then you have made a mistake.


(Added) If alternatively you are looking for the numbers which do not have any consecutive $5$s, the easiest way to count is to look at those which do, as you attempted.

There are three possible patterns of the forms 55AA, B55A or CD55 where A is any digit , B is any digit except $0$ or $5$, C is any digit except $0$, and D is any digit except $5$. So there are $10\times 10 + 8 \times 10 + 9\times 9 = 261$ four-digit numbers which have consecutive $5$s and so $9000-261 = 8739$ which do not.

$$\dfrac{8739}{9000} = 0.971$$ so again you have an error, but much closer this time. You might try to spot how you have over counted the second two patterns