General method for solving combination problems with constraints
I am trying to solve some problems like the problem in
Combination problem with constraints
I understand the idea of finding the total number of solutions then
subtracting out the number of solutions that don't fit the constraints,
but I don't get how the specific binomial coefficients that calculate the
number of solutions were arrived at.
So I am looking for someone to explain the general method for solving a
problem of the form
$a_1 + a_2 + ... + a_n = x$, possibly with constraints such as $a_i \le
w$, $a_j \ge z$ etc, where $a_1$, $a_2$, $\ldots$, $a_n$ and $x$, $w$, $z$
etc. are nonnegative integers.
An example problem could be find the number of solutions of the equation
$$a + b + c = 7$$ where $a \le 2$, $b \ge 2$ and $a$, $b$ and $c$ are
nonnegative integers.
I have heard this can be solved with binomial coefficients, but I don't
know how to find the binomial coefficients that correspond to the number
of solutions.
No comments:
Post a Comment