Skip to main content
9 events
when toggle format what by license comment
Jan 26, 2015 at 21:08 comment added Mr.Wizard Very nicely done. +1
Jan 26, 2015 at 14:46 vote accept Chen Stats Yu
Jan 25, 2015 at 4:00 comment added Chen Stats Yu It might be surprise to you but I just needed K=30 for fun. I only need for K up to about 10,12. I got a bit bored writing my PhD thesis. So just having fun testing some really large values. The lists are something we call histories for capture recapture recovery data. sciencedirect.com/science/article/pii/S1572312712000809
Jan 25, 2015 at 3:57 comment added 2012rcampion Just a programming note, you probably should avoid using K as your index, since Mathematica already has it defined as a default generic name for a summation index in a symbolic sum. (See K // FullDefinition). In general, you should use variable names with a lowercase first letter (k and myFunction) since all of Mathematica's built-in definitions are capitalized (Solve and FindFirst).
Jan 25, 2015 at 3:53 comment added 2012rcampion Sorry, I was writing that comment when you posted yours and didn't see it... Using RSolve to find a closed-form expression for your linear recurrence, we see that the length of list n is $2^{n+1}-2-n$, growing exponentially. Every time you double your RAM you are only increasing $n$ by one. Case 30 would require roughly 1000 times more memory, so you would be far into the range of clusters or supercomputers. What is this list for?
Jan 25, 2015 at 3:48 comment added Chen Stats Yu That's fair enough. I should try to find a machine with much more RAM. Thanks!
Jan 25, 2015 at 3:46 comment added 2012rcampion Note that although the case for 20 only takes 1.5 seconds on my machine, by 23 it takes 14.6 seconds and by 24 my computer runs out of physical memory (and I have 16 gigs of it!).
Jan 25, 2015 at 3:45 comment added Chen Stats Yu myFunction[20]; // AbsoluteTiming takes about 2 seconds, which is amazing. But myFunction[30]; has MemoryAllocationFailure. Do you have any idea how much memory I would have to have? I only got 4G RAM.
Jan 25, 2015 at 3:39 history answered 2012rcampion CC BY-SA 3.0