# Using 'Reduce' to solve a set of inequalities, specified by a list

I have a two lists $LHS$ and $RHS$, both of size $n$. I want to solve a system of inequalities of the form:

$$LHS \leq RHS$$

$$LHS \leq RHS$$

$$LHS \leq RHS$$

$$\vdots$$

$$LHS[n] \leq RHS[n]$$

We assume that:

Each $LHS[i]$ is a linear equation in $m$ variables, say: $\alpha_{1}, \dots, \alpha_{m}$ and each $RHS[i]$ is a linear equation in $m$ variables, say: $\beta_{1}, \dots, \beta_{m}$.

We need to solve for $\alpha_{1}, \dots, \alpha_{m}$, $\beta_{1}, \dots, \beta_{m}$, which are positive integers.

Take m=2. To solve a single inequality (for some $i$ between $1$ and $n$) I know that I need to enter:

Reduce[LHS[[i]]<=RHS[[i]],{[\alpha]0,[\alpha]1,[\beta]0,[\beta]1}]

(I haven't put the constrains to make the code simpler)

But, if I need to solve all the inequalities, how do I input a list in 'Reduce' ?

• Have you checked the documentation? From the doc one example which should help you: Reduce[x^2 + y z == 1 && x + 2 y <= 3 z + 1 && x y z > 7, {x, y, z}, Reals]. If this does not help you, can you post a minimal specific example, not the general problem? – halirutan Oct 16 '12 at 23:42
• Do you just need something like And @@ Thread[lhs <= rhs]? – wxffles Oct 16 '12 at 23:50
You could use Inner to build the system of inequalities:
Reduce[ Inner[ LessEqual, lhs, rhs, And], Variables[{lhs,rhs}], Reals ]