posted by John on .
Killer robots are trying to take over the world. They know the password to the doomsday weapon is 5 digits long and contains either 0 or 1, and either 2 or 3, and either 4 or 5, and either 6 or 7, and either 8 or 9. If the robots can enter 5 passwords per second, how long (in seconds) will it take them to go through all the possible passwords?
I will assume the "password" may start with a 0
So let's first of all choose the number of passwords
which would be C(2,1) x C(2,1) x C(2,1) x C(2,1) x C(2,1)
= 2^5 = 32
13578 would be in that choice, but not 31578
So we now have to "arrange" each of these 32 numbers
which would give us 32 x 5! = 3840
at a rate of 5 passwords per second it would take
3840/5 or 768 seconds to crack it