## Bike lock puzzle

I was wondering this when using my bike lock, a combination lock with four dials, each of which has ten digits (0-9) on it in numerical order.

Suppose a bicyclist decides that, from now on, after putting in his combination on this lock, he will only give the lock one twist to close it. So, he chooses between 1 and 4 adjacent dials, and rotates them any number of spaces (other than a multiple of 10, to avoid having the lock end this procedure in a closed position!)

Unbeknown to the bicyclist, a thief is following him. The thief knows that the bicyclist uses this procedure to secure his bike. Over a period of days, the thief notes each combination the lock ends up on. What's the fewest observations that the thief needs to make before she can deduce the combination with certainty? What's the fewest observations that she needs to make before she can reduce it to 10 possibilities? How can a shrewd (but stubborn) bicyclist maximize the number of observations necessary without repeating a combination?

This seems simple enough that I'm sure it's been solved before, but I don't know where to start on it.

-
Code breaking, or error correction on a noisy channel. Unless the lock has only 4 cylinders (the code has only four digits), it should be easy after three or four trials to obtain most of the code. The worst case will be if the cyclist locks it the same way, or in one of two or three ways, every time. Gerhard "Ask Me About System Design" Paseman, 2012.08.02 – Gerhard Paseman Aug 2 at 21:09
If the cyclist always leaves the lock showing 0000, the thief can only ever narrow down the set of possibilities to (4+3+2+1)*9 = 90 combinations. (4 choices of dial to rotate, 3 choices of pairs of adjacent dials, etc., and 9 possible non-identity rotations.) So the answer to your first two questions is $\infty$. – Trevor Wilson Aug 2 at 21:32
The third question seems more interesting because you are requiring that the cyclist never leaves the same number showing twice. (It's not clear how the story motivates this though, because leaving a different number showing can only hurt the cyclist by reducing the number of possibilities to less than 90.) Did you mean to put this restriction on the cyclist in all three questions? – Trevor Wilson Aug 2 at 21:34
The first two questions ask for the fewest possible pieces of information needed, so the cyclist's restriction is unnecessary for those questions. – unknown (google) Aug 2 at 21:45
Glad to know I'm not the only one who gives serious thought to the trade-off between security and laziness in scrambling my bike lock. In fact, I have arrived at a similar conclusion as others here have: if I always scramble to the same position, I get more security for same laziness than if I scramble same number of positions randomly. – Yoav Kallus Aug 2 at 22:54