Minimization solution of three equations in two variables

barryj
Messages
856
Reaction score
51
Homework Statement
given these three equations: I know I have more equations than variables. However, isn't there a way to find the closest solution, some sort of regression solution?
2x - y = -3
-2x - y = -4
-2.1x - y = 4
Relevant Equations
2x - y = -3
-2x - y = -4
-2.1x - y = 4
I do not know the solution.
 
Physics news on Phys.org
I am thinking about how regression is performed. Let's assume I plot the three equations and they form a triange where they intersect. I can use the "distance from a point to a line" formula to get the distance from an arbitrary point , (X0,Y0) within the triangle to each of the lines. I think i could then square and add the distances and try to minimize the resulting function D(X0,Y0) . It seems that this could be extended to find the best fit of multiple lines or even planes. I guess this is the topic of optimization. I do not know if this is a good way or not.
 
barryj said:
isn't there a way to find the closest solution, some sort of regression solution?
Given ##AX=Y##, ##A^TAX=A^TY##.
IF ##A^TA## is nonsingular you have ##X=(A^TA)^{-1}A^TY##.
This can be shown to be the least sum squares solution.
 
Amazing! Hard to imagine it is this simple
Thanks.
 
Thread 'Use greedy vertex coloring algorithm to prove the upper bound of χ'
Hi! I am struggling with the exercise I mentioned under "Homework statement". The exercise is about a specific "greedy vertex coloring algorithm". One definition (which matches what my book uses) can be found here: https://people.cs.uchicago.edu/~laci/HANDOUTS/greedycoloring.pdf Here is also a screenshot of the relevant parts of the linked PDF, i.e. the def. of the algorithm: Sadly I don't have much to show as far as a solution attempt goes, as I am stuck on how to proceed. I thought...
Back
Top