Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solution to a system

  1. Aug 10, 2011 #1
    I'm looking for a general-case method to find at
    least one solution to a system such as

    a_0 = a_1*x_1 + ... + a_n*x_n
    b_0 = b_1*x_1 + ... + b_n*x_n
    x_1 + ... + x_n = 1
    0<= x_1, .... , x_n <= 1

    where a_i, b_i are known real numbers, x_i are unknown and n > 4

    Thank you in advance.
     
  2. jcsd
  3. Aug 11, 2011 #2
    If I understand, you can write your system this way:
    [tex]\left(\begin{array}{cccc}
    a_1&a_2&\cdots&a_n\\
    b_1&b_2&\cdots&b_n\\
    1&1&\cdots&1\\
    0&0&\cdots&0\\
    \vdots&\vdots&\ddots&\vdots\\
    0&0&\cdots&0
    \end{array}\right)\cdot
    \left[
    \begin{array}{c}x_1\\x_2\\\vdots\\x_n\end{array}
    \right]=\left[
    \begin{array}{c}
    a_0\\b_0\\1\\0\\\vdots\\0
    \end{array}\right][/tex]

    If you put:

    [itex]\mathbf{x}=\left[
    \begin{array}{c}x_1\\x_2\\\vdots\\x_n\end{array}
    \right][/itex]

    [itex]\mathbf{b}=\left[
    \begin{array}{c}
    a_0\\b_0\\1\\0\\\vdots\\0
    \end{array}\right][/itex]

    [itex]A=\left(\begin{array}{cccc}
    a_1&a_2&\cdots&a_n\\
    b_1&b_2&\cdots&b_n\\
    1&1&\cdots&1\\
    0&0&\cdots&0\\
    \vdots&\vdots&\ddots&\vdots\\
    0&0&\cdots&0
    \end{array}\right)[/itex]

    it can be written for short as [tex]A\cdot\mathbf{x}=\mathbf{b}[/tex]

    You can use http://en.wikipedia.org/wiki/Gaussian_elimination" [Broken] (I think :D )

    Or probably I have not understood the problem :P
     
    Last edited by a moderator: May 5, 2017
  4. Aug 11, 2011 #3
    Thanks for the reply. However, the system

    a_0 = a_1*x_1 + ... + a_n*x_n
    b_0 = b_1*x_1 + ... + b_n*x_n
    x_1 + ... + x_n = 1

    will have an infinite amount of solutions, and the problem is how to select at least one that satisfy the inequality.

    0<= x_1, .... , x_n <= 1
     
  5. Aug 11, 2011 #4
    Sorry, I didn't focus on that condition :D
     
  6. Aug 11, 2011 #5

    gb7nash

    User Avatar
    Homework Helper

    That's the big problem here. A lot of the numerical techniques that solve systems of equations either have a square matrix (Gauss-Seidel) or have more equations than unknowns (least-squares).

    Whenever you have the case of more unknowns than equations, you have a certain degree of freedom. In this case, you're free to choose whatever values you want for most of the variables (choose simple values between 0 and 1). The real question though is that when you solve for the remaining variables, will you get something between 0 and 1? I would try this, but I can't think of any other method, unless you're willing to do brute force and obtain an approximation answer.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook