[SOLVED] finding the possible PIN codes

• May 16th 2009, 11:24 PM
taipei166
[SOLVED] finding the possible PIN codes
In a bank, it doesn't issue the PIN code with more than 2 consecutive digits the same.(For example, 7666 and 2222 are not allow but 0040 is allowed)
i)how many different PIN codes are possible?
ii)how many different PIN codes have 8 as their first digits?
I don't really know how to solve this question, is there a easy way to solve it? can anyone helped me?Thank you very much!!(Nod)
• May 17th 2009, 01:06 PM
awkward
Quote:

Originally Posted by taipei166
In a bank, it doesn't issue the PIN code with more than 2 consecutive digits the same.(For example, 7666 and 2222 are not allow but 0040 is allowed)
i)how many different PIN codes are possible?
ii)how many different PIN codes have 8 as their first digits?
I don't really know how to solve this question, is there a easy way to solve it? can anyone helped me?Thank you very much!!(Nod)

Hi taipei,

i) If there were no restrictions, the number of possible PIN codes would be $10^4$.

The invalid codes come in 3 forms.

Codes like xxxy: There are 10 ways to choose x and then there are 9 ways to choose y, so there are $10 \times 9$ possibilities.

Codes like yxxx: Similarly, there are $10 \times 9$ possibilities.

Codes like xxxx: There are 10 of these.

So the number of allowable codes is $10^4 - 2 \times 10 \times 9 - 10$.

Maybe you can work out ii) from this.
• May 18th 2009, 02:30 PM
taipei166