Simple combinatorics gone wrong

  • Thread starter Thread starter x2thay
  • Start date Start date
  • Tags Tags
    Combinatorics
Click For Summary
SUMMARY

The discussion centers on calculating the total number of possible photographs that can be taken with an 8-megapixel image (resolution 3264x2448) where each pixel can display 16,777,216 colors. The formula proposed is (2^24)^(3264*2448), which simplifies to approximately 17 million raised to the power of 8 million. The conversation also highlights the distinction between formats, noting that while JPEG is a lossy format, the calculations assume a bitmap format where every pixel can take on any of the 16 million colors. The final result indicates a logarithmic value of 115,805,766 for the total combinations.

PREREQUISITES
  • Understanding of pixel color depth, specifically 24-bit color representation.
  • Familiarity with combinatorial mathematics and factorial notation.
  • Knowledge of image formats, particularly differences between bitmap and lossy formats like JPEG.
  • Basic grasp of logarithmic functions and their applications in calculating large numbers.
NEXT STEPS
  • Research the implications of color depth in digital imaging, focusing on 24-bit color representation.
  • Explore combinatorial mathematics, particularly factorial calculations and their applications in image processing.
  • Learn about different image formats, emphasizing the differences between bitmap and JPEG compression techniques.
  • Investigate logarithmic calculations and their relevance in estimating large combinatorial outputs.
USEFUL FOR

This discussion is beneficial for mathematicians, computer scientists, graphic designers, and anyone involved in digital imaging or photography who seeks to understand the complexities of pixel combinations and image formats.

x2thay
Messages
14
Reaction score
0
1. So consider an 8 megapixel picture (res: 3264x2448).
Now, it seems rather simple but I just can't figure out how to calculate the entire number of possible shots/photographs one can take within that resolution, assuming each pixel can have 16777216 different values/colors.




Homework Equations





3. The Attempt at a Solution
So I realize the number has to be absolutely monstruous, so here's what I've tried so far


(3264*2448)!*2^24

Meaning, the entire possible positions all the pixels can assume times all the different values each individual pixel can have.
 
Physics news on Phys.org
It seems your solution is correct for a JPG image but for a GIF you limited to 256 colors per image. Each color may range from 0 to 16million as a GIF uses an 8 bit value that indicates which color register from the color palette to use.

One problem I see is that you'll get shots all in one color or half one color half another...

Do you want to define what a photo is? like it must have a minimum of X colors per photo?

Next what about color changes that are imperceptibly small? Do you want to instead say that while RED can range from 0 to 255 in value we'll limit it down to a subset of {0, 16, 32, 48, 64 ... 255} in other words 64 color choices.
 
Last edited:
x2thay said:
1. So consider an 8 megapixel picture (res: 3264x2448).
Now, it seems rather simple but I just can't figure out how to calculate the entire number of possible shots/photographs one can take within that resolution, assuming each pixel can have 16777216 different values/colors.




Homework Equations





3. The Attempt at a Solution
So I realize the number has to be absolutely monstruous, so here's what I've tried so far


(3264*2448)!*2^24

Meaning, the entire possible positions all the pixels can assume times all the different values each individual pixel can have.

If you have 2^24 possible values of each pixel, then for two pixels you would have 2^24*2^24 possibilities, right? What about 3264*2448 pixels?
 
jedishrfu said:
It seems your solution is correct for a JPG image but for a GIF you limited to 256 colors per image. Each color may range from 0 to 16million as a GIF uses an 8 bit value that indicates which color register from the color palette to use.

One problem I see is that you'll get shots all in one color or half one color half another...

Do you want to define what a photo is? like it must have a minimum of X colors per photo?

Next what about color changes that are imperceptibly small? Do you want to instead say that while RED can range from 0 to 255 in value we'll limit it down to a subset of {0, 16, 32, 48, 64 ... 255} in other words 64 color choices.

No matter how insignificant the difference is, I meant to calculate e-v-e-r-y single possible matrix 3264x2448 arrangement, given that each entry can assume 2^24 different values. so yes, there will be an enormous amount of shots in which the only difference from the next, will be a single pixel.
 
Dick said:
If you have 2^24 possible values of each pixel, then for two pixels you would have 2^24*2^24 possibilities, right? What about 3264*2448 pixels?

So... (2^24)^(3264*2448) ? Basically 17M^8M? Are you sure that's correct? It seems too simple.
 
x2thay said:
So... (2^24)^(3264*2448) ? Basically 17M^8M? Are you sure that's correct? It seems too simple.

Yes, I'm sure. It's actually too simple for me to be wrong. It's (number of possibilities for each choice)^(number of choices).
 
x2thay said:
So... (2^24)^(3264*2448) ? Basically 17M^8M? Are you sure that's correct? It seems too simple.

What format? You didn't answer.

Since jpeg is a lossy format a lot of those combinations ought to evaluate to the same output. I could be wrong.
 
rollingstein said:
What format? You didn't answer.

Since jpeg is a lossy format a lot of those combinations ought to evaluate to the same output. I could be wrong.

I should have mentioned earlier, but I meant a bitmap format.
 
Okay, got it. The solution is a number whose log is 115 805 766.
Thanks, guys.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K