This is a moderately complex question, because I'm not sure you fully appreciate the problem, and I am also sure this is not your real problem. At least, it never is. :)
I'll start with the problem you posed.
You have 8 equations. But you have too many unknowns to solve the problem, as you wrote it.
B(3)=4; B(5)=6; B(6)=4; B(7)=2; B(8)=4;
So effectively there are 3 unknown elements of the right hand side vector B. But there are also 6 unknown elements of the vector x.
The equations with unknown elements in B are essentially useless. you have an equation, equl to some unknown number B(1).
B(1) is used in no other way, in no other place. There is nothign you can do with that equation. It is essentially meaningless, adding no information context to the problem.
So really, you have a problem with 5 equations.
B(3)=4; B(5)=6; B(6)=4; B(7)=2; B(8)=4;
But there are 6 unknown values for x, thus x(3:8). This is an underdetermined problem. There are infinitely many sets of vectors x that will satisfy the problem, where the first two elements are known.
Perhaps I can give a simple example. Consider this problem:
Now, suppose we wantd to solve the problem A*x = B, where x is avector of length 2. I'll assume both elements of x are unknown. So we could write this as a linear system of two equations,
1*x1 + 5*x2 = b1
3*x1 + 9*x2 = b2
If both b1 and b2 are known values, then all is good. The system has a unique solution because rank(A) here is 2.
But suppose you were willing to tell us the value of only b1? b2 is itself an unknown? Then really, we only have ONE equation, but one equation in two unknowns. Or, you could think of it as two equations, with three unknowns. Now there is insufficient information to solve the problem. Nothing you can do will make the problem have a unique solution.
It is possible, if you wanted to have b2 as an unknown, you could solve the problem, as a FUNCTION of b2. For example, we might do this:
[x1,x2] = solve(sym(A)*[x1;x2] == [b1;b2])
I've used a symbolic solve here, to make it explicit the result is a function of b2. As you see, now we have a solution in terms of the unknown b2. Change the value for b2, and you get a different result. So the result is now essentially a function of b2.
And if there were fixed values for some of the elements of x, we could also handle that. But really, I would need more specifics to know if the problem has an solution or not.
(One final question does arise, are you looking for integer solutions to this problem? That seems possible, given the ay you phrased it, but I am not sure. It does not change anything I said in any materialway, except for making the solutions slightly less common. There will still be infinitely many solutions, but a lower order of infinitely.)
Now, suppose you added one more known value for x, say x(3)?
Here we sould now have 5 unknown values for x, and essentially 5 pieces of information. Now you could solve the problem, as a unique solution for x(4:8). Then you could recover the unknown values for B.
Perhaps if you have more specifics, I can help more, but for the problem as posed, this is about all that can be said.
0 Comments
Sign in to comment.