👓 Cracking pass codes with De Bruijn sequences | John D. Cook

Read Cracking pass codes with De Bruijn sequences by John D. Cook (johndcook.com)

Suppose you have a keypad that will unlock a door as soon as it sees a specified sequence of four digits. There’s no “enter” key to mark the end of a four-digit sequence, so the four digits could come at any time, though they have to be sequential. So, for example, if the pass code is 9235, if you started entering 1139235… the lock would open as soon as you enter the 5. How long would it take to attack such a lock by brute force? There are 104 possible 4-digit codes, so you could enter 000000010002…99989999 until the lock opens, but there’s a more efficient way. It’s still brute force, but not quite as brute.

An interesting serendipitous read just as I’m coincidentally doing some other combinatorial work relating to Polya and De Bruijn.