Re: Whatīs the algorithm that compresses a 20 digit big int, into 8 bytes ?

From: Rafael Anschau <rafael.anschau_at_gmail.com>
Date: Fri, 9 Apr 2010 13:41:37 -0700 (PDT)
Message-ID: <de64b32f-a94c-4d08-a312-b95c48772418_at_m38g2000vbr.googlegroups.com>


On Apr 9, 5:21 pm, Keith H Duggar <dug..._at_alum.mit.edu> wrote:

> You might also want to google the "pigeon hole principle" for
> some interesting related discussions.

Hi Keith, I just read about it, and I am honored to have an answer from a MIT student.

The insight I had was this(probably someone has refuted it already, but itīs still in my mind).

Itīs possible to compress, using from the 256 possibilities of a byte 255 for values and one for concatenation. Assuming the concatenation byte as 11111111

1010110101111000111010111100010110101100011000011111111111111111111

becomes

10101101011110001110101111000101101011000110000(11111111)(meaning +)10100(20 in binary)*(assuming anything that comes after the byte of frequency is the repeated digit)1.

Of course, that would require making numbers without the byte of 11111111 which would result in a new way for representing binary numbers.But in this method, I donīt see any problems. It would also mean repetition is frequent enough in this universe, which I am not sure. It would also mean
that the frequency is high enough so all 20 digits numbers could be placed there. Which seems very unlikely, so I accept it as proved based on the unlikeliness of it all.

But getting back to earth, I guess databases just use 9 bytes for the last 82% of the numbers that eventually need to be stored.

Thanks, Received on Fri Apr 09 2010 - 22:41:37 CEST

Original text of this message