MathGroup Archive 1998

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

Search the Archive

Re: Redirecting output to file



V. Nandagopal wrote:
> 
> > In[2]:= Length[e]
> > Out[2]= 80
> >
> > So let's see how many elements your result will have.
> >
> > In[4]:= Binomial[80,4]
> > Out[4]= 1581580
> >
> > Each element is in effect a matrix: a list of four lists of five
> > integers. So above and beyond the list overhead we'll need to store
> > twenty integers. How much space does an integer occupy?
> >
> > In[5]:= ByteCount[Range[100]]
> > Out[5]= 1620
> >
> > Probably 16 bytes, with the remaining 20 for list overhead. Let's
> > double-check.
> >
> > In[6]:= ByteCount[Range[200]]
> > Out[6]= 3220
> >
> > 16 bytes per integer it is. Do we save anything when the lists contain
> > the same integers?
> >
> > In[7]:= ByteCount[Table[1, {100}]]
> > Out[7]= 1620
> >
> > No such luck. So storage for your result will be larger than
> >
> > (16 bytes-per-integer) * (20 integers-per-element) * (1.5Meg elements)
> >
> > Actually the product of the first two, 320, can be replaced by 416:
> >
> > In[8]:= ByteCount[Table[i+j, {i,4}, {j,5}]]
> > Out[8]= 416
> >
> > So you will need around 600 M to contain the result. I do not know
> > whether this size is cause for the behavior you saw, just thought I
> > would point out that you are trying to write a very large object to a
> > file. Possibly it produces the object but dies in formatting.
> 
> ===========================================================================
> > Daniel Lichtblau,
> > Wolfram Research
> 
> Dear Mr. Daniel Lichtblau,
> 
>         Thank you for the prompt response. I did think that the size could be
> the problem. Actually, I need to add an extra row comprising of {1,1,1,1,1} to
> all the matrices I get from the result of the computation and then I need to
> compute the determinants, rank and the minors of this huge number of
> 5x5 matrices.
> 
>         Is there anyway I can do this on my machine?
> 
>         Thanking you once again,
> 
>         With best regards,
> 
>         V. Nandagopal
>         School of Mathematics
>         Tata Institute of Fundamental Research
>         Colaba, Bombay 400 005, India
> 
>         e-mail: nandgopa@math.tifr.res.in

If you do not need the actual matrices you might try doing the
computations in a loop in such a way that you do not have all the
matrices at one time, and only the values needed get saved. For example
you could write a nextMatrix function that gives you one new matrix at
a time. Storing all the determinants, etc. still involves a tremendous
amount of information. If you could dispense with the minors it would
be more reasonable.

Are you certain the problem under attack cannot be handled by means that
involve less brute force? I am guessing that based on size
considerations alone you are near or possibly beyond the capacity of a
modern work station. In these circumstances you might want to look for
a way to recast your problem to make it more tractable.

Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: Re: Want a smooth function from Arg[ ]
  • Next by Date: Re: What Algorithm(s) Do(es) 'Rationalize[]' Use?
  • Prev by thread: Re: Redirecting output to file
  • Next by thread: Re: Redirecting output to file