Count the number of integer solution to $\sum_{i=1}^ {2}{a_i\times b_i} \geq 6$ [closed]

Count the number of integer solution to $\sum_{i=1}^ {2}{a_i\times b_i} \geq 6$ such that

condition 1: $1 \leq a_i \leq 7$

condition 2: $1 \leq b_i \leq 4$

condition 3: $\sum_{i=1}^{2} {a_i} = 8$

condition 4: $\sum_{i=1}^{2} {b_i} = 5$

Is there a general solution to find the number of integer solutions for an inequality like this given conditions? The way I'm finding the number of solution is by generating all possible solutions and check to see if they satisfy all the conditions or not. This solution is very time-consuming.

-

closed as not a real question by Andres Caicedo, Norbert, Noah Snyder, Arkamis, Jason DeVitoOct 24 '12 at 15:16

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

possible duplicate of Count the number of integer solutions for $a \times b \geq k$? –  Noah Snyder Oct 24 '12 at 12:07

Using conditions 3 and 4, rewrite $a_2=8-a_1$ and $b_2=5-b_1$. Note that for any $1\leq a_1\leq 7$, we then have $1\leq a_2\leq 7$, so condition 1 is satisfied so long as $1\leq a_1\leq 7$. Similarly, condition $2$ is satisfied so long as $1\leq b_1\leq 4$. Thus, we need only find the number of integer pairs $(a_1,b_1)$ with $1\leq a_1\leq 7$ and $1\leq b_1\leq 4$, such that $$6\leq\sum_{i=1}^2a_ib_i=a_1b_1+(8-a_1)(5-b_1)=2a_1b_1-8a_1-5b_1+40,$$ or equivalently, $$2(4-b_1)a_1\leq 34-5b_1.\tag{#}$$ Our task is simplified further by the fact that there are only $4$ possibilities for $b_1$. I suggest looking at the $4$ possibilities for $b_1$, then use the constraints on $a_1$ and the linear inequality resulting from $(\#)$ to find the number of solutions for $a_1$ given $b_1$.
For example, let's suppose $b_1=1$, so that we want $6a_1\leq 29$, so $a_1\leq\frac{29}6$. Since $a_1$ is an integer greater than or equal to $1$, then $1\leq a_1\leq\lfloor\frac{29}6\rfloor =5$. Thus, each of $(1,1),(2,1),(3,1),(4,1),(5,1)$ is a pair $(a_1,b_1)$ that allows us to meet all the desired constraints. We'll proceed similarly for $b_1=2,3,4$, then count up the number of solutions.
Important clarification: The work above (and the generalization below) is dependent on what you mean by "solutions". I made the assumption (perhaps incorrectly) that you were looking for the number of ordered pairs $\bigl(\{a_1,a_2\},\{b_1,b_2\}\bigr)$ such that the $a_i$'s and $b_i$'s satisfy all the desired conditions. If that isn't what you meant, please let me know, so that I can alter my answer to the appropriate context.
More generally, if we're given conditions like this--in particular, conditions such each indexed variable has specific constraints, and such that one of our indexed variables determines the other indices of the same variable (as in this situation, each $a_2$ within the appropriate constraints uniquely determined an $a_1$ within said constraints, and likewise with $b_2$ and $b_1$)--then we'll first perform the substitutions determined by the constraints to yield an inequality in fewer indexed variables. After that we can just go casewise through whichever of the indexed variables has the strictest constraints (to save time), and solve the resulting (simpler) inequality in each case. Now, more generally, there may be quicker ways than the casewise approach (and perhaps even in this particular situation, though I can't think of one off the top of my head).