Solving a set of linear equations with a total of 35 variables

436 Views Asked by At

I have the following complex system of equations and I need to find a solution (or any possible number of solutions):

c + d + g + j + n = 2000
b + e + g + k + o + u + w + y - J = 1500
a + e + h + l + p + 7t + 2u + v = 1200
a + f + i + m + q + v + x = 2500
c + d + g + j + s + 4z + A - I = 2200
b + d + g + j + r + u + x + z + A + B - H = 4000
b + e + g + j + s + C + D + E + F - G = 2000

The following statements must be true:

G > H > I > 0
j > k > m
g > h > i
c > b > a
b > 0
s > r, o, and n > q and p (r, o, and n do not necessarily have to be equal, but can be...and q and p are not necessarily equal...but they can be also)
x > all other numbers
t > 0

Only the following variables may be negative:

a, f and i 

And one final bit of requirements:

All numbers must be divisible by 10 (i.e. multiples of 10)
All numbers must be integers

The reality is, I don't even know where to begin! I just want to know how to get started on this...

EDIT: The two equations above that are the most similar is the 1st and 5th. I can, therefore, simplify as follows:

c + d + g + j + n = c + d + g + j + s + 4z + A - I - 200
c + d + g + j + n = c + d + g + j + s + 4z + A - I - 200
n = s + 4z + A - I - 200
n - s - 4z - A + I = -200

Right?

EDIT 2:
So, this is terribly complex. I wrote an application that solves for equations 1 & 5, namely, it solves for the following variables:

c, d, g, j, n, j, s, z, A, and I

Furthermore, it only accepts values that are multiples of 50 and no value can be higher than 1600. I ended up with a resulting 69+ million sets of possible solutions that can be used to solve for equations 1 & 5. The solution sets took several minutes to compute. The first time I ran out of memory, the second time I streamed the answers into a file on the computer (at 4GB+ in size).

While the possible solutions are not infinite, there are probably more solutions than I could come up with in a reasonable amount of time.

1

There are 1 best solutions below

0
On

You should start by looking at variables that occur only once.
If an equation has multiple of these variables, put them together to one, and update your statements accordingly.
If an equation has one of these variables, form it into an inequation using the statements.

This should reduce your complexity a bit.