0
$\begingroup$

I have an ecommerce site where you can specify the size of a product and any number of options depending on the different products. Each option has a category. For example, for each product you can choose:

Size - 8.5 x 11, 11 x 17, 8.5 x 5.5 Paper - 100#, 14pt, 80# Coating - Aqueous, UV

Coating is a category while UV is an option. The customer can only choose one size, one type of paper, and one coating option.

The products have different numbers of categories and different numbers of options in those categories. Also, sizes can cause the number of options and categories to vary.

Update - To clarify, not every option is available for every size. So some sizes have 3 coating options available, for example, and some sizes have 2 coating options available.

How do I calculate the total number of possible size and option combinations? It could be these are variations or permutations.

$\endgroup$
2
$\begingroup$

The total number of combinations can be found by multiplying together the number choices over each of the categories. From what I gather from your post, this would be something like: $$ (\text{Number of paper sizes}) \times (\text{Number of types of paper}) \times (\text{Number of coating options}) \times \dotsb $$ Then for something like UV, you treat it like a category where the customer has two choices: either UV or not UV.

To address the edited question and @fanda455's comment:

You would then have to break it up into cases. To simplify the situation, suppose we have two classes of paper size called large and small and that the possible paper type/coating options for large and small paper are different. Then the total number of combinations would be: $$ (\text{Number of large paper sizes}) \times (\text{Number of types of large paper}) \times \dotsb \\ + \\ (\text{Number of small paper sizes}) \times (\text{Number of types of small paper}) \times \dotsb $$ If there are any further sub-restrictions, like if there are only certain types of coating options for different types of large paper, the you would have to break it down further into sub-cases.

$\endgroup$
  • $\begingroup$ That would work if every type of paper and every type of coating was available for every size. But some sizes only have 2 coating options instead of 3 coating options for the other sizes. I've updated the question to clarify the point. How would I then calculate the possible combinations? $\endgroup$ – Ben Anderson Apr 10 '15 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.