The probability of getting a certain image by random pixelation

202 Views Asked by At

Well, seeing that I'm terribly bad at math I don't know how to solve this, I'll try to explain, excuse me if I sound dumb.

Just suppose that I've got a photo/image with 320x240 resolution and 24 bit color depth (16,777,216 colors) and suppose that I made a computer program that sets pixels on 320x240px screen with random color values of truecolor (24 bits), so what is the probability for this program to draw my photo, or let's say any image I have with this particular resolution?

I know it's almost impossible but I want to know the exact proportion. The result will also give the answer to the question how many pictures we would have if we wanted to have all the pictures that can ever exist (on certain values of course), in which you can pick up even the craziest ones beyond imagination.

1

There are 1 best solutions below

4
On BEST ANSWER

The chance of 1 pixel would be 1 in 16777216.

The chance of 2 pixels would be (1/16777216) * (1/16777216).

So the chance of all of them would be (1/16777216) ^ (320*240).

Not very likely at all :) I'd stick with the lottery...