Absolute value in Linear programming problem

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have this problem, where I have to reformulate it as a linear programming problem.



Minimize $ 2x_1 +3 vert x_2-10vert $



subject to $vert x_1+2vert + vert x_2vert ≤5 $



The subject is new to me. Can anyone help?










share|cite|improve this question





















  • $tgeq |x|$ is equivalent to $tgeq x$ and $tgeq -x$.
    – Michal Adamaszek
    Sep 6 at 10:01






  • 1




    Don´t forget to mark answers as accepted.
    – callculus
    Sep 6 at 13:46














up vote
0
down vote

favorite












I have this problem, where I have to reformulate it as a linear programming problem.



Minimize $ 2x_1 +3 vert x_2-10vert $



subject to $vert x_1+2vert + vert x_2vert ≤5 $



The subject is new to me. Can anyone help?










share|cite|improve this question





















  • $tgeq |x|$ is equivalent to $tgeq x$ and $tgeq -x$.
    – Michal Adamaszek
    Sep 6 at 10:01






  • 1




    Don´t forget to mark answers as accepted.
    – callculus
    Sep 6 at 13:46












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have this problem, where I have to reformulate it as a linear programming problem.



Minimize $ 2x_1 +3 vert x_2-10vert $



subject to $vert x_1+2vert + vert x_2vert ≤5 $



The subject is new to me. Can anyone help?










share|cite|improve this question













I have this problem, where I have to reformulate it as a linear programming problem.



Minimize $ 2x_1 +3 vert x_2-10vert $



subject to $vert x_1+2vert + vert x_2vert ≤5 $



The subject is new to me. Can anyone help?







linear-programming






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Sep 6 at 9:45









Gabarta123

293




293











  • $tgeq |x|$ is equivalent to $tgeq x$ and $tgeq -x$.
    – Michal Adamaszek
    Sep 6 at 10:01






  • 1




    Don´t forget to mark answers as accepted.
    – callculus
    Sep 6 at 13:46
















  • $tgeq |x|$ is equivalent to $tgeq x$ and $tgeq -x$.
    – Michal Adamaszek
    Sep 6 at 10:01






  • 1




    Don´t forget to mark answers as accepted.
    – callculus
    Sep 6 at 13:46















$tgeq |x|$ is equivalent to $tgeq x$ and $tgeq -x$.
– Michal Adamaszek
Sep 6 at 10:01




$tgeq |x|$ is equivalent to $tgeq x$ and $tgeq -x$.
– Michal Adamaszek
Sep 6 at 10:01




1




1




Don´t forget to mark answers as accepted.
– callculus
Sep 6 at 13:46




Don´t forget to mark answers as accepted.
– callculus
Sep 6 at 13:46










2 Answers
2






active

oldest

votes

















up vote
1
down vote













Alternatively, the constraint $vert x_1+2vert + vert x_2vert ≤5$ corresponds to:
$$pm(x_1+2)pm x_2 le 5 iff
begincases x_1+2+x_2le 5\
-(x_1+2)+x_2le 5\
x_1+2-x_2le 5\
-(x_1+2)-x_2le 5\
endcases$$
The feasible region is:



$hspace3cm$enter image description here



Since $x_2<10$, then the original problem can be reformulated as:
$$textMinimize 2x_1+3(10-x_2) textsubject to:\
begincasesx_1+x_2le 3\
x_1-x_2ge -7\
x_1-x_2le 3\
x_1+x_2ge -7\
endcases$$
The answer is: $f(-2,5)=11$. To be verified: Original and Reformulated.






share|cite|improve this answer



























    up vote
    -1
    down vote














    Minimize $2x_1 +3 vert x_2-10vert$ subject to $vert x_1+2vert + vert x_2vert ≤5$.




    It can be converted to $6$ linear programming problems:
    $$1) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) -(x_2)≤5\
    colorredx_1le -2\
    x_2le0endcases
    4) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) -(x_2)≤5\
    colorbluex_1ge -2\
    x_2le0endcases \
    2) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
    colorredx_1le -2 \
    0le x_2le10 endcases
    5) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
    colorbluex_1ge -2\
    0le x_2le10endcases\\
    3) begincases2x_1+3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
    colorredx_1le -2\
    10le x_2 endcases
    6) begincases2x_1+3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
    colorbluex_1ge -2\
    10le x_2 endcases\$$






    share|cite|improve this answer




















    • Although mathematically correct, your answer is highly inefficient. You can solve it as one linear optimization problem. See the comment of Michal Adamaszek.
      – LinAlg
      Sep 6 at 17:39











    • @LinAlg, thanks for the comment, added another answer. Left this one for reference, since it is a straightforward (though longer) method.
      – farruhota
      Sep 6 at 20:09











    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2907286%2fabsolute-value-in-linear-programming-problem%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Alternatively, the constraint $vert x_1+2vert + vert x_2vert ≤5$ corresponds to:
    $$pm(x_1+2)pm x_2 le 5 iff
    begincases x_1+2+x_2le 5\
    -(x_1+2)+x_2le 5\
    x_1+2-x_2le 5\
    -(x_1+2)-x_2le 5\
    endcases$$
    The feasible region is:



    $hspace3cm$enter image description here



    Since $x_2<10$, then the original problem can be reformulated as:
    $$textMinimize 2x_1+3(10-x_2) textsubject to:\
    begincasesx_1+x_2le 3\
    x_1-x_2ge -7\
    x_1-x_2le 3\
    x_1+x_2ge -7\
    endcases$$
    The answer is: $f(-2,5)=11$. To be verified: Original and Reformulated.






    share|cite|improve this answer
























      up vote
      1
      down vote













      Alternatively, the constraint $vert x_1+2vert + vert x_2vert ≤5$ corresponds to:
      $$pm(x_1+2)pm x_2 le 5 iff
      begincases x_1+2+x_2le 5\
      -(x_1+2)+x_2le 5\
      x_1+2-x_2le 5\
      -(x_1+2)-x_2le 5\
      endcases$$
      The feasible region is:



      $hspace3cm$enter image description here



      Since $x_2<10$, then the original problem can be reformulated as:
      $$textMinimize 2x_1+3(10-x_2) textsubject to:\
      begincasesx_1+x_2le 3\
      x_1-x_2ge -7\
      x_1-x_2le 3\
      x_1+x_2ge -7\
      endcases$$
      The answer is: $f(-2,5)=11$. To be verified: Original and Reformulated.






      share|cite|improve this answer






















        up vote
        1
        down vote










        up vote
        1
        down vote









        Alternatively, the constraint $vert x_1+2vert + vert x_2vert ≤5$ corresponds to:
        $$pm(x_1+2)pm x_2 le 5 iff
        begincases x_1+2+x_2le 5\
        -(x_1+2)+x_2le 5\
        x_1+2-x_2le 5\
        -(x_1+2)-x_2le 5\
        endcases$$
        The feasible region is:



        $hspace3cm$enter image description here



        Since $x_2<10$, then the original problem can be reformulated as:
        $$textMinimize 2x_1+3(10-x_2) textsubject to:\
        begincasesx_1+x_2le 3\
        x_1-x_2ge -7\
        x_1-x_2le 3\
        x_1+x_2ge -7\
        endcases$$
        The answer is: $f(-2,5)=11$. To be verified: Original and Reformulated.






        share|cite|improve this answer












        Alternatively, the constraint $vert x_1+2vert + vert x_2vert ≤5$ corresponds to:
        $$pm(x_1+2)pm x_2 le 5 iff
        begincases x_1+2+x_2le 5\
        -(x_1+2)+x_2le 5\
        x_1+2-x_2le 5\
        -(x_1+2)-x_2le 5\
        endcases$$
        The feasible region is:



        $hspace3cm$enter image description here



        Since $x_2<10$, then the original problem can be reformulated as:
        $$textMinimize 2x_1+3(10-x_2) textsubject to:\
        begincasesx_1+x_2le 3\
        x_1-x_2ge -7\
        x_1-x_2le 3\
        x_1+x_2ge -7\
        endcases$$
        The answer is: $f(-2,5)=11$. To be verified: Original and Reformulated.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Sep 6 at 20:07









        farruhota

        15.4k2734




        15.4k2734




















            up vote
            -1
            down vote














            Minimize $2x_1 +3 vert x_2-10vert$ subject to $vert x_1+2vert + vert x_2vert ≤5$.




            It can be converted to $6$ linear programming problems:
            $$1) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) -(x_2)≤5\
            colorredx_1le -2\
            x_2le0endcases
            4) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) -(x_2)≤5\
            colorbluex_1ge -2\
            x_2le0endcases \
            2) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
            colorredx_1le -2 \
            0le x_2le10 endcases
            5) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
            colorbluex_1ge -2\
            0le x_2le10endcases\\
            3) begincases2x_1+3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
            colorredx_1le -2\
            10le x_2 endcases
            6) begincases2x_1+3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
            colorbluex_1ge -2\
            10le x_2 endcases\$$






            share|cite|improve this answer




















            • Although mathematically correct, your answer is highly inefficient. You can solve it as one linear optimization problem. See the comment of Michal Adamaszek.
              – LinAlg
              Sep 6 at 17:39











            • @LinAlg, thanks for the comment, added another answer. Left this one for reference, since it is a straightforward (though longer) method.
              – farruhota
              Sep 6 at 20:09















            up vote
            -1
            down vote














            Minimize $2x_1 +3 vert x_2-10vert$ subject to $vert x_1+2vert + vert x_2vert ≤5$.




            It can be converted to $6$ linear programming problems:
            $$1) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) -(x_2)≤5\
            colorredx_1le -2\
            x_2le0endcases
            4) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) -(x_2)≤5\
            colorbluex_1ge -2\
            x_2le0endcases \
            2) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
            colorredx_1le -2 \
            0le x_2le10 endcases
            5) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
            colorbluex_1ge -2\
            0le x_2le10endcases\\
            3) begincases2x_1+3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
            colorredx_1le -2\
            10le x_2 endcases
            6) begincases2x_1+3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
            colorbluex_1ge -2\
            10le x_2 endcases\$$






            share|cite|improve this answer




















            • Although mathematically correct, your answer is highly inefficient. You can solve it as one linear optimization problem. See the comment of Michal Adamaszek.
              – LinAlg
              Sep 6 at 17:39











            • @LinAlg, thanks for the comment, added another answer. Left this one for reference, since it is a straightforward (though longer) method.
              – farruhota
              Sep 6 at 20:09













            up vote
            -1
            down vote










            up vote
            -1
            down vote










            Minimize $2x_1 +3 vert x_2-10vert$ subject to $vert x_1+2vert + vert x_2vert ≤5$.




            It can be converted to $6$ linear programming problems:
            $$1) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) -(x_2)≤5\
            colorredx_1le -2\
            x_2le0endcases
            4) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) -(x_2)≤5\
            colorbluex_1ge -2\
            x_2le0endcases \
            2) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
            colorredx_1le -2 \
            0le x_2le10 endcases
            5) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
            colorbluex_1ge -2\
            0le x_2le10endcases\\
            3) begincases2x_1+3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
            colorredx_1le -2\
            10le x_2 endcases
            6) begincases2x_1+3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
            colorbluex_1ge -2\
            10le x_2 endcases\$$






            share|cite|improve this answer













            Minimize $2x_1 +3 vert x_2-10vert$ subject to $vert x_1+2vert + vert x_2vert ≤5$.




            It can be converted to $6$ linear programming problems:
            $$1) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) -(x_2)≤5\
            colorredx_1le -2\
            x_2le0endcases
            4) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) -(x_2)≤5\
            colorbluex_1ge -2\
            x_2le0endcases \
            2) begincases2x_1-3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
            colorredx_1le -2 \
            0le x_2le10 endcases
            5) begincases2x_1-3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
            colorbluex_1ge -2\
            0le x_2le10endcases\\
            3) begincases2x_1+3(x_2-10) to textmin\ -(x_1+2) +(x_2)≤5\
            colorredx_1le -2\
            10le x_2 endcases
            6) begincases2x_1+3(x_2-10) to textmin\ (x_1+2) +(x_2)≤5\
            colorbluex_1ge -2\
            10le x_2 endcases\$$







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered Sep 6 at 13:24









            farruhota

            15.4k2734




            15.4k2734











            • Although mathematically correct, your answer is highly inefficient. You can solve it as one linear optimization problem. See the comment of Michal Adamaszek.
              – LinAlg
              Sep 6 at 17:39











            • @LinAlg, thanks for the comment, added another answer. Left this one for reference, since it is a straightforward (though longer) method.
              – farruhota
              Sep 6 at 20:09

















            • Although mathematically correct, your answer is highly inefficient. You can solve it as one linear optimization problem. See the comment of Michal Adamaszek.
              – LinAlg
              Sep 6 at 17:39











            • @LinAlg, thanks for the comment, added another answer. Left this one for reference, since it is a straightforward (though longer) method.
              – farruhota
              Sep 6 at 20:09
















            Although mathematically correct, your answer is highly inefficient. You can solve it as one linear optimization problem. See the comment of Michal Adamaszek.
            – LinAlg
            Sep 6 at 17:39





            Although mathematically correct, your answer is highly inefficient. You can solve it as one linear optimization problem. See the comment of Michal Adamaszek.
            – LinAlg
            Sep 6 at 17:39













            @LinAlg, thanks for the comment, added another answer. Left this one for reference, since it is a straightforward (though longer) method.
            – farruhota
            Sep 6 at 20:09





            @LinAlg, thanks for the comment, added another answer. Left this one for reference, since it is a straightforward (though longer) method.
            – farruhota
            Sep 6 at 20:09


















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2907286%2fabsolute-value-in-linear-programming-problem%23new-answer', 'question_page');

            );

            Post as a guest













































































            這個網誌中的熱門文章

            How to combine Bézier curves to a surface?

            Mutual Information Always Non-negative

            Why am i infinitely getting the same tweet with the Twitter Search API?