Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64626

Re: generate De Bruijn sequence memory and string vs lists

References <CALyJZZVU+j64Jn7fqqzLmwW+KcM=43UMKjo=HW7umnq8MSP2Uw@mail.gmail.com> <lbrf82$fb3$1@ger.gmane.org>
From Vincent Davis <vincent@vincentdavis.net>
Date 2014-01-23 11:10 -0600
Subject Re: generate De Bruijn sequence memory and string vs lists
Newsgroups comp.lang.python
Message-ID <mailman.5903.1390500573.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 1/23/14, 10:18 AM, Dave Angel wrote:
> (something about your message seems to make it unquotable)

Not sure why the message was not quotable. I sent it using gmail.

On 1/23/14, 10:18 AM, Dave Angel wrote:
> 64gig is 4^18, so you can forget about holding a string of size 4^50

I guess I will have to buy more memory or be happy with less, 4**17 would
be ok.

On 1/23/14, 10:18 AM, Dave Angel wrote:
> If memory size is your issue,  why not make the function a
>   generator,  by replacing the append with a yield?

I plan to use the sequence as an index to count occurrences of sequences of
length n. A generator is equivalent to using itertools.permutations (i
think that the right itertool). My thought is that I don't have to store
each individual (sub)sequence since the De Brujin sequence contains all of
them. i.e. it is a compact representation of every sequence generated by
itertools.permutations.


Vincent Davis



On Thu, Jan 23, 2014 at 10:18 AM, Dave Angel <davea@davea.name> wrote:
>
>  Vincent Davis <vincent@vincentdavis.net> Wrote in message:
> >
> (something about your message seems to make it unquotable)
>
> 64gig is 4^18, so you can forget about holding a string of size 4^50
>
> If memory size is your issue,  why not make the function a
>  generator,  by replacing the append with a yield?
>
>
> --
> DaveA
>
> --
> https://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


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