
Background
My dad recently came to me with an interesting proposition - cracking a combination lock where the first and last numbers are (probably) known. He has a lock where the first and last digits are 6 and 4, respectively, but is looking to determine the middle two digits and hopefully crack the overall combination.
My first thought was to simply generate all the possibilities of numbers - a relatively trivial task, easy but long. This, however, wouldn’t have any sort of predictive aspect at all - when randomly generated, the probability of a 6004 would be the same as a 6474.









