7 ms·
Some time ago I conducted a simple (albeit impossible in practice, for now at least) thought experiment. Let's say that average size of a JPEG image is 5 MB. No
by ivanche 12y ago
Some time ago I conducted a simple (albeit impossible in practice, for now at least) thought experiment. Let's say that average size of a JPEG image is 5 MB. Now, some machine could generate all possible valid JPEG files sized 5 MB. In some of those images there would be events which never happen, and never could (for example Usain Bolt running in 1896 Athens Olympic Games etc.) Of course, sheer number of such images is ginormous, but for me it's interesting (and scary) that something like this will maybe be possible...
- cesarbs 12y agoA group of classmates and I spend about a week obsessed with this idea once. It's also cool to think that among all those images you would have e.g. the whole history of the world from all possible perspectives. I doubt it will ever be possible, though. Even for tiny, grayscale images the amount of images you'd have to generate is absolutely impractical, not to mention the effort to distinguish noise from actual pictures.
- lifeformed 12y agoNot to mention that the whole thing would be illegal. It'd have child porn, state secrets, libel, copyrighted software, etc.
- gatehouse 12y agoOr a computer generate all bytestrings and run them as executables. One of them would post this comment -- or maybe it is!
- deleted 12y ago[deleted]
- deleted 12y ago[deleted]
- munificent 12y ago> Of course, sheer number of such images is ginormous, but for me it's interesting (and scary) that something like this will maybe be possible... It will never be possible. A 5 MB JPEG has 5,368,709,120 bits, which means there are 2^5,368,709,120 different possible images. In scientific notation, it's 1.302... × 10^1,616,142,483. For comparison, there are about 10^80 atoms in the entire universe.
- mfringel 12y agoI suspect you can significantly cut down the space by limiting it to valid JPEG files.
- tbirdz 12y agoYou can cut it down but it still won't be feasible. Consider generating even just all possible 100x100 1-bit monochrome images. There will be 100 * 100 = 10000 bits per image, giving a total of 2^10000 possible images: about 1.995 * 10^3010 which is still way, way bigger than 10^80. A 5MB JPEG image would have a much larger resolution and color pallete then this.
- masklinn 12y agoA 5MB JPEG corresponds to 12~16MP@24bpp, although many of the images would compress to the same result.
- deleted 12y ago[deleted]
- masklinn 12y agoI'm not sure you realise the scales involved. 5MB (40Mb) is enough to create 1e12626113 different files, that's a number with 12.5 million digits For reference, the number of atoms in the visible universe is ~1e80 (1e78 to 1e82), you'd generate 1e12626033 images per atom (doesn't look any different does it? Well it's got 80 zeroes chopped off). For a second reference, assuming you're a standard-size hooman you have 1e14 cells tops (estimate vary, "An estimation of the number of cells in the human body"[0] gave 3.7e13). So no, it's not possible. Even if you remove a few order of magnitudes to account for invalid jpegs, let's say we cut it by a thousand orders of magnitude it's still 1e12000 images to generate[1]. They're also all contained in PI. And the thought experiment is but a variant of the infinite monkeys theorem[2] [0] http://informahealthcare.com/doi/abs/10.3109/03014460.2013.807878 http://informahealthcare.com/doi/abs/10.3109/03014460.2013.8... [1] if you can compute full tilt until the heath death of the universe you have ~1e47 seconds, you'd need to compute 1e11953 images per second… or 1e11873 images per second per atom in the universe [2] http://en.wikipedia.org/wiki/Infinite_monkey_theorem http://en.wikipedia.org/wiki/Infinite_monkey_theorem
- ccvannorman 12y ago:-] I thought of a similar thing for an mp3; a computer would produce every possible "song"..but even at an incredibly low resolution of 100 kilobytes for a 3 minute song, you're looking at 2^800,000 possibilities. (1e240000). Another cool one is possible games of Go, ~1e768. This is one reason top computers still can't touch top humans at winning the game. Big numbers are fun. :-]
- dTal 12y agoI don't think the number of possible games has anything to do with the difficulty of programming computers to play Go. There are 10^120 possible games of chess, for instance - still 40 orders of magnitude larger than the number of protons in the observable universe - and yet computers roundly defeat humans at chess these days.
- xnull 12y ago100% correct. But what if we imagine/allow/invent the series of algorithms that 'pluck' a good picture of Usain Bolt from the set of 5MB files without inspecting too many (let's say O(log) or O(log log))? That's only ~c25/~c5 bits of entropy to sort through, even less if the algorithm were to work in some sort of sparsity domain.
- abemassry 12y agoAlso had a similar thought experiment, went and built it. Thanks for the other commentors as well I should link to this HN page in the README. https://github.com/abemassry/crazip https://github.com/abemassry/crazip
- nobodysfool 12y agoThanks for this. Have you considered using a GPU to speed up computations?
- abemassry 12y agoI thought about it, but according to the other commentors here a project like this wouldn't make sense. I was learning python at the time and I wanted to learn about multithreaded programming in python. I could turn it into a learning project with no practical applications. It would be a good platform to learn about OpenCL, and see if the benchmarking times improve.
- nobodysfool 12y agoYou're right, it is absolutely senseles. However, that doesn't mean you shouldn't take pride in your work. Take a look at my Pythagorean cipher. It's idiotic and not practical, but it's just neat. https://github.com/sp1d3rx/nonsense/blob/master/cipher.py https://github.com/sp1d3rx/nonsense/blob/master/cipher.py
- IvyMike 12y agoYou may be interested in Borges's short story The Library of Babel. http://hyperdiscordia.crywalt.com/library_of_babel.html http://hyperdiscordia.crywalt.com/library_of_babel.html ""The Library of Babel" (Spanish: La biblioteca de Babel) is a short story by Argentine author and librarian Jorge Luis Borges (1899–1986), conceiving of a universe in the form of a vast library containing all possible 410-page books of a certain format." (from wikipedia)
- HCIdivision17 12y agoI immediately thought of the same thing. Personally, I like the idea of the Library of Babel more than, say, "all data is found in Pi". There's an important aspect to the story that really drives home the point, a hopelessness in the search as well as dealing with the nigh-incomprehensible scale. Well worth the read, as it brings the idea to a visceral level. I'm at a loss for the story about indexing meaningfully the library, but I think I may have found a neat article on the Library: james.grimmelmann.net/files/Library.markdown
- Dylan16807 12y agoThe identifier for any particular 'generated' photo is equivalent to the photo itself. In reality there is no generation at all. It's just a blank slate with every bit unknown. It's a perceptual problem, human don't understand randomness well. I don't blame you, it's a common mistake, but you're fundamentally wrong in calling it generation. Generation of everything is 100% equivalent to generation of nothing. Creation requires decision, is equivalent to decision.
- Houshalter 12y agoHere is an interesting article on a business plan is to copyright every conceivable image and make money on the royalties: http://torrentfreak.com/copyright-apocalypse-trolls-attack-the-net-from-the-future-140928/ http://torrentfreak.com/copyright-apocalypse-trolls-attack-t... >“Qentis aims to produce all possible combinations of text (and later on images and sound) and to copyright them,” Qentis’ Michael Marcovici told TorrentFreak. >“Concerning text we try this in chunks of 400 word articles in English, German and Spanish. That would mean that we will hold the copyright to any text produced from now on and that it becomes impossible for anyone to circumvent Qentis when writing a text.” >In terms of graphics, Qentis promotional material states that a subsidiary has already generated 3.23% of “all possible images” in the 1000×800 pixel format. >“We are now generating images at a much faster pace and expect to complete 10 percent of all possible images by the end of 2015. At current projections, we will by 2020 generate every possible image in the 1000×800 pixel resolution,” the company claims.