SOLUTION: How many different 5-digit PINs contain the sequence 12 (order matters)
12000 counts
12121 counts
13332 doesn't count
Algebra.Com
Question 1105054: How many different 5-digit PINs contain the sequence 12 (order matters)
12000 counts
12121 counts
13332 doesn't count
Answer by math_helper(2461) (Show Source): You can put this solution on YOUR website!
There are 4 patterns to worry about:
12xxx —>
x12xx —>
xx12x —> <<< minus 10 for the 1212x pattern already counted
xxx12 —> <<< minus 20 for 12x12, x1212, both already counted
——
That's = 3970
——
Check using a Perl one-liner:
perl -e 'for ($i=0, $s=0; $i<100000; $i++) { if ($i =~ /12/) { $s++; } }; print "$s\n";'
3970
RELATED QUESTIONS
DNA (deoxyribonucleic acid) is the basis of most genes. DNA is made of nucleotides. Each... (answered by jim_thompson5910)
``An octapeptide is known to contain four of one amino acid, two of another and two of... (answered by ikleyn)
Provide both a symbolic and a numerical answer
How many ways are there to take 4 things... (answered by stanbon)
In a lottery daily game, a player picks three numbers from 0 to 9. How many different... (answered by ikleyn)
Suppose an exam has 34 questions on it and students need to answer 22 of the questions.... (answered by stanbon)
How many 7 digit phone numbers are possible if order... (answered by stanbon)
How many different ways can 4 aces be dealt to one person, order... (answered by stanbon)
An ATM PIN consists of four digit chosen from 0-9, and repetition of a digit is allowed.... (answered by richard1234)
In a chess match, a win counts 1 point, a draw counts 1/2 point, and a loss counts 0... (answered by Theo,MathTherapy)