Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You'd want a sequence that contains every 6-gram exactly once and ends with the same 5 digits as it starts with: such a sequence would be 2^6=64+5=69 bits long, and then you'd repeat the first 64 over and over. (Or just contains exactly once up to cycles.)

Some searching tells me this already has a name, see https://en.wikipedia.org/wiki/De_Bruijn_sequence

So yes, just take a De Bruijb sequence B(2,6) (algorithms in the link can generate them) and repeat it.



Nice!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: