The maximum time it will take to open a combination lock

combinatorics

You have a barrel lock with $4$ wheels, each of which has $6$ numbers. If you can try one combination every three seconds, what is the maximum time (in hours, minutes, and seconds) it will take you to open the lock?

If there are $6$ numbers on each wheel, it's $6 \times 6 \times 6 \times 6 = 1296$ for the number of possibilities, right? I don't really know. But then if that is right how would I translate into minutes and seconds etcetera.

Best Answer

Since there are six choices for each of the four wheels, there are indeed $6^4 = 1296$ possible combinations to try. Since each combination takes $3$ seconds to try, trying all the combinations takes $3 \cdot 1296 = 3888$ seconds, as you found.

There are $60$ seconds in a minute and $60^2 = 3600$ seconds in an hour. To determine the number of hours, minutes, and seconds, use division with remainder. First, we find the number of complete hours and the number of additional seconds. $$3888~\text{s} = 3600~\text{s} + 288~\text{s} = 1~\text{h} + 288~\text{s} \tag{1}$$ Next, we find the number of minutes and additional seconds in $288~\text{s}$.
$$288~\text{s} = 4 \cdot 60~\text{s} + 48~\text{s} = 4~\text{m} + 48~\text{s} \tag{2}$$ Substituting our result from equation 2 into equation 1 yields $$3888~\text{s} = 1~\text{h} + 4~\text{m} + 48~\text{s}$$

Related Question