Professional Documents
Culture Documents
Mohamed Kobeissi
American University of Beirut
13 février 2024
x1 + x3 + x4 + S0 = 100000
x1 + 0.5x2 + 1.08S1 = x5 + S2
min z = m
P Pm
i=1 j=1 cij xij / x11 + x12 + . . . + x1n ≤ a1
..
.
xm1 + xm2 + . . . + xmn ≤ am
x11 + x21 + . . . + xm1 ≥ b1
..
.
x1n + x2n + . . . + xmn ≥ bn
xi ≥ 0
max z = c T x (1a)
subject to
Ax = b , (1b)
x ≥ 0. (1c)
x1 x2 ... xn s1 s2 ... sm
s1 a11 a12 ... a1n 1 0 ... 0 b1
s2 a21 a22 ... a2n 0 1 ... 0 b2
.. .. .. .. .. .. .. .. .. ..
. . . . . . . . . .
sm am1 am2 ... amn 0 0 ... 1 bm
z −c1 −c2 ... −cn 0 0 ... 0 0
Mohamed Kobeissi Linear Programming
The variables will be divided into m basic variables and n − m
non-basic variables. We will act on the tableau by the rules of
Gaussian elimination, where the pivots are always chosen from
the columns corresponding to the basic variables. In our
example, x1 and x2 are non-basic variables, and s1 and s2 are
basic variables
max z = 3 x1 + 2 x2 (2a)
subject to
x1 + x2 ≤ 1 (2b)
−2 x1 + x2 ≤ 5 (2c)
x1 ≥ 0 (2d)
x2 ≥ 0 (2e)
max z = 3 x1 + 2 x2 (3a)
subject to
x1 + x2 + s1 = 1 (3b)
−2 x1 + x2 + s2 = 5 (3c)
x1 , x2 ≥ 0 (3d)
s1 , s2 ≥ 0 (3e)
x1 x2 x3 s1 s2
s1 1 0 4 1 0 8
s2 −2 1 −5 0 1 10
z −3 −1 −2 0 0 0
x1 x2 x3 s1 s2
x1 1 0 4 1 0 8
s2 0 1 3 2 1 26
z 0 −1 10 3 0 24
A = (N | B)
and
xN
Ax = b ⇔ (N | B) =b
xB
Ax = b
0 1 2 2 1
where A = and b =
1 1 2 3 1
subject to
x1 + 2x2 + s1 = 6
2x1 − x2 − 4x3 − s2 + a = 2
2x1 + x2 − 3x3 + s3 = 13
x1 , x2 , x3 ≥ 0
s1 , s2 , s3 ≥ 0
subject to
x1 + 2x2 + s1 = 6
2x1 − x2 − 4x3 − s2 + a = 2
2x1 + x2 − 3x3 + s3 = 13
x ,x ,x ≥ 0
1 2 3
s1 , s2 , s3 ≥ 0
x1 x2 x3 s1 s2 s3 a
s1 1 2 0 1 0 0 0 6
a 2 −1 −4 0 −1 0 1 2
s3 2 1 −3 0 0 1 0 13
z −2M − 3 M + 5 4M + 1 0 M 0 0 0
x1 x2 x3 s1 s2 s3 a
s1 0 5/2 2 1 1/2 0 1/2 5
x1 1 −1/2 −2 0 −1/2 0 1/2 1
s3 0 2 1 0 1 1 −1 11
z 0 7/2 −5 0 −3/2 0 1 3
x1 x2 x3 s 1 s2 s3
s1 0 5/2 2 1 1/2 0 5
x1 1 −1/2 −2 0 −1/2 0 1
s3 0 2 1 0 1 1 11
z 0 7/2 −5 0 −3/2 0 3
subject to
−2x1 + x4 − x5 + x6 ≤ −11
4x1 + 3x3 + x4 − x5 + 2x6 = 40
4x1 + x2 + 3x4 + x5 − 3x6 = 27
x1 ≥ 0, . . . , x6 ≥ 0
subject to
2x1 − x4 + x5 − x6 − s1 + a = 11
4x1 + 3x3 + x4 − x5 + 2x6 = 40
4x1 + x2 + 3x4 + x5 − 3x6 = 27
x ≥ 0, . . . , x6 ≥ 0
1
s1 , a ≥ 0
max z = cx
subject to
Ax = b , x ≥ 0
with
1 1 −1 1 0 1
A= 3 1 3 3 1 , b= 8
2 7 0 1 2 20
z is obtained by substituting by
x2 = 2 − 10x1 − 11x4 , x3 = 1 − 9x1 − 10x4 , and
x5 = 3 + 34x1 + 38x4
minimize c1 x1 + · · · + c5 x5 (4a)
subject to
x1 − x3 − x4 = bB (4b)
x2 + x3 − x5 = bC (4c)
x4 + x5 = bD (4d)
subject to
yB − yA ≤ c1 (5b)
yC − yA ≤ c2 (5c)
yC − yB ≤ c3 (5d)
yD − yB ≤ c4 (5e)
yD − yC ≤ c5 (5f)
Mohamed Kobeissi Linear Programming
The inequality constraints encode that, in a free market, we
can only maintain a price difference that does not exceed the
cost of transportation. If we charged a higher price, then
“some local guy” would immediately be able to undercut our
price by buying from us at one end of the channel, using the
channel at the same fixed channel cost, then selling at a price
lower than ours at the high-price end of the channel
minimize c T x (6a)
subject to Ax = b , x ≥ 0 (6b)
maximize y T b (7a)
subject to y A ≤ cT T
(7b)
We shall prove in the following that the minimal cost and the
maximal income coincide, i.e., that the two problems are
equivalent