MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Limit to length of lists?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34154] Re: Limit to length of lists?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 7 May 2002 03:53:47 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <ab5hs1$jh4$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

can you give *what* you have typed ?
*and* are you sure that your memory is not the
problem when you display the list and use cut and
paste to display it again ?

Otherwise

tt = Table[Random[Integer, {0, 40000}], {40000}];
ss = Rest[FoldList[#1 + #2 &, 0, tt]];

works fine on my SGI wit 768 MByte RAM :-)

Regards
  Jens

Bob Harris wrote:
> 
> Howdy,
> 
> I'm running into a problem where it seems like you just aren't allowed to
> assign a list of 40 thousand integers to a variable.
> 
> I've narrowed the failure down to the steps shown below.  Originally I was
> trying to import a large list, but when that failed I started trying to see
> just what worked and what didn't, and found that the problem has nothing to
> do with importing.  The computation in the following will seem strange, but
> it creates a list that similar to one that I couldn't import.  The
> computation is probably not related to the problem either.
> 
> (1) In mathematica, I create a 40,000 entry list of numbers in the range
> 1..2^32/40000, and assign it to the variable tt.
> 
> (2) Then I change the list so that each entry is the sum of the previous
> entries.  This results in a sorted list where the numbers range from about 1
> to about 2^32.
> 
> (3) Then I display that list, and cut and paste the whole list into an
> assignment to a variable named ss.  ss has not been previously used.  The
> asignment doesn't generate any complaints from Mathematica.  The assingment
> looks like this:
>    ss = {44672, ... , 2142701433};
> where the ... stands for 39,998 elements that I've left out of this mail
> message.
> 
> (4) I then ask for Length[ss] and am told that it is zero.  This is
> surprising, since the original list (which was created using Mathematica
> functions rather than just a big assignment) had the desired length (i.e.
> Length[tt] is 40000.
> 
> (5) Attempts to index into ss also fail.  For example, ss[[1]] gives me the
> messages
>     Part::partd:
>      Part specification ss[[1]] is longer than depth of object.
> 
> (6) After quitting and relaunching Mathematica, I've tried doing steps 3, 4,
> and 5 by themselves.  The failure is the same.
> 
> Anyone have any idea what's goin on here?  And how I can correct it?  I've
> wandered so far away from what I was originally trying to do, I'm starting
> to get pretty frustrated.  Is there some artificial limit imposed on the
> length of lists?  Is there some way I can control it?
> 
> I'm using Mathematica 4.0.1.0 on a G3 Mac running OS 9.0.4.  I've got it set
> up to provide 20 MB for Mathematica and 30 MB for MathKernel.
> 
> Thanks for any help,
> Bob H


  • Prev by Date: RE: Problems with SIMPLIFY and SOLVE
  • Next by Date: RE: Limit to length of lists?
  • Previous by thread: Limit to length of lists?
  • Next by thread: RE: Limit to length of lists?