(image credit) |
So it's easy enough to see which digits the code probably comprises of, and assuming that each digit is used once, we can readily calculate the number of possible codes: 4! (i.e., 4 factorial) = 4 x 3 x 2 x 1 = 24. Then we enter each possible combination of these four digits, systematically, until the entrance door unlocks.
I have a padlock like this, and I lost the combination. I was using it frequently on one stretch, then I didn't need it for a long time. In this case, there is also a foolproof heuristic, or what I call an algorithm, for figuring out the combination:
Common sense, plus a little mathematics, and you can enter the building without difficulty. Of course this keyboard poses a security risk, so it should have been replaced long before the four digits were rubbed off. It should have been replaced with a more modern coding system, as this one is old technology. In any case, how much common sense and numbers knowledge any visitor may have is a question mark.
Let's take this a little further, shall we. It's possible the code is more than four digits, so at least one digit is used more than once. For example, it could a five-digit code with `0 used twice. It could also be a six-digit code, with `0 and `7 used twice. It's certainly possible that the code is eight digits long. Of course we may not know ahead of time how many digits the code comprises. Suffice it to say, If none of the 24 codes works, then it's a more complicated, but still quite manageable, situation to figure out.
(image credit) |
- Discern what solution parameters are. Standard locks like this in the US have three-number combinations. Note it's three numbers, not digits. Each number ranges from `0 to `39 (i.e., 40 numbers).
- Determine how the situation works. For these locks, you turn the knob at least two full rotations clockwise, then stop at the first number. From there, turn it counterclockwise fully, that is, past that first number, then stop at the second number. Finally, turn it clockwise again straight to the third number (no full rotation).
- Calculate the universe of solutions. Because numbers can be repeated among the three of them, the number of possible combinations = 40³ = 64,000.
- Implement each possible solution systematically. It'll obviously be a much bigger table than the entry code problem above.
At the end of the day, this little padlock affords you greater security or protection than the entry plate, by virtue of its more complicated algorithm. But let's get real: If you're intent on entering an apartment building even without the code, you can jimmy the lock directly or simply break down the door. Similarly, bolt cutters undo padlocks in a couple of seconds.
A year or two ago, someone posted a curious image: $1 million was stacked neatly inside a transparent casing. The challenge was, If you can access the money, you can have the money. The casing was made of high-tempered plastic or glass, so if you struck it repeatedly or even shot at it, it simply wouldn't break. Quite a few people suggested aggressive solutions like these. In fact there was a video or GIF of someone hammering at it and kicking it, to no apparent avail.
I suggested something different, a seemingly simpler algorithm: Figure out how the money was placed inside, to begin with, and reverse that process. There may be panels that came together, and where such panels are closed may be a chink in the armor. There may be hidden bolts or screws holding something together, which can be undone.
My point is that the same basic algorithm for the padlock can be applied: Conceptualize the solution vis-a-vis the problem, making sure you understand what you're dealing with. Then, once you've arrived at the right working solution, implement it systematically.
Thank you for reading, and let me know what you think!
Ron Villejo, PhD
No comments:
Post a Comment