Most people who ride their bicycles use a particular kind of lock. This lock has four switches which can be changed to any number 0 through 9.
A bike thief notices that most people who use this lock only change one of the switches on the lock when they lock it, for example someone whose bike lock key is 4242 might be switched to 4272 or 9242 when they lock it.
The thief can try 1 new combination every 0.5 seconds. We'll assume this is because the thief has to change the switch and pull on the lock for a moment in order to try it.
He doesn't need to try the combination it was locked as; he knows it's already locked in the initial state.
What is the maximum amount of seconds the bike thief needs in order to crack the lock?
This is what the lock looks like:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
He could rotate the first swich 10 times, then second switch 10 times, then third switch 10 times and fourth switch 10 times.
So total possible cases = 10+10+10+10=40
But here we had counted the original combination four times,
Therefore total cases= 40-4=36
Time taken = 3 6 × 0 . 5 =18 s