4 ms·
100% Compression Using Pi
- bloodorange 13y agoI was wondering what this post could be about when I read the title and was pleasantly surprised when I clicked on it. It gave me a good laugh - we'll done OP.
- steveinator 13y agoGenious
- pjungwir 13y ago> All possible finite files must exist within π. > The first record of this observation dates back to 2001. I'm surprised to hear this, since I had a buddy in high school in the early 90s who insisted on the same thing. Even then I could see the problem was storing the offset & length of the desired sequence would be worse than storing the sequence itself. This friend was brilliant, but he had a history of crazy half-joking ideas. He insisted the natural numbers don't exist, since you have to cross an infinite range of real numbers to get from 0 to 1.
- angersock 13y agoIt's always wonderful to see solid implementations of really terrible ideas.
- bobx11 13y agoI hate to sound overly optimistic about these types of things, but this kind of fun and ridiculous stuff is what inspires real innovation as well.
- greglindahl 13y agoYou could go another level meta, and compress the location of the actual data in π by finding the location of the location in π.
- huhtenberg 13y agoKeep reading... he suggests just that :)
- reader5000 13y agoI'm willing to invest if you have patents.
- bentcorner 13y agoThe patent is already written, but I can't tell you the offset.
- Mgccl 13y ago1. There is no proof that pi is a normal number. 2. The index of the position takes up space.
- Dylan16807 13y ago1. If everyone uses this algorithm maybe we'll find out if pi is normal or not! 2. Shhh don't let the pie hear you.
- aaren 13y ago1. Well, here's to hoping. 2. He addressed this - you store the index in pi as well. If the index of the index is too big, you can store that too... indices all the way down!
- tzs 13y agoYou then have to store how many levels down the real, as opposed to index, data is. If you have looped enough to have reached an index that is small, the depth count will on average be so large that it takes about as much space as your original data.
- hcarvalhoalves 13y ago1. Well, that would be a hard bug to reproduce right? "Saving this file (attached) takes an infinite amount of time."
- e1ven 13y agoIf anyone's interested, I wrote up a tangentially similar project last year. It was a fun use an afternoon ;) http://e1ven.github.io/HaShrink/ http://e1ven.github.io/HaShrink/
- gfody 13y agoIt's not a good compression algorithm because the offset into pi will require more digits to represent than the data you are trying to compress in the first place. Quite a lot more considering the law of big numbers. So ultimately this algorithm is going to expand the size of your data by some enormous factor.
- aaren 13y agoNo, you just have to store the offset as well. And the offset for the offset. Then you just have to keep track of the number of offset cycles you've gone through - and you can store this as well. Keep doing this until you have a number that is smaller than your file... might take a while, but it would be very elegant.
- gfody 13y agoconsidering the first offset is much, much larger than the file you started with. the offset to the offset is just going to increase in size with each iteration.
- goshx 13y agoVery nice! I think we should have more April Fools along the year. My favorite "project" so far is still RFC2549.
- PabloOsinaga 13y agosimilarly, we could just store files as pointers to books in the Library of Babel ( http://en.wikipedia.org/wiki/The_Library_of_Babel http://en.wikipedia.org/wiki/The_Library_of_Babel ) - since there are books there that have the base64 encoded versions of your files as well
- enriquepablo 13y agoBrilliant. But this is dangerous stuff in the wrong hands. If the NSA gets hold of it, BANG!, everything is metadata. Even you are coded in many codes many times along any expansion of pi... You can now be considered metadata.
- denebious 13y agoThe bigger the file, the lower the probability of finding an equivalent number (in pi) in this lifetime.
- deleted 13y ago[deleted]
- cschmidt 13y agoThat reminds me of the ending of the novel/movie "Contact" by Carl Sagan. When calculating pi in base 11, there was an implausibly long run of 0's and 1's, which made a pretty picture when you plotted it in two dimensions. So if you entered that picture as your file, the file system would make a major discovery :-). Someone actually wrote a paper on the properties of these numbers: http://arxiv.org/abs/1209.2348 http://arxiv.org/abs/1209.2348 This is the second time in a week I'm mentioning Carl Sagan in a comment. I'll stop doing that now.
- xenophonf 13y agoYou can never mention Carl Sagan too much, only too little.
- gooderlooking 13y agoTry watching a Cosmos marathon. The hyperbolic introductions are inspiring until you watch them back to back.
- cedias 13y agoDoes this mean Pi contains copyrighted material ? Good luck DMCA !
- gmuslera 13y agohttp://www.angio.net/pi/ http://www.angio.net/pi/ In 100 millons of digits of pi there is less than 1% of chances of finding a given 10 character string. Probably mankind wasnt on earth enough time to have calculated yet the amounts of digits that would imply finding there something big with high chances.
- myang 13y agoHere's an idea for data storage inspired by this project: 1. Encode the data into a floating number R 2. Take a steel rod, assuming its length is L, make a mark on the rod at the distance of L*R from one end To read the data, just measure the location of the mark and back out R. Not as genius but isn't it still great? :)
- redshirtrob 13y agoWhen selecting a transcendental filesystem, I usually go with φfs. It just looks better.
- stuartcoope 13y agoIt's great. You can store the offset in terms of pi too
- Duhveed 13y ago"In this implementation, to maximise performance, we consider each individual byte of the file separately, and look it up in π."...love it!
- lutusp 13y agoThe article is obviously a joke, but it's worth mentioning that the square root of any non-perfect-square number would do as well as Pi. All of them contain infinite sequences of apparently perfect randomness. Also, not only is it true that any imaginable sequence appears in Pi, but it appears there an infinite number of times.