P11601 The Faulty Combination Lock link reply
A combination lock with three dials, each numbered 1 through 8, is defective in that you only need to get two of the numbers right to open the lock. What is the minimum number of (three-number) combinations you need to try in order to be sure of opening the lock?
P11632 link reply
Each number with different digits produces 3 different pairs, so naively you'd need at least ceil(64/3) = 22 combinations to ensure you can open.
With some bruteforcing, I get the following 24 numbers that produce all possible 64 pairs of numbers:
121, 134, 156, 178, 232, 245, 267, 351, 363, 387, 428, 461, 473, 572, 583, 654, 682, 474, 575, 676, 717, 814, 856, 818

So answer is between 22 and 24, although it can't be 22 because eventually you'll get repeated pairs.
P11634 link reply
P11632
Ok, some mistake although same result.
>Each number with different digits produces 3 different pairs, so naively you'd need at least ceil(64/3) = 22 combinations to ensure you can open.
With this method I'm obviously missing the pairs contain the same numbers.

Instead one could do the following:
First select all numbers that produce all different pairs that contain the same numbers and 2 more pairs avoiding repeats:
121, 232, 343, ..., 818 which give in total 24 pairs.
Now, one would naively need at least ceil(40/3) = 14 different numbers to get the remaining combinations, so in total you'd have 14+8 = 22.
P11821 link reply
P11634
Ok, unabomber was right. By hand I found this one:
121 232 343 454 565 676 787 818 315 513 614 416 724 427 825 528 836 638 171 262 373 484 575
Which is 23 long.
P11823 link reply
P11821
Looks very like cryptography.
P11824 link reply
P11632
P11821
Maybe we're interpreting the problem differently, but wouldn't both of those fail to open the lock if the combination was 112?
P11831 link reply
P11824
Well, the way I was interpreting is that you have to guess any of the pairs that "112" has (11, 12) AND that position doesn't matter
My list of numbers go through all possible pairs.

But I guess that now that you mention it, position not mattering is kind of a weird interpretation of
>you only need to get two of the numbers right to open the lock.
P11832 link reply
P11831
That's alright, now we have two problems.
P11833 link reply
P11832
>two problems
>without using regexps

Imagine that.
P11838 link reply
>two problems
kek at that
P11918 link reply
P11824

>Maybe we're interpreting the problem differently

Solution: Just remove the lock with metal cutters or crowbars.
P11957 link reply
(8!*8)/(6!*3!)
x