# Diophantine issue...

Printable View

• Oct 2nd 2006, 08:00 AM
Spudman
Diophantine issue...
I have a series of equations:

x0*y0 = t0
x1*y0 + x0*y1 = t1
x2*y0 + x1*y1 + x0*y2 = t2
x3*y0 + x2*y1 + x1*y2 + x0*y3 = t3

and so on... where tn are constants >= 0, xn, yn are either 1 or 0
I am trying to find a way to compute solutions for a given set of 't' constants
(Obviously only certain sets of 't' constants have solutions ). The number
of equations may be potentially quite large ( ie hundreds! ).
Any ideas ?
• May 23rd 2009, 07:29 PM
Media_Man
256
Are these the only four equations, or are you implying that you have a very large chain of equations following this form?

Given \$\displaystyle n\$ equations and constants \$\displaystyle \{t_0,t_1,...t_{n-1}\}\$ you have \$\displaystyle 2n\$ variables, and therefore \$\displaystyle 2^{2n}\$ solutions which you can easily iterate through for low values of \$\displaystyle n\$.

I guess the question here is how efficient do we really need to be, or can we just brute-force it?