SlideShare ist ein Scribd-Unternehmen logo
1 von 68
Downloaden Sie, um offline zu lesen
Review for Final Exam

                          Math 20


                      January 15, 2008



Announcements
   Final Friday, January 18, 9:15am
   ML Office Hours Wednesday (tomorrow) 10–11 and 2–3 (SC
   323)
   Old exams (and solutions) on website
Outline




                                Strictly Determined Games
   Linear Programming
                                Two-by-two
      The Corner Principle
                                non-strictly-determined
      Duality
                                games
      The Simplex Method
                                Larger, non-strictly
   The Assignment Problem       determined games
   Zero-sum Game Theory      Review of older material
The Corner Principle
Learning Objectives




          Formulate a linear programming problem
          Use the corner principle to solve an LP problem
Linear Programming
The Corner Principle




    Definition
    A linear programming problem is a constrained optimization
    problem where the objective function is linear and the constraints
    are all linear inequalities.

    Theorem (The Corner Principle)
    In any linear programming problem, the extreme values of the
    objective function, if achieved, will be achieved on a corner of the
    feasibility set.
Example
A farmer who has a 120-acre farm plants corn and wheat. The
expenses are $12 for each acre of corn planted and $24 for each
acre of wheat planted. Each acre of corn requires 32 bushels of
storage and yields a profit of $40; each acre of wheat requires 8
bushels of storage and yields a profit of $50. If the total amount of
storage available is 160 bushels and the farmer has $1200 in
capital, how many acres of corn and how many acres of wheat
should be planted to maximize profit?
Formulating the Problem


   Let x be the number of acres of corn planted and y the number of
   acres of wheat planted. Then we want to maximize

                           z = 40x + 50y   (profit)

   subject to constraints

                            x+ y ≤ 120     (land)
                          32x+ 8y ≤ 160    (storage)
                          12x+24y ≤1200    (capital)

   as well as x, y > 0.
Drawing the feasible set

            120




                                              x
                                                  +
                                                      y
                                                          ≤
                                                              12
                                                                0
             50
                                   12x
                                         +2
                  32x +




                                              4y
                                                   ≤1
             20                                               200
                        8y ≤
                             160




                  5                                                 100   120
Checking the corners




                   x    y   z = 40x + 50y
                   0    0         0
                   5    0        200
                   0   20       1000
Checking the corners




                       x    y   z = 40x + 50y
                       0    0         0
                       5    0        200
                       0   20       1000

   We should plant 20 acres of wheat and no corn.
Duality
Learning Objectives




          Given an LP problem, formulate its dual problem
          Interpret the solutions to the dual problem in terms of the
          primal problem
Duality
   Definition
   An LP problem is in standard form if it is expressed as

                    max z = c1 x1 + c2 x2 + · · · + cn xn

   subject to the constraints

                     a11 x1 + a12 x2 + · · · + a1n xn ≤ b1
                     a21 x1 + a22 x2 + · · · + a2n xn ≤ b2
                                                   ··· ···
                   am1 x1 + am2 x2 + · · · + amn xn ≤ bm
                                     x1 , x2 , . . . , xn ≥ 0

   In vector notation, an LP problem is in standard form it it reads

           max z = c x subject to constraints Ax ≤ b, x ≥ 0
Definition
Given a linear programming problem in standard form, the dual
linear programming problem is

                    min w = b1 y1 + · · · + bm ym

subject to constraints

                 a11 y1 + a21 y2 + · · · + am1 ym ≥ p1
                 a12 y1 + a22 y2 + · · · + am2 ym ≥ p2
                                              ··· ···
                 a1n y1 + a2n y2 + · · · + amn ym ≥ pn
                                     y1 , . . . , ym ≥ 0

or in vector notation,

        min w = b y subject to constraints A y ≥ c, y ≥ 0.
Example
   In a product-mix problem, the dual problem is to buy out the
   producer’s materials while minimizing total payout
   In a diet problem, the dual problem is to sell the nutrients
   (kind of weird)
   In any LP problem, the dual variables represent the marginal
   objective of each variable
   In some cases the primal problem is easier to solve.
Example
    In a product-mix problem, the dual problem is to buy out the
    producer’s materials while minimizing total payout
    In a diet problem, the dual problem is to sell the nutrients
    (kind of weird)
    In any LP problem, the dual variables represent the marginal
    objective of each variable
    In some cases the primal problem is easier to solve.

Look at Lesson 30 for a good, worked out example.
The Simplex Method
Learning Objectives




          Form tableaux and how to move between them
          Given an LP problem in standard form, solve it using the
          simplex method
          Interpret the solutions to the dual problem in terms of the
          simplex method solution for the primal problem
The Simplex Method
    1. Set up the initial tableau.
    2. Apply the optimality test. If the objective row has no negative
       entries in the columns labeled with variables, then the
       indicated solution is optimal; we can stop.
    3. Choose a pivotal column by determining the column with the
       most negative entry in the objective row. If there are several
       candidates for a pivotal column, choose any one.
    4. Choose a pivotal row. Form the ratios of the entries above the
       objective row in the rightmost column by the corresponding
       entries of the pivotal column for those entries in the pivotal
       column which are positive. The pivotal row is the row for
       which the smallest of these ratios occurs. If there is a tie,
       choose any one of the qualifying rows. If none of the entries
       in the pivotal column above the objective row is positive, the
       problem has no finite optimum. We stop.
    5. Perform pivotal elimination to construct a new tableau and
       return to Step 2.
Example



  We are going to solve the linear programming problem of
  maximizing
                         z = 2x1 − 4x2 + 5x3
  subject to constraints

                            3x1 + 2x2 + x3 ≤ 6
                           3x1 − 6x2 + 7x3 ≤ 9

  and x1 , x2 , x3 ≥ 0.
Tableau




               x1   x2   x3 u1   u2   z value
          u1    3    2    1 1     0   0     6
          u2    3   −6    7 0     1   0     9
          z −2       4 −5    0   0    1    0
Tableau




               x1     x2   x3 u1       u2   z value
          u1    3      2    1 1         0   0     6
          u2    3     −6    7 0         1   0     9
          z −2         4 −5     0      0    1    0


                    largest negative
                    coefficient in ob-
                    jective row
Tableau


                            entering variable

               x1     x2   x3 u1       u2   z value
          u1    3      2    1 1         0   0     6
          u2    3     −6    7 0         1   0     9
          z −2         4 −5     0      0    1    0


                    largest negative
                    coefficient in ob-
                    jective row
Tableau


                            entering variable

               x1     x2   x3 u1       u2   z value    θ
          u1    3      2    1 1         0   0     6    6
          u2    3     −6    7 0         1   0     9   9/7

          z −2         4 −5     0      0    1    0


                    largest negative
                    coefficient in ob-
                    jective row
Tableau


                                                        smallest positive
                            entering variable
                                                        θ-ratio
               x1     x2   x3 u1       u2   z value    θ
          u1    3      2    1 1         0   0     6    6
          u2    3     −6    7 0         1   0     9   9/7

          z −2         4 −5     0      0    1    0


                    largest negative
                    coefficient in ob-
                    jective row
Tableau


   departing variable                                   smallest positive
                            entering variable
                                                        θ-ratio
               x1     x2   x3 u1       u2   z value    θ
          u1    3      2    1 1         0   0     6    6
          u2    3     −6    7 0         1   0     9   9/7

          z −2          4 −5    0      0    1    0


                    largest negative
                    coefficient in ob-
                    jective row
Tableau


   departing variable                                         smallest positive
                            entering variable
                                                              θ-ratio
               x1     x2   x3 u1       u2    z value        θ
          u1    3      2    1 1         0    0     6        6
          u2    3     −6    7 0         1    0     9       9/7

          z −2          4 −5    0      0     1     0
                                            make this entry 1
                                            and the rest of its
                    largest negative
                                            column 0
                    coefficient in ob-
                    jective row
Tableau




               x1   x2   x3 u1   u2    z value
          u1    3    2    1 1     0    0     6
          u2    3   −6    7 0     1    0     9 ×1/7
          z −2       4 −5    0   0     1     0
                                      make this entry 1
                                      and the rest of its
                                      column 0
Tableau




                x1   x2   x3 u1    u2    z value
          u1     3    2    1 1      0    0     6
          x3   3/7 −6/7    1 0    1/7    0   9/7

          z −2       4 −5     0    0     1     0
                                        make this entry 1
                                        and the rest of its
                                        column 0
Tableau




                x1   x2   x3 u1    u2    z value
          u1     3    2    1 1      0    0     6     −1
          x3   3/7 −6/7    1 0    1/7    0   9/7

          z −2       4 −5     0    0     1     0 5
                                        make this entry 1
                                        and the rest of its
                                        column 0
Tableau




               x1     x2   x3 u1  u2    z value
          u1 18/7   20/7    0 1 −1/7    0 33/7
          x3 3/7    −6/7    1 0 1/7     0   9/7

           z −2       4 −5    0    0    1     0
                                       make this entry 1
                                       and the rest of its
                                       column 0
Tableau




               x1      x2   x3 u1  u2      z value
          u1 18/7    20/7    0 1 −1/7      0 33/7
          x3 3/7     −6/7    1 0 1/7       0   9/7

           z   1/7   −2/7   0   0   5/7    1 45/7
                                          make this entry 1
                                          and the rest of its
                                          column 0
Tableau




               x1        x2   x3 u1  u2     z value
          u1 18/7      20/7    0 1 −1/7     0 33/7
          x3 3/7       −6/7    1 0 1/7      0   9/7

           z     1/7   −2/7   0   0   5/7   1   45/7



               largest negative
               coefficient in ob-
               jective row
Tableau


                          entering variable

               x1        x2   x3 u1  u2       z value
          u1 18/7      20/7    0 1 −1/7       0 33/7
          x3 3/7       −6/7    1 0 1/7        0   9/7

           z     1/7   −2/7   0    0    5/7   1   45/7



               largest negative
               coefficient in ob-
               jective row
Tableau


                          entering variable

               x1        x2   x3 u1  u2       z value θ
          u1 18/7      20/7    0 1 −1/7       0 33/7 33/20
          x3 3/7       −6/7    1 0 1/7        0   9/7 −3/2

           z     1/7   −2/7   0    0    5/7   1   45/7



               largest negative
               coefficient in ob-
               jective row
Tableau

                                                         smallest positive
                                                         θ-ratio
                          entering variable

               x1        x2   x3 u1  u2       z value θ
          u1 18/7      20/7    0 1 −1/7       0 33/7 33/20
          x3 3/7       −6/7    1 0 1/7        0   9/7 −3/2

           z     1/7   −2/7   0    0    5/7   1   45/7



               largest negative
               coefficient in ob-
               jective row
Tableau

                                                         smallest positive
   departing variable                                    θ-ratio
                          entering variable

               x1        x2   x3 u1  u2       z value θ
          u1 18/7      20/7    0 1 −1/7       0 33/7 33/20
          x3 3/7       −6/7    1 0 1/7        0   9/7 −3/2

           z     1/7   −2/7   0    0    5/7   1   45/7



               largest negative
               coefficient in ob-
               jective row
Tableau

                                                            smallest positive
   departing variable                                       θ-ratio
                          entering variable

               x1        x2   x3 u1  u2        z value θ
          u1 18/7      20/7    0 1 −1/7        0 33/7 33/20
          x3 3/7       −6/7    1 0 1/7         0   9/7 −3/2

           z     1/7   −2/7   0    0    5/7    1   45/7



                                              make this entry 1
               largest negative
                                              and the rest of its
               coefficient in ob-
                                              column 0
               jective row
Tableau




               x1      x2   x3 u1  u2      z value
          u1 18/7    20/7    0 1 −1/7      0 33/7 ×7/20
          x3 3/7     −6/7    1 0 1/7       0   9/7

           z   1/7   −2/7   0   0   5/7    1   45/7



                                          make this entry 1
                                          and the rest of its
                                          column 0
Tableau




               x1     x2   x3 u1      u2   z value
          x2 9/10      1    0 7/20 −1/20   0 33/20
          x3 3/7    −6/7    1 0 1/7        0   9/7

          z   1/7   −2/7   0    0    5/7   1   45/7


                                           make this entry 1
                                           and the rest of its
                                           column 0
Tableau




               x1     x2   x3 u1      u2   z value
          x2 9/10      1    0 7/20 −1/20   0 33/20     6/7
          x3 3/7    −6/7    1 0 1/7        0   9/7
                                                       2/7
          z   1/7   −2/7   0    0    5/7   1   45/7


                                           make this entry 1
                                           and the rest of its
                                           column 0
Tableau




               x1     x2   x3 u1      u2   z value
          x2 9/10      1    0 7/20 −1/20   0 33/20
          x3 6/5       0    1 3/10 1/10    0 27/10
          z   1/7   −2/7   0    0    5/7   1   45/7


                                           make this entry 1
                                           and the rest of its
                                           column 0
Tableau




               x1   x2   x3 u1      u2   z value
          x2 9/10    1    0 7/20 −1/20   0 33/20
          x3 6/5     0    1 3/10 1/10    0 27/10
          z   2/5   0    0 1/10   7/10   1   69/10
Tableau




               x1   x2   x3 u1      u2   z value
          x2 9/10    1    0 7/20 −1/20   0 33/20
          x3 6/5     0    1 3/10 1/10    0 27/10
          z   2/5   0    0 1/10   7/10    1   69/10




           No more negative coefficients.
           We are done!
Tableau




               x1   x2   x3 u1      u2   z value
          x2 9/10    1    0 7/20 −1/20   0 33/20
          x3 6/5     0    1 3/10 1/10    0 27/10
          z   2/5   0    0 1/10   7/10    1   69/10




           No more negative coefficients.
           We are done!
Simplex Method and Duality




      Once the problem is solved, the entries in the objective row
      below the slack variables are the solutions to the dual problem!
      This means we can solve some LP problems by finding their
      duals and solving them instead.
Outline




                                Strictly Determined Games
   Linear Programming
                                Two-by-two
      The Corner Principle
                                non-strictly-determined
      Duality
                                games
      The Simplex Method
                                Larger, non-strictly
   The Assignment Problem       determined games
   Zero-sum Game Theory      Review of older material
The Assignment Problem
Learning Objectives




          Formulate a (linear) assignment problem
          Solve linear assignment problems using the Hungarian
          algorithm
The Assignment Problem




  Given:
      A set of “jobs” to assign to “people” (start with the same of
      each, can solve the general problem later)
      A cost of assigning each job to each person
  Find the assignment that minimizes total cost.
Mathematical Formulation
       Let C = (cij ) be the costs of assigning job j to person i
       Let X = (xij ) be 1 if person i does job j, 0 otherwise.
   The problem is to minimize
                                 n
                                        cij xij
                                i,j=1

   subject to constraint that there is exactly one 1 in each row and
   column, and the rest of the entries in each row and column are
   zero.
   The goal is to replace C with an “ideal cost matrix” with the
   properties that
       All entries are nonnegative
       There is a “sudoku pattern” of zeroes
   Then the minimal assignment(s) are clear.
The Hungarian Algorithm

   Work with C:
    1. Find the minimum entry in each row and subtract it from
       each row
    2. Find the minimum entry in each column and subtract it from
       each column. The resulting matrix is nonnegative
    3. Using lines that go all the way across or all the way
       up-and-down, cross out all zeros in the new cost matrix
    4. If you can only do this with n lines, an assignment of zeroes is
       possible.
    5. Otherwise, determine the smallest entry not covered by any
       line.
            Subtract this entry from all uncovered entries
            Add it to all double-covered entries
            Return to Step 3
Example

  A coin dealer is to sell four coins through a mail auction. Bids are
  received for each of the four coins from five bidders with
  instructions that at most one of his bids is to be honored. The bids
  are:
                                        Bids
                          Coin 1   Coin 2 Coin 3    Coin 4
             Bidder   1    $150      $65     $210    $135
             Bidder   2     175        75     230     155
             Bidder   3     135        85     200     140
             Bidder   4     140        70     190     130
             Bidder   5     170        50     200     160

  How should the dealer assign the four coins in order to maximize
  the sum of the resulting bids?
Solution




   We create a dummy coin for which each bidder bids nothing. The
   maximum bid is $230, we replace all the entries with $230 minus
   them. This changes our maximization problem into a minimization
   problem. For the entries now represent not the amount bid but the
   amount expected back from a $230 payment, and clearly the
   dealer wants to minimize the amount given back.
Non-negativizing the cost matrix

   So we have
                                    −30 −115   −40 −190
                                                     
     80   165   20 95 230 −20       60   145 0 75 210
    55   155    0 75 230         55   155 0 75 230
                                                   
                                                   
    95   145   30 90 230−30      65   115 0 60 200
                                                   
    90   160   40 100 230−40     50   120 0 60 190
                                                   

      60 180    30 70 230 −30       30   150 0 40 200
                                                   
                                    30   30 0 35 20
                                   25   40 0 35 40
                                                   
                                   35    0 0 20 10
                                                   
                                   20    5 0 20 0 
                                     0   35 0 0 10
Crossing out


                                                                     
               30   30   0   35   20           10   10   0    15   0
               25   40   0   35   40           5    20   0    15   20
                                                                     
                                                                     
               35   0    0   20   10           35    0   20   20   10
                                                                     
                                                                     
               20   5    0   20   0            20    5   20   20   0
                                                                     
                                      
               0    35   0   0    10           0    35   20   0    10
                                                                       
                                                5   10   0    10   0
                                           
                                               0   20   0    10   20   
                                                                        
                                           
                                               3   0    20   15   10   
                                                                        
                                              15   5    20   15   0    
                                                0   40   25    0   15
The answer



  Since we have the assignment of zeroes, we can read off the
  solution:
      Bidder 1 gets Coin 3
      Bidder 2 gets Coin 1
      Bidder 3 gets Coin 2
      Bidder 4 gets the dummy coin (nothing)
      Bidder 5 gets Coin 4
Outline




                                Strictly Determined Games
   Linear Programming
                                Two-by-two
      The Corner Principle
                                non-strictly-determined
      Duality
                                games
      The Simplex Method
                                Larger, non-strictly
   The Assignment Problem       determined games
   Zero-sum Game Theory      Review of older material
Zero-sum Game Theory
Learning Objectives




          Formulate a game theory problem, finding strategies and
          payoffs
          Find the optimal strategies for games
               strictly determined games
               2 × 2 non-strictly-determined games
               using the simplex method
Definitions

      A game theory problem is a contest between two players who
      “move” simultaneously
      The row player chooses among m strategies and the column
      player chooses among n strategies.
      The payoff aij is the amount paid to the row player if R
      chooses i and C chooses j (could be negative).
      A strategy vector is a probability vector representing the
      percentage of the time each strategy should be chosen:
             row player’s strategy is a row vector p
             column players strategy is a column vector q
      The expected value of these strategies is the sum
                                       n
                         E (p, q) =           pi aij qj = pAq
                                      i,j=1
Theorem (Fundamental Theorem of Zero-Sum Games)
There exist optimal strategies p∗ for R and q∗ for C such that for
all strategies p and q:

                 E (p∗ , q) ≥ E (p∗ , q∗ ) ≥ E (p, q∗ )
Theorem (Fundamental Theorem of Zero-Sum Games)
There exist optimal strategies p∗ for R and q∗ for C such that for
all strategies p and q:

                  E (p∗ , q) ≥ E (p∗ , q∗ ) ≥ E (p, q∗ )

E (p∗ , q∗ ) is called the value v of the game.
Theorem (Fundamental Theorem of Zero-Sum Games)
There exist optimal strategies p∗ for R and q∗ for C such that for
all strategies p and q:

                  E (p∗ , q) ≥ E (p∗ , q∗ ) ≥ E (p, q∗ )

E (p∗ , q∗ ) is called the value v of the game.
So the problem is to find p∗ and q∗ .
Strictly Determined Games

   Definition
   Let A be a payoff matrix.
       A saddle point is an entry ars which is the minimum entry in
       its row and the maximum entry in its column.
       A game whose payoff matrix has a saddle point is called
       strictly determined
       Payoff matrices can have multiple saddle points
Strictly Determined Games

   Definition
   Let A be a payoff matrix.
       A saddle point is an entry ars which is the minimum entry in
       its row and the maximum entry in its column.
       A game whose payoff matrix has a saddle point is called
       strictly determined
       Payoff matrices can have multiple saddle points

   Theorem
   Let A be a payoff matrix. If ars is a saddle point, then
       er (choose r all the time) is an optimal strategy for R
       es (choose s all the time) is an optimal strategy for C
Finding equilibria by gravity



      If C chose strategy 2,
      and R knew it, R would          
      definitely choose 2         1   3 
                                       
      This would make C         
                                
                                        
                                        
      choose strategy 1         
                                
                                        
                                        
      but (2, 1) is an
                                       
                                  2   4
      equilibrium, a saddle
      point.
Finding equilibria by gravity




                                         
  Here (1, 1) is an equilibrium    2   3 
  position; starting from there   
                                  
                                          
                                          
  neither player would want to
                                         
                                         
  deviate from this.
                                         
                                         
                                    1   4
Finding equilibria by gravity




                                       
                                 2   3 
                                       
  What about this one?          
                                
                                        
                                        
                                       
                                       
                                       
                                  4   1
Zero-sum Game Theory
Two-by-two non-strictly-determined games


    In this case we can compute E (p, q) by hand in terms of p1 and q1
    (see Lesson 34 for the details)
                     a22 − a21                         a22 − a12
         p1 =                              q1 =
              a11 + a22 − a21 − a22             a11 + a22 − a21 − a12
         p2 = 1 − p1                       q2 = 1 − q1

    These are in between 0 and 1 if there are no saddle points in the
    matrix.
                               a11 a22 − a12 a21
                       v=
                            a11 + a22 − a21 − a12
    To remember this, remember that q is the strategy for the column
    player. So to get q1 we take the difference between the two entries
    in the second column.
Examples



               1 3
      If A =        , then p1 = 2 ? Doesn’t work because A has a
                                0
               2 4
      saddle point.
               2 3
      If A =        , p1 = 3 ? Again, doesn’t work.
                           2
               1 4
               2    3
      If A =            , p1 = −3 = 3 , while q1 = −4 = 2 . So R
                               −4    4
                                                   −2     1
               4    1
      should pick   1 half the time and 2 the other half, while C
      should pick   1 3/4 of the time and 2 the rest.
Larger, non-strictly determined games


   Theorem
   Consider a game with payoff matrix A, where each entry of A is
   positive.
                                                 1
       The column player’s optimal strategy q is z x, where x ≥ 0
       satisfies the LP problem of maximizing z = x1 + · · · + xn
       subject to the constraints Ax ≤ 1.
                                                 1
       The row player’s optimal strategy p is is w y, where y ≥ 0
       satisfies the LP problem of minimizing w = y1 + · · · + yn
       subject to the constraint that A y ≥ 1.
       The two problems are dual to each other, so the optimal
       values of the objective are the same. The value of the game is
            1    1
       v = z = w.
Method


      By adding a constant to every entry in the payoff matrix A,
      make sure every entry is positive
      Solve the LP problem of maximizing z = x1 + · · · + xn subject
      to the constraints Ax ≤ 1.
                 1
      Then v =   z   and the entries of q are the entries of x divided
      by z
      The values of the slack variables, again divided by z, are the
      entries of p.
      The value of the game is v , minus the quantity added at the
      beginning
  See Lesson 35 and the Game Theory problem set solutions for
  details.

Weitere ähnliche Inhalte

Was ist angesagt?

X2 T05 06 Partial Fractions
X2 T05 06 Partial FractionsX2 T05 06 Partial Fractions
X2 T05 06 Partial Fractions
Nigel Simmons
 
Eight Regression Algorithms
Eight Regression AlgorithmsEight Regression Algorithms
Eight Regression Algorithms
guestfee8698
 
3rd Period Review Withanswers
3rd Period Review Withanswers3rd Period Review Withanswers
3rd Period Review Withanswers
beremontalvo
 

Was ist angesagt? (20)

Lesson 18: Graphing
Lesson 18: GraphingLesson 18: Graphing
Lesson 18: Graphing
 
09 sistema de equação do primeiro grau
09 sistema de equação do primeiro grau09 sistema de equação do primeiro grau
09 sistema de equação do primeiro grau
 
X2 T05 06 Partial Fractions
X2 T05 06 Partial FractionsX2 T05 06 Partial Fractions
X2 T05 06 Partial Fractions
 
Problemas de estadistica
Problemas de estadisticaProblemas de estadistica
Problemas de estadistica
 
8-6 Solving Rational Functions
8-6 Solving Rational Functions8-6 Solving Rational Functions
8-6 Solving Rational Functions
 
T tests anovas and regression
T tests anovas and regressionT tests anovas and regression
T tests anovas and regression
 
05. s3 ecuaciones polinómicas
05. s3 ecuaciones polinómicas05. s3 ecuaciones polinómicas
05. s3 ecuaciones polinómicas
 
Eight Regression Algorithms
Eight Regression AlgorithmsEight Regression Algorithms
Eight Regression Algorithms
 
Chap 1
Chap 1Chap 1
Chap 1
 
06. s4 inecuaciones polinómicas y racionales
06. s4 inecuaciones polinómicas y racionales06. s4 inecuaciones polinómicas y racionales
06. s4 inecuaciones polinómicas y racionales
 
Wordproblem
WordproblemWordproblem
Wordproblem
 
Lesson32 Second Order Difference Equations Slides
Lesson32   Second Order Difference Equations SlidesLesson32   Second Order Difference Equations Slides
Lesson32 Second Order Difference Equations Slides
 
Lesson 25: Unconstrained Optimization I
Lesson 25: Unconstrained Optimization ILesson 25: Unconstrained Optimization I
Lesson 25: Unconstrained Optimization I
 
Inequalities
InequalitiesInequalities
Inequalities
 
Lesson31 Higher Dimensional First Order Difference Equations Slides
Lesson31   Higher Dimensional First Order Difference Equations SlidesLesson31   Higher Dimensional First Order Difference Equations Slides
Lesson31 Higher Dimensional First Order Difference Equations Slides
 
Lesson29 Intro To Difference Equations Slides
Lesson29   Intro To Difference Equations SlidesLesson29   Intro To Difference Equations Slides
Lesson29 Intro To Difference Equations Slides
 
3rd Period Review Withanswers
3rd Period Review Withanswers3rd Period Review Withanswers
3rd Period Review Withanswers
 
Branch&bound at
Branch&bound atBranch&bound at
Branch&bound at
 
Lesson 12: Linear Independence
Lesson 12: Linear IndependenceLesson 12: Linear Independence
Lesson 12: Linear Independence
 
Ecuaciones cuadráticas completas
Ecuaciones cuadráticas completasEcuaciones cuadráticas completas
Ecuaciones cuadráticas completas
 

Andere mochten auch

Lesson34 Intro To Game Theory Slides
Lesson34    Intro To  Game  Theory SlidesLesson34    Intro To  Game  Theory Slides
Lesson34 Intro To Game Theory Slides
Matthew Leingang
 
Lesson 1: Coordinates and Distance
Lesson 1: Coordinates and DistanceLesson 1: Coordinates and Distance
Lesson 1: Coordinates and Distance
Matthew Leingang
 
Unit 5 Fourth Grade 2012 2013
Unit 5 Fourth Grade 2012 2013Unit 5 Fourth Grade 2012 2013
Unit 5 Fourth Grade 2012 2013
Isaac_Schools_5
 

Andere mochten auch (20)

Final exam review
Final exam review Final exam review
Final exam review
 
Lesson 3: Continuity
Lesson 3: ContinuityLesson 3: Continuity
Lesson 3: Continuity
 
Final Exam Review (Integration)
Final Exam Review (Integration)Final Exam Review (Integration)
Final Exam Review (Integration)
 
Lesson34 Intro To Game Theory Slides
Lesson34    Intro To  Game  Theory SlidesLesson34    Intro To  Game  Theory Slides
Lesson34 Intro To Game Theory Slides
 
Lesson 1: The Tangent and Velocity Problems
Lesson 1: The Tangent and Velocity ProblemsLesson 1: The Tangent and Velocity Problems
Lesson 1: The Tangent and Velocity Problems
 
Lesson 6: The derivative as a function
Lesson 6: The derivative as a functionLesson 6: The derivative as a function
Lesson 6: The derivative as a function
 
Lesson 5: Tangents, Velocity, the Derivative
Lesson 5: Tangents, Velocity, the DerivativeLesson 5: Tangents, Velocity, the Derivative
Lesson 5: Tangents, Velocity, the Derivative
 
Lesson 32: Simplex Method II
Lesson 32: Simplex Method IILesson 32: Simplex Method II
Lesson 32: Simplex Method II
 
Introduction to Math 1a
Introduction to Math 1aIntroduction to Math 1a
Introduction to Math 1a
 
7th grade- First Exam Topics
7th grade- First Exam Topics7th grade- First Exam Topics
7th grade- First Exam Topics
 
Lesson 1: Coordinates and Distance
Lesson 1: Coordinates and DistanceLesson 1: Coordinates and Distance
Lesson 1: Coordinates and Distance
 
Unit 5 Fourth Grade 2012 2013
Unit 5 Fourth Grade 2012 2013Unit 5 Fourth Grade 2012 2013
Unit 5 Fourth Grade 2012 2013
 
Surface treatment technologies
Surface treatment technologiesSurface treatment technologies
Surface treatment technologies
 
Lesson 3: The Cross Product
Lesson 3: The Cross ProductLesson 3: The Cross Product
Lesson 3: The Cross Product
 
للصف السادس الابتدائى الترم الأول لغات Maths
للصف السادس الابتدائى الترم الأول لغات  Mathsللصف السادس الابتدائى الترم الأول لغات  Maths
للصف السادس الابتدائى الترم الأول لغات Maths
 
Math booklet first term p6
Math booklet first term p6Math booklet first term p6
Math booklet first term p6
 
Lesson 31: The Simplex Method, I
Lesson 31: The Simplex Method, ILesson 31: The Simplex Method, I
Lesson 31: The Simplex Method, I
 
Lesson 7: What does f' say about f?
Lesson 7: What does f' say about f?Lesson 7: What does f' say about f?
Lesson 7: What does f' say about f?
 
Lesson 5: Functions and surfaces
Lesson 5: Functions and surfacesLesson 5: Functions and surfaces
Lesson 5: Functions and surfaces
 
Lesson 4: Limits Involving Infinity
Lesson 4: Limits Involving InfinityLesson 4: Limits Involving Infinity
Lesson 4: Limits Involving Infinity
 

Ähnlich wie Review for final exam

UPSEE - Mathematics -2004 Unsolved Paper
UPSEE - Mathematics -2004 Unsolved PaperUPSEE - Mathematics -2004 Unsolved Paper
UPSEE - Mathematics -2004 Unsolved Paper
Vasista Vinuthan
 
UPSEE - Mathematics -1999 Unsolved Paper
UPSEE - Mathematics -1999 Unsolved PaperUPSEE - Mathematics -1999 Unsolved Paper
UPSEE - Mathematics -1999 Unsolved Paper
Vasista Vinuthan
 

Ähnlich wie Review for final exam (20)

Lp simplex 3_
Lp simplex 3_Lp simplex 3_
Lp simplex 3_
 
Lesson 26: Optimization II: Data Fitting
Lesson 26: Optimization II: Data FittingLesson 26: Optimization II: Data Fitting
Lesson 26: Optimization II: Data Fitting
 
Lesson 27: Lagrange Multipliers I
Lesson 27: Lagrange Multipliers ILesson 27: Lagrange Multipliers I
Lesson 27: Lagrange Multipliers I
 
9-5 Notes
9-5 Notes9-5 Notes
9-5 Notes
 
Dual formulation example
Dual formulation exampleDual formulation example
Dual formulation example
 
AMU - Mathematics - 1999
AMU - Mathematics  - 1999AMU - Mathematics  - 1999
AMU - Mathematics - 1999
 
UPSEE - Mathematics -2004 Unsolved Paper
UPSEE - Mathematics -2004 Unsolved PaperUPSEE - Mathematics -2004 Unsolved Paper
UPSEE - Mathematics -2004 Unsolved Paper
 
Lesson 17: The Method of Lagrange Multipliers
Lesson 17: The Method of Lagrange MultipliersLesson 17: The Method of Lagrange Multipliers
Lesson 17: The Method of Lagrange Multipliers
 
Quadratic equations
Quadratic equationsQuadratic equations
Quadratic equations
 
Lesson 11: Limits and Continuity
Lesson 11: Limits and ContinuityLesson 11: Limits and Continuity
Lesson 11: Limits and Continuity
 
Q2
Q2Q2
Q2
 
AMU - Mathematics - 1996
AMU - Mathematics  - 1996AMU - Mathematics  - 1996
AMU - Mathematics - 1996
 
UPSEE - Mathematics -1999 Unsolved Paper
UPSEE - Mathematics -1999 Unsolved PaperUPSEE - Mathematics -1999 Unsolved Paper
UPSEE - Mathematics -1999 Unsolved Paper
 
AMU - Mathematics - 1997
AMU - Mathematics  - 1997AMU - Mathematics  - 1997
AMU - Mathematics - 1997
 
Lesson 13: Rank and Solutions to Systems of Linear Equations
Lesson 13: Rank and Solutions to Systems of Linear EquationsLesson 13: Rank and Solutions to Systems of Linear Equations
Lesson 13: Rank and Solutions to Systems of Linear Equations
 
Linearprog, Reading Materials for Operational Research
Linearprog, Reading Materials for Operational Research Linearprog, Reading Materials for Operational Research
Linearprog, Reading Materials for Operational Research
 
Duality
DualityDuality
Duality
 
Mth 4108-1 c
Mth 4108-1 cMth 4108-1 c
Mth 4108-1 c
 
Mth 4108-1 c
Mth 4108-1 cMth 4108-1 c
Mth 4108-1 c
 
Proj 8 Tanya Graded
Proj 8 Tanya GradedProj 8 Tanya Graded
Proj 8 Tanya Graded
 

Mehr von Matthew Leingang

Mehr von Matthew Leingang (20)

Making Lesson Plans
Making Lesson PlansMaking Lesson Plans
Making Lesson Plans
 
Streamlining assessment, feedback, and archival with auto-multiple-choice
Streamlining assessment, feedback, and archival with auto-multiple-choiceStreamlining assessment, feedback, and archival with auto-multiple-choice
Streamlining assessment, feedback, and archival with auto-multiple-choice
 
Electronic Grading of Paper Assessments
Electronic Grading of Paper AssessmentsElectronic Grading of Paper Assessments
Electronic Grading of Paper Assessments
 
Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)
 
Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)
 
Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)
 
Lesson 27: Integration by Substitution (handout)
Lesson 27: Integration by Substitution (handout)Lesson 27: Integration by Substitution (handout)
Lesson 27: Integration by Substitution (handout)
 
Lesson 26: The Fundamental Theorem of Calculus (handout)
Lesson 26: The Fundamental Theorem of Calculus (handout)Lesson 26: The Fundamental Theorem of Calculus (handout)
Lesson 26: The Fundamental Theorem of Calculus (handout)
 
Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)
 
Lesson 25: Evaluating Definite Integrals (handout)
Lesson 25: Evaluating Definite Integrals (handout)Lesson 25: Evaluating Definite Integrals (handout)
Lesson 25: Evaluating Definite Integrals (handout)
 
Lesson 24: Areas and Distances, The Definite Integral (handout)
Lesson 24: Areas and Distances, The Definite Integral (handout)Lesson 24: Areas and Distances, The Definite Integral (handout)
Lesson 24: Areas and Distances, The Definite Integral (handout)
 
Lesson 24: Areas and Distances, The Definite Integral (slides)
Lesson 24: Areas and Distances, The Definite Integral (slides)Lesson 24: Areas and Distances, The Definite Integral (slides)
Lesson 24: Areas and Distances, The Definite Integral (slides)
 
Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)
 
Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)
 
Lesson 22: Optimization Problems (slides)
Lesson 22: Optimization Problems (slides)Lesson 22: Optimization Problems (slides)
Lesson 22: Optimization Problems (slides)
 
Lesson 22: Optimization Problems (handout)
Lesson 22: Optimization Problems (handout)Lesson 22: Optimization Problems (handout)
Lesson 22: Optimization Problems (handout)
 
Lesson 21: Curve Sketching (slides)
Lesson 21: Curve Sketching (slides)Lesson 21: Curve Sketching (slides)
Lesson 21: Curve Sketching (slides)
 
Lesson 21: Curve Sketching (handout)
Lesson 21: Curve Sketching (handout)Lesson 21: Curve Sketching (handout)
Lesson 21: Curve Sketching (handout)
 
Lesson 20: Derivatives and the Shapes of Curves (slides)
Lesson 20: Derivatives and the Shapes of Curves (slides)Lesson 20: Derivatives and the Shapes of Curves (slides)
Lesson 20: Derivatives and the Shapes of Curves (slides)
 
Lesson 20: Derivatives and the Shapes of Curves (handout)
Lesson 20: Derivatives and the Shapes of Curves (handout)Lesson 20: Derivatives and the Shapes of Curves (handout)
Lesson 20: Derivatives and the Shapes of Curves (handout)
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Review for final exam

  • 1. Review for Final Exam Math 20 January 15, 2008 Announcements Final Friday, January 18, 9:15am ML Office Hours Wednesday (tomorrow) 10–11 and 2–3 (SC 323) Old exams (and solutions) on website
  • 2. Outline Strictly Determined Games Linear Programming Two-by-two The Corner Principle non-strictly-determined Duality games The Simplex Method Larger, non-strictly The Assignment Problem determined games Zero-sum Game Theory Review of older material
  • 3. The Corner Principle Learning Objectives Formulate a linear programming problem Use the corner principle to solve an LP problem
  • 4. Linear Programming The Corner Principle Definition A linear programming problem is a constrained optimization problem where the objective function is linear and the constraints are all linear inequalities. Theorem (The Corner Principle) In any linear programming problem, the extreme values of the objective function, if achieved, will be achieved on a corner of the feasibility set.
  • 5. Example A farmer who has a 120-acre farm plants corn and wheat. The expenses are $12 for each acre of corn planted and $24 for each acre of wheat planted. Each acre of corn requires 32 bushels of storage and yields a profit of $40; each acre of wheat requires 8 bushels of storage and yields a profit of $50. If the total amount of storage available is 160 bushels and the farmer has $1200 in capital, how many acres of corn and how many acres of wheat should be planted to maximize profit?
  • 6. Formulating the Problem Let x be the number of acres of corn planted and y the number of acres of wheat planted. Then we want to maximize z = 40x + 50y (profit) subject to constraints x+ y ≤ 120 (land) 32x+ 8y ≤ 160 (storage) 12x+24y ≤1200 (capital) as well as x, y > 0.
  • 7. Drawing the feasible set 120 x + y ≤ 12 0 50 12x +2 32x + 4y ≤1 20 200 8y ≤ 160 5 100 120
  • 8. Checking the corners x y z = 40x + 50y 0 0 0 5 0 200 0 20 1000
  • 9. Checking the corners x y z = 40x + 50y 0 0 0 5 0 200 0 20 1000 We should plant 20 acres of wheat and no corn.
  • 10. Duality Learning Objectives Given an LP problem, formulate its dual problem Interpret the solutions to the dual problem in terms of the primal problem
  • 11. Duality Definition An LP problem is in standard form if it is expressed as max z = c1 x1 + c2 x2 + · · · + cn xn subject to the constraints a11 x1 + a12 x2 + · · · + a1n xn ≤ b1 a21 x1 + a22 x2 + · · · + a2n xn ≤ b2 ··· ··· am1 x1 + am2 x2 + · · · + amn xn ≤ bm x1 , x2 , . . . , xn ≥ 0 In vector notation, an LP problem is in standard form it it reads max z = c x subject to constraints Ax ≤ b, x ≥ 0
  • 12. Definition Given a linear programming problem in standard form, the dual linear programming problem is min w = b1 y1 + · · · + bm ym subject to constraints a11 y1 + a21 y2 + · · · + am1 ym ≥ p1 a12 y1 + a22 y2 + · · · + am2 ym ≥ p2 ··· ··· a1n y1 + a2n y2 + · · · + amn ym ≥ pn y1 , . . . , ym ≥ 0 or in vector notation, min w = b y subject to constraints A y ≥ c, y ≥ 0.
  • 13. Example In a product-mix problem, the dual problem is to buy out the producer’s materials while minimizing total payout In a diet problem, the dual problem is to sell the nutrients (kind of weird) In any LP problem, the dual variables represent the marginal objective of each variable In some cases the primal problem is easier to solve.
  • 14. Example In a product-mix problem, the dual problem is to buy out the producer’s materials while minimizing total payout In a diet problem, the dual problem is to sell the nutrients (kind of weird) In any LP problem, the dual variables represent the marginal objective of each variable In some cases the primal problem is easier to solve. Look at Lesson 30 for a good, worked out example.
  • 15. The Simplex Method Learning Objectives Form tableaux and how to move between them Given an LP problem in standard form, solve it using the simplex method Interpret the solutions to the dual problem in terms of the simplex method solution for the primal problem
  • 16. The Simplex Method 1. Set up the initial tableau. 2. Apply the optimality test. If the objective row has no negative entries in the columns labeled with variables, then the indicated solution is optimal; we can stop. 3. Choose a pivotal column by determining the column with the most negative entry in the objective row. If there are several candidates for a pivotal column, choose any one. 4. Choose a pivotal row. Form the ratios of the entries above the objective row in the rightmost column by the corresponding entries of the pivotal column for those entries in the pivotal column which are positive. The pivotal row is the row for which the smallest of these ratios occurs. If there is a tie, choose any one of the qualifying rows. If none of the entries in the pivotal column above the objective row is positive, the problem has no finite optimum. We stop. 5. Perform pivotal elimination to construct a new tableau and return to Step 2.
  • 17. Example We are going to solve the linear programming problem of maximizing z = 2x1 − 4x2 + 5x3 subject to constraints 3x1 + 2x2 + x3 ≤ 6 3x1 − 6x2 + 7x3 ≤ 9 and x1 , x2 , x3 ≥ 0.
  • 18. Tableau x1 x2 x3 u1 u2 z value u1 3 2 1 1 0 0 6 u2 3 −6 7 0 1 0 9 z −2 4 −5 0 0 1 0
  • 19. Tableau x1 x2 x3 u1 u2 z value u1 3 2 1 1 0 0 6 u2 3 −6 7 0 1 0 9 z −2 4 −5 0 0 1 0 largest negative coefficient in ob- jective row
  • 20. Tableau entering variable x1 x2 x3 u1 u2 z value u1 3 2 1 1 0 0 6 u2 3 −6 7 0 1 0 9 z −2 4 −5 0 0 1 0 largest negative coefficient in ob- jective row
  • 21. Tableau entering variable x1 x2 x3 u1 u2 z value θ u1 3 2 1 1 0 0 6 6 u2 3 −6 7 0 1 0 9 9/7 z −2 4 −5 0 0 1 0 largest negative coefficient in ob- jective row
  • 22. Tableau smallest positive entering variable θ-ratio x1 x2 x3 u1 u2 z value θ u1 3 2 1 1 0 0 6 6 u2 3 −6 7 0 1 0 9 9/7 z −2 4 −5 0 0 1 0 largest negative coefficient in ob- jective row
  • 23. Tableau departing variable smallest positive entering variable θ-ratio x1 x2 x3 u1 u2 z value θ u1 3 2 1 1 0 0 6 6 u2 3 −6 7 0 1 0 9 9/7 z −2 4 −5 0 0 1 0 largest negative coefficient in ob- jective row
  • 24. Tableau departing variable smallest positive entering variable θ-ratio x1 x2 x3 u1 u2 z value θ u1 3 2 1 1 0 0 6 6 u2 3 −6 7 0 1 0 9 9/7 z −2 4 −5 0 0 1 0 make this entry 1 and the rest of its largest negative column 0 coefficient in ob- jective row
  • 25. Tableau x1 x2 x3 u1 u2 z value u1 3 2 1 1 0 0 6 u2 3 −6 7 0 1 0 9 ×1/7 z −2 4 −5 0 0 1 0 make this entry 1 and the rest of its column 0
  • 26. Tableau x1 x2 x3 u1 u2 z value u1 3 2 1 1 0 0 6 x3 3/7 −6/7 1 0 1/7 0 9/7 z −2 4 −5 0 0 1 0 make this entry 1 and the rest of its column 0
  • 27. Tableau x1 x2 x3 u1 u2 z value u1 3 2 1 1 0 0 6 −1 x3 3/7 −6/7 1 0 1/7 0 9/7 z −2 4 −5 0 0 1 0 5 make this entry 1 and the rest of its column 0
  • 28. Tableau x1 x2 x3 u1 u2 z value u1 18/7 20/7 0 1 −1/7 0 33/7 x3 3/7 −6/7 1 0 1/7 0 9/7 z −2 4 −5 0 0 1 0 make this entry 1 and the rest of its column 0
  • 29. Tableau x1 x2 x3 u1 u2 z value u1 18/7 20/7 0 1 −1/7 0 33/7 x3 3/7 −6/7 1 0 1/7 0 9/7 z 1/7 −2/7 0 0 5/7 1 45/7 make this entry 1 and the rest of its column 0
  • 30. Tableau x1 x2 x3 u1 u2 z value u1 18/7 20/7 0 1 −1/7 0 33/7 x3 3/7 −6/7 1 0 1/7 0 9/7 z 1/7 −2/7 0 0 5/7 1 45/7 largest negative coefficient in ob- jective row
  • 31. Tableau entering variable x1 x2 x3 u1 u2 z value u1 18/7 20/7 0 1 −1/7 0 33/7 x3 3/7 −6/7 1 0 1/7 0 9/7 z 1/7 −2/7 0 0 5/7 1 45/7 largest negative coefficient in ob- jective row
  • 32. Tableau entering variable x1 x2 x3 u1 u2 z value θ u1 18/7 20/7 0 1 −1/7 0 33/7 33/20 x3 3/7 −6/7 1 0 1/7 0 9/7 −3/2 z 1/7 −2/7 0 0 5/7 1 45/7 largest negative coefficient in ob- jective row
  • 33. Tableau smallest positive θ-ratio entering variable x1 x2 x3 u1 u2 z value θ u1 18/7 20/7 0 1 −1/7 0 33/7 33/20 x3 3/7 −6/7 1 0 1/7 0 9/7 −3/2 z 1/7 −2/7 0 0 5/7 1 45/7 largest negative coefficient in ob- jective row
  • 34. Tableau smallest positive departing variable θ-ratio entering variable x1 x2 x3 u1 u2 z value θ u1 18/7 20/7 0 1 −1/7 0 33/7 33/20 x3 3/7 −6/7 1 0 1/7 0 9/7 −3/2 z 1/7 −2/7 0 0 5/7 1 45/7 largest negative coefficient in ob- jective row
  • 35. Tableau smallest positive departing variable θ-ratio entering variable x1 x2 x3 u1 u2 z value θ u1 18/7 20/7 0 1 −1/7 0 33/7 33/20 x3 3/7 −6/7 1 0 1/7 0 9/7 −3/2 z 1/7 −2/7 0 0 5/7 1 45/7 make this entry 1 largest negative and the rest of its coefficient in ob- column 0 jective row
  • 36. Tableau x1 x2 x3 u1 u2 z value u1 18/7 20/7 0 1 −1/7 0 33/7 ×7/20 x3 3/7 −6/7 1 0 1/7 0 9/7 z 1/7 −2/7 0 0 5/7 1 45/7 make this entry 1 and the rest of its column 0
  • 37. Tableau x1 x2 x3 u1 u2 z value x2 9/10 1 0 7/20 −1/20 0 33/20 x3 3/7 −6/7 1 0 1/7 0 9/7 z 1/7 −2/7 0 0 5/7 1 45/7 make this entry 1 and the rest of its column 0
  • 38. Tableau x1 x2 x3 u1 u2 z value x2 9/10 1 0 7/20 −1/20 0 33/20 6/7 x3 3/7 −6/7 1 0 1/7 0 9/7 2/7 z 1/7 −2/7 0 0 5/7 1 45/7 make this entry 1 and the rest of its column 0
  • 39. Tableau x1 x2 x3 u1 u2 z value x2 9/10 1 0 7/20 −1/20 0 33/20 x3 6/5 0 1 3/10 1/10 0 27/10 z 1/7 −2/7 0 0 5/7 1 45/7 make this entry 1 and the rest of its column 0
  • 40. Tableau x1 x2 x3 u1 u2 z value x2 9/10 1 0 7/20 −1/20 0 33/20 x3 6/5 0 1 3/10 1/10 0 27/10 z 2/5 0 0 1/10 7/10 1 69/10
  • 41. Tableau x1 x2 x3 u1 u2 z value x2 9/10 1 0 7/20 −1/20 0 33/20 x3 6/5 0 1 3/10 1/10 0 27/10 z 2/5 0 0 1/10 7/10 1 69/10 No more negative coefficients. We are done!
  • 42. Tableau x1 x2 x3 u1 u2 z value x2 9/10 1 0 7/20 −1/20 0 33/20 x3 6/5 0 1 3/10 1/10 0 27/10 z 2/5 0 0 1/10 7/10 1 69/10 No more negative coefficients. We are done!
  • 43. Simplex Method and Duality Once the problem is solved, the entries in the objective row below the slack variables are the solutions to the dual problem! This means we can solve some LP problems by finding their duals and solving them instead.
  • 44. Outline Strictly Determined Games Linear Programming Two-by-two The Corner Principle non-strictly-determined Duality games The Simplex Method Larger, non-strictly The Assignment Problem determined games Zero-sum Game Theory Review of older material
  • 45. The Assignment Problem Learning Objectives Formulate a (linear) assignment problem Solve linear assignment problems using the Hungarian algorithm
  • 46. The Assignment Problem Given: A set of “jobs” to assign to “people” (start with the same of each, can solve the general problem later) A cost of assigning each job to each person Find the assignment that minimizes total cost.
  • 47. Mathematical Formulation Let C = (cij ) be the costs of assigning job j to person i Let X = (xij ) be 1 if person i does job j, 0 otherwise. The problem is to minimize n cij xij i,j=1 subject to constraint that there is exactly one 1 in each row and column, and the rest of the entries in each row and column are zero. The goal is to replace C with an “ideal cost matrix” with the properties that All entries are nonnegative There is a “sudoku pattern” of zeroes Then the minimal assignment(s) are clear.
  • 48. The Hungarian Algorithm Work with C: 1. Find the minimum entry in each row and subtract it from each row 2. Find the minimum entry in each column and subtract it from each column. The resulting matrix is nonnegative 3. Using lines that go all the way across or all the way up-and-down, cross out all zeros in the new cost matrix 4. If you can only do this with n lines, an assignment of zeroes is possible. 5. Otherwise, determine the smallest entry not covered by any line. Subtract this entry from all uncovered entries Add it to all double-covered entries Return to Step 3
  • 49. Example A coin dealer is to sell four coins through a mail auction. Bids are received for each of the four coins from five bidders with instructions that at most one of his bids is to be honored. The bids are: Bids Coin 1 Coin 2 Coin 3 Coin 4 Bidder 1 $150 $65 $210 $135 Bidder 2 175 75 230 155 Bidder 3 135 85 200 140 Bidder 4 140 70 190 130 Bidder 5 170 50 200 160 How should the dealer assign the four coins in order to maximize the sum of the resulting bids?
  • 50. Solution We create a dummy coin for which each bidder bids nothing. The maximum bid is $230, we replace all the entries with $230 minus them. This changes our maximization problem into a minimization problem. For the entries now represent not the amount bid but the amount expected back from a $230 payment, and clearly the dealer wants to minimize the amount given back.
  • 51. Non-negativizing the cost matrix So we have −30 −115 −40 −190     80 165 20 95 230 −20 60 145 0 75 210 55 155 0 75 230 55 155 0 75 230         95 145 30 90 230−30 65 115 0 60 200     90 160 40 100 230−40 50 120 0 60 190     60 180 30 70 230 −30 30 150 0 40 200   30 30 0 35 20 25 40 0 35 40   35 0 0 20 10   20 5 0 20 0  0 35 0 0 10
  • 52. Crossing out     30 30 0 35 20 10 10 0 15 0 25 40 0 35 40 5 20 0 15 20         35 0 0 20 10 35 0 20 20 10         20 5 0 20 0 20 5 20 20 0       0 35 0 0 10 0 35 20 0 10   5 10 0 10 0   0 20 0 10 20     3 0 20 15 10    15 5 20 15 0  0 40 25 0 15
  • 53. The answer Since we have the assignment of zeroes, we can read off the solution: Bidder 1 gets Coin 3 Bidder 2 gets Coin 1 Bidder 3 gets Coin 2 Bidder 4 gets the dummy coin (nothing) Bidder 5 gets Coin 4
  • 54. Outline Strictly Determined Games Linear Programming Two-by-two The Corner Principle non-strictly-determined Duality games The Simplex Method Larger, non-strictly The Assignment Problem determined games Zero-sum Game Theory Review of older material
  • 55. Zero-sum Game Theory Learning Objectives Formulate a game theory problem, finding strategies and payoffs Find the optimal strategies for games strictly determined games 2 × 2 non-strictly-determined games using the simplex method
  • 56. Definitions A game theory problem is a contest between two players who “move” simultaneously The row player chooses among m strategies and the column player chooses among n strategies. The payoff aij is the amount paid to the row player if R chooses i and C chooses j (could be negative). A strategy vector is a probability vector representing the percentage of the time each strategy should be chosen: row player’s strategy is a row vector p column players strategy is a column vector q The expected value of these strategies is the sum n E (p, q) = pi aij qj = pAq i,j=1
  • 57. Theorem (Fundamental Theorem of Zero-Sum Games) There exist optimal strategies p∗ for R and q∗ for C such that for all strategies p and q: E (p∗ , q) ≥ E (p∗ , q∗ ) ≥ E (p, q∗ )
  • 58. Theorem (Fundamental Theorem of Zero-Sum Games) There exist optimal strategies p∗ for R and q∗ for C such that for all strategies p and q: E (p∗ , q) ≥ E (p∗ , q∗ ) ≥ E (p, q∗ ) E (p∗ , q∗ ) is called the value v of the game.
  • 59. Theorem (Fundamental Theorem of Zero-Sum Games) There exist optimal strategies p∗ for R and q∗ for C such that for all strategies p and q: E (p∗ , q) ≥ E (p∗ , q∗ ) ≥ E (p, q∗ ) E (p∗ , q∗ ) is called the value v of the game. So the problem is to find p∗ and q∗ .
  • 60. Strictly Determined Games Definition Let A be a payoff matrix. A saddle point is an entry ars which is the minimum entry in its row and the maximum entry in its column. A game whose payoff matrix has a saddle point is called strictly determined Payoff matrices can have multiple saddle points
  • 61. Strictly Determined Games Definition Let A be a payoff matrix. A saddle point is an entry ars which is the minimum entry in its row and the maximum entry in its column. A game whose payoff matrix has a saddle point is called strictly determined Payoff matrices can have multiple saddle points Theorem Let A be a payoff matrix. If ars is a saddle point, then er (choose r all the time) is an optimal strategy for R es (choose s all the time) is an optimal strategy for C
  • 62. Finding equilibria by gravity If C chose strategy 2, and R knew it, R would   definitely choose 2  1 3    This would make C     choose strategy 1     but (2, 1) is an   2 4 equilibrium, a saddle point.
  • 63. Finding equilibria by gravity   Here (1, 1) is an equilibrium  2 3  position; starting from there     neither player would want to     deviate from this.     1 4
  • 64. Finding equilibria by gravity    2 3    What about this one?           4 1
  • 65. Zero-sum Game Theory Two-by-two non-strictly-determined games In this case we can compute E (p, q) by hand in terms of p1 and q1 (see Lesson 34 for the details) a22 − a21 a22 − a12 p1 = q1 = a11 + a22 − a21 − a22 a11 + a22 − a21 − a12 p2 = 1 − p1 q2 = 1 − q1 These are in between 0 and 1 if there are no saddle points in the matrix. a11 a22 − a12 a21 v= a11 + a22 − a21 − a12 To remember this, remember that q is the strategy for the column player. So to get q1 we take the difference between the two entries in the second column.
  • 66. Examples 1 3 If A = , then p1 = 2 ? Doesn’t work because A has a 0 2 4 saddle point. 2 3 If A = , p1 = 3 ? Again, doesn’t work. 2 1 4 2 3 If A = , p1 = −3 = 3 , while q1 = −4 = 2 . So R −4 4 −2 1 4 1 should pick 1 half the time and 2 the other half, while C should pick 1 3/4 of the time and 2 the rest.
  • 67. Larger, non-strictly determined games Theorem Consider a game with payoff matrix A, where each entry of A is positive. 1 The column player’s optimal strategy q is z x, where x ≥ 0 satisfies the LP problem of maximizing z = x1 + · · · + xn subject to the constraints Ax ≤ 1. 1 The row player’s optimal strategy p is is w y, where y ≥ 0 satisfies the LP problem of minimizing w = y1 + · · · + yn subject to the constraint that A y ≥ 1. The two problems are dual to each other, so the optimal values of the objective are the same. The value of the game is 1 1 v = z = w.
  • 68. Method By adding a constant to every entry in the payoff matrix A, make sure every entry is positive Solve the LP problem of maximizing z = x1 + · · · + xn subject to the constraints Ax ≤ 1. 1 Then v = z and the entries of q are the entries of x divided by z The values of the slack variables, again divided by z, are the entries of p. The value of the game is v , minus the quantity added at the beginning See Lesson 35 and the Game Theory problem set solutions for details.