1. Trang chủ
  2. » Giáo Dục - Đào Tạo

LIST OF CONTENTS 1 markov chain 2 determinants 3 system of linear equations

14 7 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 14
Dung lượng 624,93 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

• At each transition, each member in a given state must either stay in that state or change to another state.. Every month, 15% of the subscriber of company A changes to use the service

Trang 1

HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY

Linear Algebra

-o0o -REPORT

Group:

Students’ list:

- Hồ Lê Khánh Dy 2052431

- Nguyễn Đình Hoàng – 2052480

- Nghiêm Đức Tài – 20523412

- Nguyễn Phúc Th nh 2052728 ị –

- Trần Bảo Tín – 2052748

- Đỗ Diệp Phương Trâm - 2052286

Semester: HK202

Lecturer: Phan Thị Khánh Vân

Submission day: 30/5/2021

LIST OF CONTENTS

1 Markov chain

2 Determinants

3 System of linear equations

Trang 2

1 Markov chain:

A Theory:

• Many types of applications involve a finite set of state {S1, S2,…, Sn} of a population

• For instance, residents of a city may live downtown or in the suburbs Soft drink

consumers may buy Coca-Cola, Pepsi, or another brand

• The probability that a member of a population will change from the jth state to the ith state is represented by a number pij, where 0 ≤ pij ≤ 1

B Definition:

• The matrix P = (

p21

⋮ p22⋮ ⋯⋯ p⋮2n

) is called the matrix of transition probabilities

• At each transition, each member in a given state must either stay in that state or change to another state It means that:

∑ 𝑝𝑖𝑗 𝑛 𝑖=1

= 1, ∀ 𝑗 = 1 𝑛

• The nth state vector of a Markov chain for which P is the matrix of transition

probabilities and X is the initial state vector is: 0

𝑋𝑛= 𝑃𝑋𝑛−1= 𝑃2𝑋𝑛−2 = = 𝑃𝑛𝑋0

C Practical problems:

a Two competing companies offer mobile phone service to a city with 100 000

households Suppose that each citizen uses one of these services Every month, 15%

of the subscriber of company A changes to use the service of company B, and 10% of company B’s subscribers changes to use the service of A Company A now has 60

000 subscribers and Company B has 40 000 subscribers How many subscribers will

each company have after 2 months?

b Consider an experiment of mating rabbits We watch the evolution of a particular

gene that appears in two types, G or g A rabbit has a pair of genes, either GG

(dominant), Gg (hybrid the order is irrelevant, so gG is the same as Gg) or gg –

Trang 3

(recessive) In mating two rabbits, the offspring inherits a gene from each of its parents with equal probability Thus, if we mate a dominant (GG) with a hybrid (Gg), the offspring is dominant with probability 1/2 or hybrid with probability 1/2 Start with a rabbit of given character (GG, Gg, or gg) and mate it with a hybrid The offspring produced is again mated with a hybrid, and the process is repeated through

a number of generations, always mating with a hybrid (i) Write down the transition probabilities of the Markov chain thus defined (ii) Assume that we start with a hybrid rabbit Let µn be the probability distribution of the character of the rabbit of the n-th generation In other words, µn(GG),µn(Gg),µn(gg) are the probabilities that the n-th

generation rabbit is GG, Gg, or gg, respectively Compute µ1,µ2,µ3

D Solution:

a 𝑊𝑒 ℎ𝑎𝑣𝑒: 𝑋0= (6000040000) , 𝑃 = (0.0.8515 0.10.9)

𝑋2= 𝑃2𝑋0= (0.0.8515 0.10.9)2∗ (6000040000) = (5125048750)

So : There are 51250 subscribers from company A after 2 months

There are 48750 subscribers from company B after 2 months

b (i) From the given information, we have the transition probabilities:

GG

GG

Gg

Or we can write it in the following form:

𝑃 = (0.25 0.5 0.250.5 0.5 0

(ii) We start with 𝑋0 being distributed as 𝜇0= (𝜇0(1), 𝜇0(2), 𝜇0(3)) = (0,1,0),and, letting

𝑚𝑢𝑛= (𝜇0(n), 𝜇0(n), 𝜇0(n)) be the distribution of𝑋𝑛, we have:

Trang 4

μ = μ ∗ 𝑃 𝑛 𝑜 𝑛

So that:

𝜇 = 𝜇 ∗ 𝑃 =1 0 (0 1 0) ∗ (0.25 0.5 0.250.5 0.5 0

𝜇2= 𝜇 ∗ 𝑃0 2= (0 1 0) ∗ (0.25 0.5 0.250.5 0.5 0

2

= (0.25 0.5 0.25)

𝜇3= 𝜇 ∗ 𝑃0 3= (0 1 0) ∗ (0.25 0.5 0.250.5 0.5 0

3

= (0.25 0.5 0.25)

2 Determinant:

A Defintion:

In mathematics, the determinant is a scalar value that is a function of the entries of a square matrix

An and the determinant of a matrix A is denoted det(A), det A, or |A| n

B Classification and calculation:

- General matrix:

1) n = 1, A = a => det(A) = a 11 11

2) n = 2, A = a a11 12

a21 a22

=> det(A) = (-1)1+1.a11.|M11| + (-1)1+2.a |M12 12| = a a11 22 a– 12.a21

Trang 5

(expand the determinant in row 1)

3) n = 3, A = a a a11 12 13

a a a21 22 23

a a a31 32 33

=> det(A) = (-1)1+1.a11|M11| + (-1)1+2.a |M12 12| + (-1)1+3.a 13 |M13|

= a det a a11 22 23 – a12.det a21 a23 + a13 det a21 a22

a a32 33 a a 31 33 a31 a32

= a11.a22.a33 a– 11.a23.a32 a– 12.a21.a33 + a a a + a a12 23 31 13 21.a a32– 13.a a 22 31

= a11.a a22 33 +a12.a a23 31 + a13.a a – a21 32 11.a23.a32 a– 12.a21.a33 a– 13.a22.a 31

(expand the determinant in row 1)

*Especially: We can calculate the determinant of A by the fastest way like this: 3

+ Rewrite the elements in the matrix in rows and columns respectively

a a a11 12 13

a a a21 22 23

a a a31 32 33

+ Add the first 2 columns of the matrix to the right of the previously written elements

a a a a a 11 12 13 11 12

a21 a22 a23 a21 a22

a a a a a 31 32 33 31 32

+ det(A) = ∑ (product of elements on each blue diagonal) – ∑ (product of elements on each red

diagonal)

a a a a a11 12 13 11 12

a a a a a 21 22 23 21 22

Trang 6

a a a a a31 32 33 31 32

=> det(A) = a11.a a22 33 +a a12 23.a + a31 13.a a21 32 – a a a a11 23 32– 12.a a a21 33– 13.a a22 31

4) n = 4, A = a a a a 11 12 13 14

a a a a 21 22 23 24

a a a a 31 32 33 34

a a a a41 42 43 44

=> det(A) = (-1)1+1.a11.|M11| + (-1)1+2.a a

12|M12| + (-1)1+3

13.|M13| + (-1)1+4.a14 |M14|

= (-1)1+1.a11.det a a a22 23 24 + (-1)1+2.a12.det a21 a23 a24

a a a 32 33 34 a a a 31 33 34

a a a 42 43 44 a a a 41 43 44

+(-1)1+3 a det a a a + (-1) det a a a

13 21 22 24 1+4.a14 21 22 23

a a a 31 32 34 a a a 31 32 33

a a a 41 42 44 a a a 41 42 43

= a11.a a22 33.a + a a a44 11 23 34.a + a a42 11 24.a a a32 43– 11.a24.a a a33 42– 11.a22.a a34 43

– a11.a a23 32.a44 – a a a a12 21 33 44 – a a a a 12 23 34 41 – a12.a a a24 31 43 + a12.a a a24 33 41 + a12.a a a21 34 43 +

a a a a12 23 31 44 + a13.a a a21 32 44 + a13.a a a22 34 41 + a a a13 24 31.a42 – a a a13 24 32.a – a a41 13 21.a a – 34 42

a a a a13 22 31 44 – a14.a a a21 32 43 – a14.a a a22 33 41 – a14.a a a23 31 42 + a14.a a a23 32 41 + a14.a a a21 33 42 +

a a a a14 22 31 43

5) n ≥ 5, we should turn the matrix A into the upper triangular matrix A’n n and det (An) = det(A’n)

= product of elements on the main diagonal of A’n

Trang 7

a a a 11 12 13… a1n a a a 1 2…… ax

a a a 21 22 23… a2n 0 b b 1…… by

An = a a a 31 32 33… a3n => A’n= 0 0 c …… cz

a a a n1 n2 n3… ann 0 0 0 ……… m

=> det(An) = det(A’n) = a.b.c…m

- Diagonal matrix:

a 0 0 ……… 0

0 b 0 ……… 0

An= 0 0 c ……… 0 => det(A ) = n a.b.c…m

………

0 0 0 ……… m

- Identity matrix:

1 0 0 ……… 0

0 1 0 ……… 0

In = 0 0 1 ……… 0 => det(In) = 1

………

0 0 0 ……… 1

- Triangular matrix:

a a a 1 2…… ax a 0 0 ……… 0

0 b b 1…… by b1 b 0 ……… 0

An= 0 0 c …… cz or A n= c c 2 1 c ……… 0

Trang 8

0 0 0……… m m m m x y z…… m

=> det (An) = a.b.c…m

C Properties of determinant:

+ When we swap 2 rows or swap 2 columns, the determinant is changed sign

Example: det 1 2 = 1.4 – 2.3 = -2 => det 3 4 = 3.2 1.4 = 2 –

3 4 1 2

det 1 2 = 1.4 2.3 = -2 => det 2 1 = 2.3 4.1 = 2 – –

3 4 4 3 + If matrix A has 2 proportional rows or 2 proportional columns then det(A) = 0

Example: det 1 4 = 8 – 4 = 0

2 8

+ If matrix A has all elements on a row = 0 or on a column = 0, then det(A)=0

0 0 0 0 0 0 0 0

Example: det 1 2 3 1 2=

4 5 6 4 5 6 4 5

= 0.2.6 + 0.3.4 + 0.1.5 4.2.0 5.3.0 6.1.0 = 0 – – – + The common factor of a row or the common factor of a column can be taken out of the determinant

Example: 6 8 10 3 4 5 1 4 5

det 9 5 7 = 2.det 9 5 7 = 2.3.det 3 5 7

15 2 4 15 2 4 5 2 4

Trang 9

+ det(A ) = det(An n)

Example: det 6 7 = det 6 8 = 6.9 – 7.8 = -2

8 9 7 9

+ det(A B ) = det(An n n).det(Bn)

det 1 2 5 6 = det 1 2 det 5 6 = (4 3.2).(5.8 7.6) = 4

3 4 7 8 3 4 7 8

+ det(α.A ) = αn n det(An)

Example: det 2 3 7 = det 6 14 = 2 det 3 7 = 4.(3.2 2 – 8.7) = -200

8 2 16 4 8 2

+ det(A ) = (det A) n n

Example: det 3 5 = (3.9 2 – 7.5) = 64 2

7 9

Let A, B and C be defined complex numbers the complex plane as in The vectors from C A and from C B are given by to to

z1 = (x1−x3) + i(y1−y )3 z1=(x1−x3) + i(y1−y3)

z2 = (x2−x3) + i(y2−y )3

so the area of the triangle is:

A= ½ Z1.Z2

A= ½ | (Im ( (x1−x3)−i(y1−y3)) ((x2−x3)−i(y2−y3)) ) |

Trang 10

= 1/2|(x1−x3)(y2−y3)−(y1−y3)(x2−x3)|

=1/2|x1y2−y1x2+x2y3−y2x3+x3y1−y3x1|

Problem2:

Find the area of the triangle??

Evaluate that determinant We will expand on column 1

-2

(-2)

1

6

-1

-1

-1

Trang 11

= -2 ( 5 + 1 ) - 1 ( 2 + 1 ) + 6 ( 2 - 5 ) = -2 ( 6 ) - 1 ( 3 ) + 6 ( -3 ) = -12 - 3 - 18 = -33

So the area of the triangle is ½ detA =33/2= 16.5

Problem2: Calculate the matrix: 1 1 5 3

A = 2 6 8 9

2 5 6 7

1 2 5 6

Solution: 1 1 5 3 1 1 5 3 1 1 5 3 1 1 5 3

2 6 8 9 => 0 4 -2 3 => 0 4 -2 3 => 0 4 -2 3

2 5 6 7 0 3 -1 4 0 0 -5/2 -5/4 0 0 -5/2 -5/4

1 2 5 6 0 1 0 3 0 0 1/2 9/4 0 0 0 2

 det(A)= 1.4.(-5/2).2= -20

3.System of linear equations:

A Theory:

• In mathematics, a system of linear equations (or linear system) is a collection of linear equations involving the same set of variables

• A solution to a linear system is an assignment of numbers to the variables such that all the equations are simultaneously satisfied

B Definition:

• A general linear system of equationsm in the n unknowns can be written as:

a 11 x 1 + a 12 x 2 + + a x + + a 1j j 1n x n = b 1

a i1 x 1 + a i2 x 2 + + a x ij j + + a in x n = b i (1)

a m1 x 1 + a m2 x 2 + + a x + + a mj j mn x n = b m

Trang 12

• Matrix is called the augmented matrix for the system (1), which is obtained by adjoining column to matrix as the last column B A

𝐴 = (𝑎 |𝑏𝐵 𝑖𝑗 𝑖)𝑚∗(𝑛+1)

• The system (1) is called a homogeneous if B = 0 m×1 and a nonhomogeneous if B ≠

0m×1

• A non-homogeneous linear system A.X = b, A Rm×n If: ∈

- r(A) < r(A|b): there is no solution

- r(A) = r(A|b) = n: the solution is unique

- r(A) = r(A|b) = r < n: there is an infinite number of solutions

• A homogeneous system of linear system with b = 0 If :

- r(A) = n : there is only trivial solution X = 0

- r(A) < n : there is infinitely many solutions or non-trivial solutions

C Practical problems:

a Problem 1: Balance the chemical equation :

Solution :

- To balance the equation, we insert unknowns, multiplying the reactants and the products to get an equation of the form:

(x )1NH3 + (x )O2 2 → (x3)NO + (x ) H O 4 2

- Next, by applying Law of Conservation of Matter, we compare the number of nitrogen (N), hydrogen (H) and oxygen (O) atoms of the reactants with the number of the products We obtain three equations :

N : x = x ; H : 3x = 2x ; O : 2x = x + x ; 1 3 1 4 2 3 4

- It is important to note that we made use of the subscripts because they count the number of atoms of a particular element Rewriting these equations in standard form, we see that we have a homogenous linear system in four unknowns, that is : x1, x , x and x 2 3 4

x1 - x = 0 3 3x1 - 2x = 0 4 2x2 - x - x = 0 3 4

- Writing this equations or system in matrix form, we have the augmented matrix : (1 0 −1 0 03 0 0 −2 0

- First, we subtract row 1 multiplied by 3 from row 2: R2 = R2 − 3R1 :

(1 0 −1 0 00 0 3 −2 0

Trang 13

- Swap rows 2 and 3, then divide row 2 by 2: R2 = R2/2 and row 3 by 3: R3 = R3/3 After that, add row 3 to row 1: R1 = R1 + R3 We obtain :

(1 00 1 −1/2 −1/2 00 −2/3 0

- Add row 3 multiplied by 1/2 to row 2: R2= R2 + R3/2 We have :

(1 0 0 −2/3 00 1 0 −5/6 0

- Let x = x We get : 4 4

x1 = (2/3).x4 x2 = (5/6).x 4 x3 = (2/3).x 4

x4 = x4

- To balance the equation without fractions, we choose x = 6 4

- Then, our balance equation is :

4NH3 + 5O 2→ 4NO + 6H2O

b Problem 2 : A dietitian is planning a meal that supplies certain quantities of vitamin

C, calcium, and magnesium Three foods will be used, their servings measured in milligrams The nutrients supplied by these foods and the dietary requirements are given in the table below Determine the servings (mg) of Food 1,2 and 3 necessary to

meet the dietary requirements

Solution :

- From the table, we archieve a non-homogenous linear system in three unknowns Food 1, Food 2, Food 3 denoted as f , f , f respectively : 1 2 3

30f1 + 45f + 15f = 1785 2 3 20f1 + 45f + 20f = 1642.5 2 3 30f1 + 60f + 35f = 2472.5 2 3

Trang 14

- Writing this equations or system in matrix form, we have the augmented matrix :

(30 45 15 178520 45 20 1642.5

- First, we divide row 1 by 30: R1 = R1/30 , subtract row 1 multiplied by 20 from

row 2: R2 = R2 20R1 and subtract row 1 multiplied by 30 from row 3: – R3 = R3 − 30R1 :

(1 3/2 1/2 59.50 15 10 454.5

- We divide row 2 by 15: R2 = R2/15 , subtract row 2 multiplied by 3/2 from row

1: R1 = R1 − (3R2)/2 , subtract row 2 multiplied by 15 from row 3:

R3 = R3 − 15R2 :

(1 0 −1/2 14 250 1 2/3 181. /6

- Divide row 3 by 10: R3 = R3/10 , add row 3 multiplied by 1/2 to row 1:

R1 = R1 + R3/2 , subtract row 3 multiplied by 2/3 from row 2:

R2 = R2 (2R3)/3 We get : –

(1 0 0 260 1 0 14.5

- In conclusion, to meet the dietary requirements, the serving size of the meal

should contain:

+ Food 1 : 26 mg + Food 2 : 14.5 mg + Food 3 : 23.5 mg

Ngày đăng: 23/04/2022, 07:17

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w