I'm working on a programming problem which boils down to a set of an equation and inequality:
x[0]*a[0] + x[1]*a[1] + ... x[n]*a[n] >= D
x[0]*b[0] + x[1]*b[1] + ... x[n]*b[n] = C
I want to solve for the values of X
that will give the absolute minimum of C
, given the input D
and lists and A
and B
consisting of a[0 - n]
and b[0 - n ]
.
I'm doing the problem at the moment in Python, but the problem in general is language-agnostic.
CLARIFICATION UPDATE: the coefficients x[0 - n]
are restricted to the set of non-negative integers.