-1

enter image description here

I got this question correct, but I feel there has to be a more intuitive way to formulate the combinations when you choose at most x from a specific type instead of using cases like I did. Any help is appreciated!

2 Answers2

2

Indeed, your feeling is correct, there’s an easier way to do this. The number of combinations with at most $2$ Steam-type monsters is the number of unrestricted combinations minus the number of combinations with at least $3$ Steam-type monsters – and you showed that you already know how to calculate the latter without performing a sum.

joriki
  • 238,052
1

Alternative approach:

You can interpret the problem as a Stars and Bars problem that has (potentially) upper and lower bounds on the variables.

I will follow the model in this answer.

You want the number of solutions to

  • $E + F + I + S = 22.$

  • $E, ~F, ~I, ~S \in \Bbb{Z_{\geq 0}}.$

  • $2 \leq E, ~S \leq 2, ~3 \leq I.$

The basic approach will be that, per Stars and Bars theory, the number of solutions to the following problem is $\displaystyle \binom{n+[k-1]}{k-1} ~: $

  • $x_1 + x_2 + \cdots + x_k = n ~: ~n \in \Bbb{Z^+}.$

  • $\displaystyle x_1, ~x_2, ~\cdots, ~x_k \in \Bbb{Z_{\geq 0}}.$

Personally, I (arbitrarily) refer to the format directly above as the standard normal form for a Stars and Bars problem.

So, the steps to follow are:

  1. Use a change of variables so that all lower bounds are equal to $~0.~$

  2. Compute the number of solutions to this altered problem.

  3. Employ any needed change of variables to resolve upper bound constraints, employing Inclusion-Exclusion to compute the final enumeration.

This last step is potentially complicated. For a more detailed examination of the generic problem, where any of the variables might have an upper bound, see the article that I cited near the start of my answer.

For this particular problem, only $~x_4 = S~$ has an upper bound, and this particular variable does not also have any (artificial) lower bound. So, this particular problem is much simpler than the generic problem.

So, I will start by setting
$x_1 = E, ~x_2 = F, ~x_3 = I, ~x_4 = S.$

Then, since $~x_1 = E~$ is bounded below by $~2,~$ I will use the change of variable $~y_1 = x_1 - 2 = E - 2.~$

Similarly, since $~x_3 = I~$ is bounded below by $~3,~$ I will use the change of variable $~y_3 = x_3 - 3 = E - 3.~$

This means that the original problem has been converted into counting the number of solutions to

  • $y_1 + x_2 + y_3 + x_4 = $
    $(x_1 - 2) + x_2 + (x_3 - 3) + x_4 = 22 - 5 = 17.$

  • $y_1, ~x_2, ~y_3, ~x_4 \in \Bbb{Z_{\geq 0}}.$

  • $x_4 \leq 2.$

Except for the third bullet point above, the problem has been converted into standard normal format.

Ignoring the upper bound on $~x_4,~$ the number of solutions is $~\displaystyle \binom{17 + 3}{3} = \binom{20}{3} = 1140.$

To adjust for the upper bound on $~x_4,~$ you must deduct the number of solutions where this upper bound is $~\color{red}{\text{violated}}.$

This means that you are employing the additional change of variable $~y_4 = x_4 - 3,~$ and then deducting the number of solutions to

  • $y_1 + x_2 + y_3 + y_4 =$
    $y_1 + x_2 + y_3 + (x_4 - 3) = 17 - 3 = 14.$

  • $y_1, ~x_2, ~y_3, ~y_4 \in \Bbb{Z_{\geq 0}}.$

So, the number of solutions to deduct is $~\displaystyle \binom{14 + 3}{3} = \binom{17}{3} = 680.$

So, the total number of solutions, that satisfy all of the lower and upper bounds on the variables is

$$\binom{20}{3} - \binom{17}{3} = 1140 - 680 = 460.$$

user2661923
  • 35,619
  • 3
  • 17
  • 39