Hacker News new | ask | show | jobs
by kagia 3706 days ago
If 12megapixels can produce 10 to the power 86696638 images, and we came up with a way of enumerating those images, could we then build a function that given anyone of those images return the index of that image within reasonable time with current hardware. ie. "you have just taken 3999999987493th image"?
4 comments

A friend of mine made a tool that did exactly this, but with Haikus instead. He had a dictionary of syllables, and then just iterated through the syllables (following the rules of a haiku). You can type in a haiku and find its index, or just iterate through the indices to see the (mostly nonsense) generated haikus.
Yes, but it wouldn't save any space. As a thought experiment, think of it this way:

How would we enumerate all these several gazillion image possibilities?

Well. Let's say number one is all black. Every pixels and every channel is all zero in its value. And let's say the last image to be enumerated is all white. 255 for each pixel and each channel.

Every conceivable image is created in between these two ends. For example, image two is all black, but the last pixel has a value of 1 instead of 0 for its value channel.

Image 1840274917 has pixel 27581 slightly reddish.

Hey, wait a minute, you've just created an image format for describing the data within the image! The only space you're saving is that (given this format) you save space on darker images, because they're likely lower in the sequence.

But that's only because this specification demands that each image be the same exact size and can make assumptions based on that. A lossless format like PNG would be able to perform much better over a wider range of images. (Eg all white will be huge in our system, but cheap in PNG)

This numberphile video discusses a similar concept:

The 'Everything' Formula - http://youtu.be/_s5RFgd59ao

It's the number represented by that file's full binary value (all the bytes concatenated together).
not only could you enumerate all images, you can also enumerate all books. the library of babel does this and youre looking at the particular page where this exact paragraph is written, for hacker news by dackerman, no less.

https://libraryofbabel.info/bookmark.cgi?ci.pnvgmzgyrce29