View Single Post
  #8   Spotlight this post!  
Unread 10-09-2004, 00:03
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: New compression method

Quote:
Originally Posted by Aalfabob
Please correct me if im worng but I think this can help prove it a little better:

So say I have 512 bytes of data im compressing. This can contain 3.74 * 10^693 different combinations correct? So say I add a byte to that (513 Bytes), the combinations that creates are 6.16 * 10^693 or twice as much.

So say I have one byte as a header that can count the amount of times that data has been compressed. So that header can hold 256 values. So depending on which way those bytes come out (3.74 * 10^693), the counter can hold 256 different values so wouldnt adding that 1 byte for counting actually make the file have 9.57 * 10^695 combinations (256 * (3.74 * 10^693))? Now this is alot more combinations avaliable for the same amount of data. Hopefully I did that right.

Data:
512 byte combinations = 3.74 * 10^693
513 byte combinations = 6.16 * 10^693
513 with one byte being a counter = 9.57 * 10^695

If im correct i think that this can prove that that many pieces of randomly generated code can fit in that space. And plus im using a 2 byte main header which can contain 65536 runs.
It doesn't matter _what_ is stored in that extra byte. It's still just 8 bits. Adding 1 more byte, regardless of contents, always gives you 256 (that's 2^8) times as many possible combination. A bit, is a bit, is a bit, regardless of how your program interprets it. Also, keep in mind that 2^4096 (4096 is the number of bits in 512 bytes, so 2^4096 is the number of different possible 512-byte files) is still _astronomically_ smaller than 2^8388608, the number of different possible 1MB file. I really can't stress this enough: it has been _proven_ that you cannot compress every file of a given size down to a file smaller than the original (even if only by 1 bit). This has been PROVEN. Trying to do it is basically the same as trying to find an O(n) sorting algorithm (proven to be impossible) or trying to solve the halting problem (also proven impossible). While you're at it, why don't you find an integer solution to x^3 + y^3 = z^3.

Also, I _love_ math and arguing about math, etc, but _please_ use 2^x instead of 10. With binary stuff it makes it SO much easier to understand what's actually going on.

Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php