Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64668
| From | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: generate De Bruijn sequence memory and string vs lists |
| Date | 2014-01-24 21:29 +1300 |
| Message-ID | <bkemj0F48q8U1@mid.individual.net> (permalink) |
| References | <CALyJZZVU+j64Jn7fqqzLmwW+KcM=43UMKjo=HW7umnq8MSP2Uw@mail.gmail.com> <lbrf82$fb3$1@ger.gmane.org> <mailman.5903.1390500573.18130.python-list@python.org> |
Vincent Davis wrote: > I plan to use the sequence as an index to count occurrences of sequences > of length n. If all you want is a mapping between a sequence of length n and compact representation of it, there's a much simpler way: just convert it to a base-k integer, where k is the size of the alphabet. The resulting integer won't be any larger than an index into the de Bruijn sequence would be, and you can easily recover the original sequence from its encoding without needing any kind of lookup table. -- Greg
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: generate De Bruijn sequence memory and string vs lists Vincent Davis <vincent@vincentdavis.net> - 2014-01-23 11:10 -0600
Re: generate De Bruijn sequence memory and string vs lists Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-01-24 21:29 +1300
Re: generate De Bruijn sequence memory and string vs lists Vincent Davis <vincent@vincentdavis.net> - 2014-01-24 07:20 -0600
Re: generate De Bruijn sequence memory and string vs lists Greg Ewing <greg.ewing@canterbury.ac.nz> - 2014-01-25 18:11 +1300
csiph-web