🔒 Locked
PI compression
Advertisement
Original Post
(second post... still getting used to this...)
I have build my own little PI compression scheme....
search for PI compressor in www.planetsourcecode.com for the source. (i''ll lget a link in soon, do you use the A tags?)
go to http://www.google.com/url?sa=U&start=20&q=http://3.141592653589793238462643383279502884197169399375105820974944592.jp/&e=7629 to get PI.
Is this anything new/revolutionary?
Basically the algarithm works like this:
You get the series of numbers "141"
you scan PI until you find them, (86 decimals in), You also add how long the string is, in this case the reference is 86:3
Do decode, look at the 86th digit of PI, and grab the next 3 numbers... and you get your number back again.
What do you think? (please leave comments)
- Do you have any examples of compressed data being shorter than uncompressed data?
- How do you compute/store Pi? How does it affect the time complexity of the compression algorithm?
- Does the algorithm terminate? (Does it always find an occurence of a given number in the base 10 decimals of Pi? This has only been proven to be true in base 2.)
- Isn''t there another chaotic number (ie for which the algorithm terminates) but where the range of decimals (as far as our problem is concerned) is smaller?
- How do you compute/store Pi? How does it affect the time complexity of the compression algorithm?
- Does the algorithm terminate? (Does it always find an occurence of a given number in the base 10 decimals of Pi? This has only been proven to be true in base 2.)
- Isn''t there another chaotic number (ie for which the algorithm terminates) but where the range of decimals (as far as our problem is concerned) is smaller?
Victor Nicollet, INT13 game programmer ![]()
I built my compressor for fun.... (so i''ve tried it for a few values).
I''m not sure about the references being larger then the numbers... i wrote this in about 10 min, so i haven''t had time to do the proper checks.
3:4
Is 1022, but is compressed to 3:4.
I was just wondering if anybody has done anything like this before?
I''m not sure about the references being larger then the numbers... i wrote this in about 10 min, so i haven''t had time to do the proper checks.
3:4
Is 1022, but is compressed to 3:4.
I was just wondering if anybody has done anything like this before?
Yes, this is nothing new, and it is also nothing magical. In general, it''s no where near as efficient as other compression schemes. Usually when the concept is presented, people talk about it as using transcendental numbers (not necessarily pi) to be able to compress potentially random values. Again, that is a pipe dream as in both theory and in practice, the size needed to represent the offset into the number is on average no gain. In fact, it''s very likely that it will take even more memory to store the "compressed" data. If anything, the concept works better as a way of crudely encrypting data than compressing it.
Yet another project for the dustbin next to the drawing board (i only spent about 10-20 minutes coding , so its not much of a loss)... maybe a PI RNG would be more appropriate?
Ind += seed
RND = GENPI[ind]
Is this idea any better?
[edited by - Nice coder on May 6, 2004 6:44:59 AM]
Ind += seed
RND = GENPI[ind]
Is this idea any better?
[edited by - Nice coder on May 6, 2004 6:44:59 AM]
flangazor : your argument is true, in that it''s not enough to say "Pi is irrational" to prove that any sequence can be found in the digits of Pi.
However, there are strong conjectures based on other properties of Pi than its irrationalness (namely its ties to chaos theory), that say not only any sequence can be found in the digits of Pi, but all sequences are found with equal probability.
Besides, normality has been experimentally verified up to the 206millionth digit of pi, so I still believe that, while it''s not proven that ANY sequence can be found in Pi''s digits, it has been proven unquestionably (they just looked after them all) that short enough sequences can be found at least once.
However, there are strong conjectures based on other properties of Pi than its irrationalness (namely its ties to chaos theory), that say not only any sequence can be found in the digits of Pi, but all sequences are found with equal probability.
Besides, normality has been experimentally verified up to the 206millionth digit of pi, so I still believe that, while it''s not proven that ANY sequence can be found in Pi''s digits, it has been proven unquestionably (they just looked after them all) that short enough sequences can be found at least once.
Victor Nicollet, INT13 game programmer ![]()
In this thread someone raises the possibility of compressing screen shots with it. I give a somewhat overly verbose explanation of why its computationally impractical to do so.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement