This is a supplemental problem to the CryptoMath problem. If you solve the problem methodically or randomly matters for expected solution time. This calculates the difference in techniques. My reference solution has some commented out graphics code to visualize the timing differences.
---
If you have N possible combinations to a lock you can calculate the likelihood of opening the lock as a percentage given X attempts.
There are two ways to figure out the combination to try:
Choosing a random combination is very fast and easy. No record keeping needed. Choosing a methodical way of trying them all is a little slower on each attempt, and incurs a fix cost before the first attempt is made.
If you have:
Which technique should you use to get to your goal chance fastest?
--- Note for the curious: The really short solution is gaming the system and just choosing randomly. Eventually one of the solutions will guess right on all the test suite.
bah, my lack of knowledge of probability fails me again
A very interesting probability problem applicable across a lot of areas underlies the solution. It isn't obvious at first glance. The solution is fairly short, but it takes a lot of thought to get it. I can't wait to see the length 14 solution!
ironic solution ftw!
I should have known! :) Next problem is, how many times can you expect to submit that solution! :)
OK. You've gamed the solution. The author shouldn't have to beef up the test suite to prevent this sort of solution.
6587 Solvers
143 Solvers
Find the largest value in the 3D matrix
1078 Solvers
Calculate the Hamming distance between two strings
197 Solvers
2388 Solvers