This was really interesting to read! I just discovered De Brujin sequences two days ago and was just working on a blog post when I read this.
I implemented two binary De Brujin algorithms in haskell and wrote about it here.
Fredrik Mansfeld
Thu, 24 Sep 2009 07:47:32 GMT
Just a minor correction: I think De Brujin’s method needs 10003 keystrokes in the worst case. The interesting thing is that the sequence itself is only 10000 digits. If you havn’t had any luck when you reach the end you just start over from the beginning to get the last three combinations.
You can see it in your example too. The combinations 1114, 1144 and 1444 is missing, but you get them if you start over from the beginning when you reach the end.
An even more sinister approach would be to use an infrared meter a couple of seconds after someone just touched the keypad.
This was really interesting to read! I just discovered De Brujin sequences two days ago and was just working on a blog post when I read this.
I implemented two binary De Brujin algorithms in haskell and wrote about it here.
Just a minor correction: I think De Brujin’s method needs 10003 keystrokes in the worst case. The interesting thing is that the sequence itself is only 10000 digits. If you havn’t had any luck when you reach the end you just start over from the beginning to get the last three combinations. You can see it in your example too. The combinations 1114, 1144 and 1444 is missing, but you get them if you start over from the beginning when you reach the end.