by emilfihlman · 7y ago · 0 comments
000 start
001 1 move
002 1 move
...
008 1 move
009 1 move
019 1 move
018 1 move
...
011 1 move
010 1 move
020 1 move
021 1 move
...
and so on.For electronic locks, there is a similar method that allows you to try a 4-digit code for each key press [1].
[0] https://en.wikipedia.org/wiki/Gray_code [1] http://alvaray.org/brute-forcing-pincode-keypads-using-combi...
Those "try all n in shortest combination" sequences are called De Bruijn sequences in general.