title: Finding an optimal solution to a system of linear equations in c++
body: <p>Here's the problem:</p>
  
  <p>I am currently trying to create a control system which is required to find a solution to a series of complex linear equations without a unique solution.</p>
  
  <p>My problem arises because there will ever only be six equations, while there may be upwards of 20 unknowns (usually way more than six unknowns).  Of course, this will not yield an exact solution through the standard Gaussian elimination or by changing them in a matrix to reduced row echelon form.</p>
  
  <p>However, I think that I may be able to optimize things further and get a more accurate solution because I know that each of the unknowns cannot have a value smaller than zero or greater than one, but it is free to take on any value in between them.</p>
  
  <p>Of course, I am trying to create code that would find a correct solution, but in the case that there are multiple combinations that yield satisfactory results, I would want to minimize <code>Sum of (value of unknown * efficiency constant) over all unknowns</code>, i.e. Sigma[x<sub>I</sub>*e<sub>I</sub>] from I=0 to n, but finding an accurate solution is of a greater priority.</p>
  
  <p>Performance is also important, due to the fact that this algorithm may need to be run several times per second.</p>
  
  <p>So, does anyone have any ideas to help me on implementing this?</p>