March 31st, 2007

Stupid Math

Have you ever had an idea, which you thought was both good and clever, only to have someone else prove that your idea cannot work? And by prove I mean: mathematically, airtight, no doubt.

I had an idea for file compression. Basically you treat the file as a number, then try to apply math operations to the number until you get a compact form.

For instance: 1042322766539016630700866888770291483756746941935489303432404994964599609375
Becomes: 23^13*5^82

For this example it looks great, but of course I hand selected the number, and most numbers don't have a nice short list of factors. And of course it all breaks down if the number you are trying to compress is a prime.

So this is all well and good, but my friend pointed out this proof to me. Which summarizes nicely why for a file of any length, most compression algorithms will make the file larger. The compressions algorithms we use for most computer files exploit the regularity of the data. Text and music are highly redundant in terms of information. but if you have something generating random bytes of data, most of it will not be compressible.

On further searching I found this, which is a generalization of my basic idea. At least the idea was good enough to be disproved, and I learned a lot. :)

A Friendly Wager

I just made a bet with [info] chikuru that I would post at least 5 messages for every 7 days. He has to do the same, and the first of us to fail has to buy the other dinner. There are extra rules and exceptions for vacations and such, but I don't want to list them all here.

The bet starts tomorrow, and lasts until April 1, 2008, so be looking forward to whatever inane thing I decide to post day to day.