MathGroup Archive 2001

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

Search the Archive

Problem with Collect[]

  • To: mathgroup at
  • Subject: [mg26626] Problem with Collect[]
  • From: "Pei Jin" <pei.jin at>
  • Date: Sat, 13 Jan 2001 22:36:07 -0500 (EST)
  • Sender: owner-wri-mathgroup at


I the course of my playing with Mathematica (version for Windows 98)
a large expression was generated (Length[rt2]=7470, ByteCount[rt2]=4923096)
but rather simple, it is sum of products of 2 functions.
When I tried to collect the terms I got

No more memory available.
Mathematica kernel has shut down.
Try quitting other applications and then retry.

At first, I tried to follow that advice and I stopped all other programs,
but that did not help, I tried to use
MemoryConstrained[Collect[rt2, f[__]], 50000000];
but even 50 MB (my PC has 96 MB of RAM) were not enough for
this command to finish (with this command I got $Abort).

Then I tried to create my version of Collect,
but even access to elements of this expression (rt2[[i]]) in a loop creates
memory exhaustion.
Even Short[rt2, 2] crashes kernel.

Some operations have no problem though:
z = Cases[rt2, f[__], 2]; Length[z]

Can you please tell me is it normal for Mathematica to behave like this,
or is something wrong with my version?
If you know any workaround that would be great.


P. Jin

  • Prev by Date: Mathematica 3.0, 4.0, 4.1 differences in DSolve[]
  • Next by Date: Re: Another Simplify Idiosyncrasy
  • Previous by thread: Re: Mathematica 3.0, 4.0, 4.1 differences in DSolve[]
  • Next by thread: Re: Another Simplify Idiosyncrasy