Friday, March 19, 2010

Business Math

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.

http://www.mff.cuni.cz/veda/konference/wds/contents/pdf06/WDS06_106_m8_Ulrychova.pdf

Tarek Geagea
NDU

Thursday, March 11, 2010

Cryptology

To encode a short message a number can be assigned to each letter of the alphabet according
to a given table. The text as a sequence of numbers will be organized into a square matrix A;
in the case that the number of letters is lower than the number of elements of the matrix A,
the rest of the matrix can be filled with zero elements. Let a nonsingular square matrix C be
given. To encode the text the matrix A can be multiplied by the matrix C for example on the
left. Let the following table and the matrix C be given:

A B C D E F G H I J K L M N O P Q R S T U V W X y Z
8 7 5 13 9 16 18 22 4 23 11 3 21 1 6 15 12 19 2 14 17 20 25 24 10 26

C =

2 0 1
1 0 1
0 1 0

We put the text ”BILA KOCKA” (a white cat) into the matrix A:
A =

7 4 3
8 11 6
5 11 8

and encode the text:
Z = CA =

19 19 14
12 15 11
8 11 6

.
To decode the message we have to multiply the matrix Z by the matrix C−1 on the left:
C−1Z =

1 −1 0
0 0 1
−1 2 0


19 19 14
12 15 11
8 11 6

= A.
Since the matrix multiplication is not commutative, it is necessary to keep the order of
the matrices in the product. If we multiply the matrices C−1 and Z in the opposite order, we
obtain

ZC−1=

19 19 14
12 15 11
8 11 6



1 −1 0
0 0 1
−1 2 0

=

5 9 19
1 10 15
2 4 11

and it means ”CERNY PSIK”(a black dog).

FIRAS ABDEL DAYEM
http://www.mff.cuni.cz/veda/konference/wds/contents/pdf06/WDS06_106_m8_Ulrychova.pdf