Three people denoted by P1, P2, P3 intend to buy some rolls, buns, cakes and bread. Each of them needs these commodities in differing amounts and can buy them in two shops S1, S2. Which shop is the best for every person P1, P2, P3 to pay as little as possible? The individual prices and desired quantities of the commodities are given in the following tables:
Demanded quantity of foodstuff: Prices in shops S1 and S2:
Roll bun cake bread
P1 6 5 3 1 S1 S2
P2 3 6 2 2 Roll 1.50 1.00
P3 3 4 3 1 Bun 2.00 2.50
Cake 5.00 4.50
Bread 16.00 17.00
For example, the amount spent by the person P1 in the shop S1 is:
6 · 1.50 + 5 · 2 + 3 · 5 + 1 · 16 = 50
and in the shop S2 :
6 · 1 + 5 · 2.50 + 3 · 4.50 + 1 · 17 = 49,
for the other people similarly. These calculations can be written using a product of two matrices
6 5 3 1
P= 3 6 2 2
3 4 3 1
(the demand matrix) and
1.50 1
Q= 2 2.50
5 4.50
16 17
ULRYCHOV´ A: SEVERAL SIMPLE REAL-WORLD APPLICATIONS OF LIN. ALG. TOOLS
(the price matrix). For example, the first row of the matrix
50 49
R = PQ = 58.50 61
43.50 43.50
expresses the amount spent by the person P1 in the shop S1 (the element r11) and in the shop
S2 (the element r12). Hence, it is optimal for the person P1 to buy in the shop S2, for the
person P2 in S1 and the person P3 will pay the same price in S1 as in S2.
Demanded quantity of foodstuff: Prices in shops S1 and S2:
Roll bun cake bread
P1 6 5 3 1 S1 S2
P2 3 6 2 2 Roll 1.50 1.00
P3 3 4 3 1 Bun 2.00 2.50
Cake 5.00 4.50
Bread 16.00 17.00
For example, the amount spent by the person P1 in the shop S1 is:
6 · 1.50 + 5 · 2 + 3 · 5 + 1 · 16 = 50
and in the shop S2 :
6 · 1 + 5 · 2.50 + 3 · 4.50 + 1 · 17 = 49,
for the other people similarly. These calculations can be written using a product of two matrices
6 5 3 1
P= 3 6 2 2
3 4 3 1
(the demand matrix) and
1.50 1
Q= 2 2.50
5 4.50
16 17
ULRYCHOV´ A: SEVERAL SIMPLE REAL-WORLD APPLICATIONS OF LIN. ALG. TOOLS
(the price matrix). For example, the first row of the matrix
50 49
R = PQ = 58.50 61
43.50 43.50
expresses the amount spent by the person P1 in the shop S1 (the element r11) and in the shop
S2 (the element r12). Hence, it is optimal for the person P1 to buy in the shop S2, for the
person P2 in S1 and the person P3 will pay the same price in S1 as in S2.
http://www.mff.cuni.cz/veda/konference/wds/contents/pdf06/WDS06_106_m8_Ulrychova.pdf
Tarek Geagea
NDU
Tarek Geagea
NDU