- #1
hansaaa
- 2
- 0
Hi, I have an algorithm that I have to test, and it gives me certain variables at different stages of time. I also have a "result" (I guess you can call it that), that these variables are supposed to amount to, in some mathematical fashion, at those equal points in time.
This gives me a system of equations:
I realize how to solve this, if this were a system of linear equations (I.e. "linear" algebra). But, the thing is, I DON'T know the OPERANDS. And, it could also be a non-linear system, but I don't know the exponents either.
I.e., the operands could be "+" or "-", but they could also be "%" (mod), "/", division, etc. and the exponents could be 1, 5, or 365
Of course, the operands and exponents would have to be the same in each column of a respective row, i.e. Var a, would always be, for example, "modded" (%), with Var b, and, Var b, could always be, say multiplied (x) with Var C, to get result "r".
So, again, row reduction for linear algebra wouldn't be that great of a deal, I've done it plenty of times before and even have algorithms for it, BUT, this is a different case, trying to find the operands (and possibly exponents, if they are not 1, which I do assume, but DON'T KNOW) for each column (IF ANY), that make this system of equations valid, I guess.
Is there some kind of mathematical fashion/algorithm for finding this out? Or is the only solution I have "plug 'n chug" (i.e. plug in operators and exponents into the columns, and see what I get)??
Thanks! C:)
This gives me a system of equations:
Code:
Var a Var b Var c r (result)
1 3 2 1
2 2 2 0
0 4 2 0
I realize how to solve this, if this were a system of linear equations (I.e. "linear" algebra). But, the thing is, I DON'T know the OPERANDS. And, it could also be a non-linear system, but I don't know the exponents either.
I.e., the operands could be "+" or "-", but they could also be "%" (mod), "/", division, etc. and the exponents could be 1, 5, or 365
Of course, the operands and exponents would have to be the same in each column of a respective row, i.e. Var a, would always be, for example, "modded" (%), with Var b, and, Var b, could always be, say multiplied (x) with Var C, to get result "r".
So, again, row reduction for linear algebra wouldn't be that great of a deal, I've done it plenty of times before and even have algorithms for it, BUT, this is a different case, trying to find the operands (and possibly exponents, if they are not 1, which I do assume, but DON'T KNOW) for each column (IF ANY), that make this system of equations valid, I guess.
Is there some kind of mathematical fashion/algorithm for finding this out? Or is the only solution I have "plug 'n chug" (i.e. plug in operators and exponents into the columns, and see what I get)??
Thanks! C:)
Last edited: