Lagrangian method for a silmple linear programming












2












$begingroup$


I'm trying to solve a simple LP using Lagrangian method. But I don't know how to use the soloution of the dual problem to find the solution of the main LP.



I consider the following simple problem:
$$ min_{x} sum_{i=1}^n -f_ix_i $$
$$ text{s.t.}quad sum_{i=0}^n x_i=1, xge 0 $$



The general form is:
$$ min c^Tx $$
$$ text{s.t.}quad Ax=b, xge 0 $$



In my problem: $A=[1 , 1,1 cdots ,1]$,
$c=-f=[-f_1,-f_2,cdots,-f_n]^T$ and $b=1$.



The dual problem will be:
$$max ,-v$$
$$text{s.t. }A^Tv-fge 0$$



The constraint means:
$$forall ile n, , vge f_iRightarrow -vle -f_i$$
$$Rightarrow -vle min{-f_i} Rightarrow ,-v= min{-f_i}= -max f_iRightarrow v=max f_i$$



Therefore I've solved the dual problem. but what is the solution of the original problem? My question is:




In general how can I find the solution $x$ after solving the dual problem for $v$?











share|cite|improve this question









$endgroup$

















    2












    $begingroup$


    I'm trying to solve a simple LP using Lagrangian method. But I don't know how to use the soloution of the dual problem to find the solution of the main LP.



    I consider the following simple problem:
    $$ min_{x} sum_{i=1}^n -f_ix_i $$
    $$ text{s.t.}quad sum_{i=0}^n x_i=1, xge 0 $$



    The general form is:
    $$ min c^Tx $$
    $$ text{s.t.}quad Ax=b, xge 0 $$



    In my problem: $A=[1 , 1,1 cdots ,1]$,
    $c=-f=[-f_1,-f_2,cdots,-f_n]^T$ and $b=1$.



    The dual problem will be:
    $$max ,-v$$
    $$text{s.t. }A^Tv-fge 0$$



    The constraint means:
    $$forall ile n, , vge f_iRightarrow -vle -f_i$$
    $$Rightarrow -vle min{-f_i} Rightarrow ,-v= min{-f_i}= -max f_iRightarrow v=max f_i$$



    Therefore I've solved the dual problem. but what is the solution of the original problem? My question is:




    In general how can I find the solution $x$ after solving the dual problem for $v$?











    share|cite|improve this question









    $endgroup$















      2












      2








      2





      $begingroup$


      I'm trying to solve a simple LP using Lagrangian method. But I don't know how to use the soloution of the dual problem to find the solution of the main LP.



      I consider the following simple problem:
      $$ min_{x} sum_{i=1}^n -f_ix_i $$
      $$ text{s.t.}quad sum_{i=0}^n x_i=1, xge 0 $$



      The general form is:
      $$ min c^Tx $$
      $$ text{s.t.}quad Ax=b, xge 0 $$



      In my problem: $A=[1 , 1,1 cdots ,1]$,
      $c=-f=[-f_1,-f_2,cdots,-f_n]^T$ and $b=1$.



      The dual problem will be:
      $$max ,-v$$
      $$text{s.t. }A^Tv-fge 0$$



      The constraint means:
      $$forall ile n, , vge f_iRightarrow -vle -f_i$$
      $$Rightarrow -vle min{-f_i} Rightarrow ,-v= min{-f_i}= -max f_iRightarrow v=max f_i$$



      Therefore I've solved the dual problem. but what is the solution of the original problem? My question is:




      In general how can I find the solution $x$ after solving the dual problem for $v$?











      share|cite|improve this question









      $endgroup$




      I'm trying to solve a simple LP using Lagrangian method. But I don't know how to use the soloution of the dual problem to find the solution of the main LP.



      I consider the following simple problem:
      $$ min_{x} sum_{i=1}^n -f_ix_i $$
      $$ text{s.t.}quad sum_{i=0}^n x_i=1, xge 0 $$



      The general form is:
      $$ min c^Tx $$
      $$ text{s.t.}quad Ax=b, xge 0 $$



      In my problem: $A=[1 , 1,1 cdots ,1]$,
      $c=-f=[-f_1,-f_2,cdots,-f_n]^T$ and $b=1$.



      The dual problem will be:
      $$max ,-v$$
      $$text{s.t. }A^Tv-fge 0$$



      The constraint means:
      $$forall ile n, , vge f_iRightarrow -vle -f_i$$
      $$Rightarrow -vle min{-f_i} Rightarrow ,-v= min{-f_i}= -max f_iRightarrow v=max f_i$$



      Therefore I've solved the dual problem. but what is the solution of the original problem? My question is:




      In general how can I find the solution $x$ after solving the dual problem for $v$?








      optimization convex-optimization linear-programming lagrange-multiplier






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Dec 20 '18 at 5:10









      SMA.DSMA.D

      452420




      452420






















          1 Answer
          1






          active

          oldest

          votes


















          1












          $begingroup$

          Complementary Slackness Principle tells us that either the inequality $i$ in $A^Tv_{opt}-fge 0$ becomes equality or $x_i=0$. Assuming all the numbers $f_i$ are distinct and $nu_{opt}=max f_i=f_k$. Then $nu_{opt}>f_i$ for $ine k$, hence, $x_i=0$ for $ine k$. Clearly then $x_k=1$.






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            Thanks for answering. Is it similar to KKT? I didn't understand the descriptions of Wikipedia for complementary slackness.
            $endgroup$
            – SMA.D
            Dec 20 '18 at 8:50










          • $begingroup$
            @SMA.D It is a part of KKT. For inequalities $g(x)le 0$ the Lagrange function is $f(x)+u^Tg(x)$, then in KKT there is a condition that $u_i g_i(x)=0$. It is CSP.
            $endgroup$
            – A.Γ.
            Dec 20 '18 at 8:57











          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          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%2f3047180%2flagrangian-method-for-a-silmple-linear-programming%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1












          $begingroup$

          Complementary Slackness Principle tells us that either the inequality $i$ in $A^Tv_{opt}-fge 0$ becomes equality or $x_i=0$. Assuming all the numbers $f_i$ are distinct and $nu_{opt}=max f_i=f_k$. Then $nu_{opt}>f_i$ for $ine k$, hence, $x_i=0$ for $ine k$. Clearly then $x_k=1$.






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            Thanks for answering. Is it similar to KKT? I didn't understand the descriptions of Wikipedia for complementary slackness.
            $endgroup$
            – SMA.D
            Dec 20 '18 at 8:50










          • $begingroup$
            @SMA.D It is a part of KKT. For inequalities $g(x)le 0$ the Lagrange function is $f(x)+u^Tg(x)$, then in KKT there is a condition that $u_i g_i(x)=0$. It is CSP.
            $endgroup$
            – A.Γ.
            Dec 20 '18 at 8:57
















          1












          $begingroup$

          Complementary Slackness Principle tells us that either the inequality $i$ in $A^Tv_{opt}-fge 0$ becomes equality or $x_i=0$. Assuming all the numbers $f_i$ are distinct and $nu_{opt}=max f_i=f_k$. Then $nu_{opt}>f_i$ for $ine k$, hence, $x_i=0$ for $ine k$. Clearly then $x_k=1$.






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            Thanks for answering. Is it similar to KKT? I didn't understand the descriptions of Wikipedia for complementary slackness.
            $endgroup$
            – SMA.D
            Dec 20 '18 at 8:50










          • $begingroup$
            @SMA.D It is a part of KKT. For inequalities $g(x)le 0$ the Lagrange function is $f(x)+u^Tg(x)$, then in KKT there is a condition that $u_i g_i(x)=0$. It is CSP.
            $endgroup$
            – A.Γ.
            Dec 20 '18 at 8:57














          1












          1








          1





          $begingroup$

          Complementary Slackness Principle tells us that either the inequality $i$ in $A^Tv_{opt}-fge 0$ becomes equality or $x_i=0$. Assuming all the numbers $f_i$ are distinct and $nu_{opt}=max f_i=f_k$. Then $nu_{opt}>f_i$ for $ine k$, hence, $x_i=0$ for $ine k$. Clearly then $x_k=1$.






          share|cite|improve this answer









          $endgroup$



          Complementary Slackness Principle tells us that either the inequality $i$ in $A^Tv_{opt}-fge 0$ becomes equality or $x_i=0$. Assuming all the numbers $f_i$ are distinct and $nu_{opt}=max f_i=f_k$. Then $nu_{opt}>f_i$ for $ine k$, hence, $x_i=0$ for $ine k$. Clearly then $x_k=1$.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Dec 20 '18 at 7:48









          A.Γ.A.Γ.

          22.8k32656




          22.8k32656












          • $begingroup$
            Thanks for answering. Is it similar to KKT? I didn't understand the descriptions of Wikipedia for complementary slackness.
            $endgroup$
            – SMA.D
            Dec 20 '18 at 8:50










          • $begingroup$
            @SMA.D It is a part of KKT. For inequalities $g(x)le 0$ the Lagrange function is $f(x)+u^Tg(x)$, then in KKT there is a condition that $u_i g_i(x)=0$. It is CSP.
            $endgroup$
            – A.Γ.
            Dec 20 '18 at 8:57


















          • $begingroup$
            Thanks for answering. Is it similar to KKT? I didn't understand the descriptions of Wikipedia for complementary slackness.
            $endgroup$
            – SMA.D
            Dec 20 '18 at 8:50










          • $begingroup$
            @SMA.D It is a part of KKT. For inequalities $g(x)le 0$ the Lagrange function is $f(x)+u^Tg(x)$, then in KKT there is a condition that $u_i g_i(x)=0$. It is CSP.
            $endgroup$
            – A.Γ.
            Dec 20 '18 at 8:57
















          $begingroup$
          Thanks for answering. Is it similar to KKT? I didn't understand the descriptions of Wikipedia for complementary slackness.
          $endgroup$
          – SMA.D
          Dec 20 '18 at 8:50




          $begingroup$
          Thanks for answering. Is it similar to KKT? I didn't understand the descriptions of Wikipedia for complementary slackness.
          $endgroup$
          – SMA.D
          Dec 20 '18 at 8:50












          $begingroup$
          @SMA.D It is a part of KKT. For inequalities $g(x)le 0$ the Lagrange function is $f(x)+u^Tg(x)$, then in KKT there is a condition that $u_i g_i(x)=0$. It is CSP.
          $endgroup$
          – A.Γ.
          Dec 20 '18 at 8:57




          $begingroup$
          @SMA.D It is a part of KKT. For inequalities $g(x)le 0$ the Lagrange function is $f(x)+u^Tg(x)$, then in KKT there is a condition that $u_i g_i(x)=0$. It is CSP.
          $endgroup$
          – A.Γ.
          Dec 20 '18 at 8:57


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3047180%2flagrangian-method-for-a-silmple-linear-programming%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Probability when a professor distributes a quiz and homework assignment to a class of n students.

          Aardman Animations

          Are they similar matrix