Yes, I should have said going from a length 14 seed sequence to a length 4 sequence.
My apologies. I need to slow down and be more careful. Thanks, -- Raul On Thu, Jan 15, 2015 at 10:59 AM, R.E. Boss <[email protected]> wrote: >> So going from a length 4 seed sequences to a length 14 sequence >> results in additional memory consumption of 4.19418e7 bytes of memory. > > Isn't it the other way around? > 1.14925e9 - 1.10731e9 > 41940000 > > Actually, the concern is to calculate the number of 1's or 2's for length >>10e13 sequences in a minimum of memory. > See http://arxiv.org/abs/1110.4228 > > > R.E. Boss > > >> -----Original Message----- >> From: [email protected] [mailto:programming- >> [email protected]] On Behalf Of Raul Miller >> Sent: donderdag 15 januari 2015 15:04 >> To: Programming forum >> Subject: Re: [Jprogramming] Kolakosky sequence >> >> Hmm... the way that seems obvious to me seems to be less efficient >> than your approach: >> >> kolakosky=: (# 2 1 $~ #)@]^:(> #)^:_&2 >> timespacex 'kolakosky 21717700' >> 0.933105 1.16183e9 >> >> Interestingly, the length of the seed sequence seems to have a >> disproportionate effect on the amount of space used: >> >> timespacex '21717700 (# 2 1 $~ #)@]^:(> #)^:_: 2 2 1 1' >> 0.946427 1.14925e9 >> timespacex '21717700 (# 2 1 $~ #)@]^:(> #)^:_: 2 2 1 1 2 1 2 2 1 2 2 1 1 > 2' >> 0.980988 1.10731e9 >> timespacex 'kolakosky 100' >> 3.07892e_5 10496 >> >> So going from a length 4 seed sequences to a length 14 sequence >> results in additional memory consumption of 4.19418e7 bytes of memory. >> And yet generating a length 100 kolakosky sequence costs only 10496 >> bytes of memory. >> >> I don't know if that is an inefficiency in J or some kind of crazy >> complexity imposed by the operating system. But since I get basically >> the same space numbers on different operating systems, I should >> probably assume that it's J. >> >> But I do not have any kind of algorithmic model for any part of J >> where that makes sense. So maybe this is a symptom of something else? >> If so, [chat forum question:] what could that be? >> >> Thanks, >> >> -- >> Raul >> >> >> >> On Thu, Jan 15, 2015 at 7:03 AM, R.E. Boss <[email protected]> wrote: >> > K=. 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 2 1 2 1 1 2 1 2 2 1 1 2 1 1 2 1 2 > 2 1 >> > 2 2 1 1 2 1 2 2 1 2 1 1 2 1 1 2 2 1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 1 > 2 2 >> > 1 2 1 1 2 2 1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 2 1 2 1 1 2 1 2 2 1 2 2 > 1 1 >> > is the start of a sequence where each i-th number gives the length of > the >> > i-th substring of equal numbers. >> > Or in J >> > (}:#;.(2)~ 2~:/\]) K >> > 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 2 1 2 1 1 2 1 2 2 1 1 2 1 1 2 1 2 2 1 > 2 2 >> > 1 1 2 1 2 2 1 2 1 1 2 1 1 2 2 1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 1 2 >> > >> > (Partial) equality from >> > ((]-: ({.~ #)) }:#;.(2)~ 2~:/\]) K >> > 1 >> > >> > I do have a way to generate them (not by hand), but what are other ways? >> > Elegant and lean svp. >> > >> > The first 21717701 items I generated in >> > ts 'genREB 2' >> > 0.9922127 8.0530995e8 >> > >> > >> > R.E. Boss >> > >> > >> > ---------------------------------------------------------------------- >> > For information about J forums see >> http://www.jsoftware.com/forums.htm >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
