Q. Yang wrote in his e-mail message of 1995/08/24
Martin Schoenert recently replied to my memory question, and in his
reply asked as to why I has wanted to know. The reason is that I am
dealing with a large number of lists such as the one I gave in my
letter ( [1,2,3,4,5,6,7] ) and sometimes the computer simply takes up
too much memory and stops. I was trying to come up with a unique
representation of that list which took up less memory, so I came up
with summing up each element mulitiplied by 100^(a-1), where a is its
position. I chose 100 because I don't think the numbers inside the
original list will exceed 100 (20, more like). Does anyone have
any suggestions as to what might be a better way to create a less
memory list?
I suspected something like that.
But why do you stuff the integer 7060504030201 into another list, i.e., why do you represent the list [1,2,3,4,5,6,7] by the integer-in-a-list [7060504030201] and not simply by the integer 7060504030201? If you would represent the list [1,2,3,4,5,6,7] by the integer 7060504030201, you would need only 24 bytes, i.e., half of what the original list [1,2,3,4,5,6,7] and your integer-in-a-list representation [7060504030201] need.
Unless you can limit the range of the entries even more, this is the
smallest representation you can achieve in GAP.
Martin.
-- .- .-. - .. -. .-.. --- ...- . ... .- -. -. .. -.- .- Martin Sch"onert, Martin.Schoenert@Math.RWTH-Aachen.DE, +49 241 804551 Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, 52056 Aachen, Germany