Live data from Hacker News

File system that stores location of file in Pi

github.com

51–60 of 102 posts

Re: File system that stores location of file in Pi

#52
post #37

Earlier quoted context omitted.

You laugh now, but when we develop a trivial method to calculate pi and other irrational constants to quadrillions of digits, this will be wonderful.

I bet I could take a few moments and come up with a proof that such a method would require P=NP.

I can't find an authoritative source on this, but the algorithm used by SuperPi: https://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_algorit... seem polynomial in the number of digits you want to calculate at first glance.

Re: File system that stores location of file in Pi

#53
post #5

Now, we all know that it can take a while to find a long sequence of digits in π, so for practical reasons, we should break the files up into smaller chunks that can be more readily found. In this implementation, to maximise performance, we consider each individual byte of the file separately, and look it up in π. Definitely worth a chuckle. Very cute idea and implementation.

And what will you do when you know that 0xdeadbeef is located at index 54'896'523'871 ? store the index as a 64bit number ? ;) Edit: typo

Re: File system that stores location of file in Pi

#54
post #52
post #37

Earlier quoted context omitted.

I bet I could take a few moments and come up with a proof that such a method would require P=NP.

I can't find an authoritative source on this, but the algorithm used by SuperPi: https://en.wikipedia.org/wiki/Gauss%E2%80%93Legendre_algorit... seem polynomial in the number of digits you want to calculate at first glance.

Even if that's the case, wouldn't the number of digits of pi that must be computed to find a n occurrence of a random bit string of length n not be polynomial in n?

Re: File system that stores location of file in Pi

#55
post #50
post #33

Earlier quoted context omitted.

If you used small chunks (say, up to four bytes) you could just have a lookup table storing all the indices. Or - what a genius idea! - we could use Pi itself as a lookup table and use the sequence of n bytes at that position of pi as an implicit lookup table.

There are 4,294,967,296 possibilities in 4 bytes. To store a number in range of 0 to 4,294,967,296 - you will need exactly 4 bytes.

Not all 32bit sequences can be found in the first 4,294,967,296 binary digits of pi. Hence you will either need more then 4 bytes to encode 4 bytes in a pi position or a lookup table to fit the 4,294,967,296 numbers, some of which will be substantially larger than 4,294,967,296, into 4,294,967,296 slots.

Re: File system that stores location of file in Pi

#56
When I was young I had this idea that any hard drive can be compressed into 100 bytes. The compressed data is a 4 dimensional vector, a component of the vector is a 25 byte floating point number, and represent the space-time coordinates of the hard drive. (For example my hard drive in 1994 marc 3 23:00:45.456 at a specific place in Budapest) The extractor algorithm just have to simulate the universe from the big bang up until the given time, read the state of the atoms at the specified location, recognize the hard drive, and read the data from it. (Provided that the universe is deterministic, and what seems to be random in quantum mechanics can be simulated with a pseudorandom number generator.)

Re: File system that stores location of file in Pi

#57
post #56

When I was young I had this idea that any hard drive can be compressed into 100 bytes. The compressed data is a 4 dimensional vector, a component of the vector is a 25 byte floating point number, and represent the space-time coordinates of the hard drive. (For example my hard drive in 1994 marc 3 23:00:45.456 at a specific place in Budapest) The extractor algorithm just have to simulate the universe from the big bang…

Well, let's assume that the past is constantly changing. The path leading from the start to the universe to the writing of your 4D vector would also change and therefore your vector itself might change automatically with every change to space-time. Or would that still be called deterministic?

Re: File system that stores location of file in Pi

#59
post #56

When I was young I had this idea that any hard drive can be compressed into 100 bytes. The compressed data is a 4 dimensional vector, a component of the vector is a 25 byte floating point number, and represent the space-time coordinates of the hard drive. (For example my hard drive in 1994 marc 3 23:00:45.456 at a specific place in Budapest) The extractor algorithm just have to simulate the universe from the big bang…

"the universe is deterministic" - have you developed your thoughts on this since?
Post reply on HN