Bike Thief

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:


The answer is 18.0.

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.

1 solution

Anandhu Raj
Feb 4, 2015

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 = 36 × 0.5 36\times{0.5} =18 s

You actually count the original combination 4 times, instead of just once.

Hence, the total number of cases to try is 36 and thus the answer is 18.

I have updated the answer to 18.

Calvin Lin Staff - 6 years, 4 months ago

Log in to reply

Oops!! didn't notice that.. :(

Anandhu Raj - 6 years, 4 months ago

Log in to reply

No worries. Can you update your solution accordingly? Thanks!

Calvin Lin Staff - 6 years, 4 months ago

Log in to reply

@Calvin Lin Updated. :)

Anandhu Raj - 6 years, 4 months ago

Log in to reply

@Anandhu Raj Perfecto!

Calvin Lin Staff - 6 years, 4 months ago

Log in to reply

@Calvin Lin Gracias :)

Anandhu Raj - 6 years, 4 months ago

Lets say that the thief tried the first digit, and it was really correct already. Wouldn't the thief also need to rotate another time in order to switch it back the the original number before continuing to the next digit?

Digi Verse - 6 years, 4 months ago

Log in to reply

Technically yes, it will need to switch 2 digits. However, the question states "try 1 new combination every 0.5 seconds", which is independent of the number of digits that need to be switched.

Calvin Lin Staff - 6 years, 4 months ago

I probably should've written it so pulling times and switching times were included, but instead I assumed that trying a new combination would take about the same time for each combo.

Sorry for the confusion.

Brock Brown - 6 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...