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

Nội dung

HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY Linear Algebra -o0o - REPORT Group: Students’ list: - Hồ Lê Khánh Dy – 2052431 - Nguyễn Đình Hồ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 Markov chain Determinants System of linear equations download by : skknchat@gmail.com CONTENTS 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 ≤ pij ≤ B Definition: p11 p12 ⋯ p1n p p22 ⋯ p2n ) is called the matrix of transition probabilities • The matrix P = ( ⋮21 ⋯ ⋮ ⋮ pn1 pn2 ⋯ pnn • 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 • The nth state vector of a Markov chain for which P is the matrix of transition probabilities and X0 is the initial state vector is: 𝑋𝑛 = 𝑃𝑋𝑛−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 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 download by : skknchat@gmail.com (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 = ( 𝑋2 = 𝑃2 𝑋0 = ( 60000 ) , 40000 0.85 𝑃=( 0.15 51250 60000 0.85 0.1 )=( ) ∗( ) 40000 0.15 0.9 48750 0.1 ) 0.9 So : There are 51250 subscribers from company A after months There are 48750 subscribers from company B after months b (i) From the given information, we have the transition probabilities: GG Gg gg GG 0.5 0.5 Gg 0.25 0.5 0.25 gg 0.5 0.5 Or we can write it in the following form: 0.5 0.5 𝑃 = ( 0.25 0.5 0.5 0.25) 0.5 (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: download by : skknchat@gmail.com μ𝑛 = μ𝑜 ∗ 𝑃 𝑛 So that: 𝜇1 = 𝜇0 ∗ 𝑃 = (0 𝜇2 = 𝜇0 ∗ 𝑃2 = (0 𝜇3 = 𝜇0 ∗ 𝑃3 = (0 0.5 0.5 0) ∗ (0.25 0.5 0.25 ) = (0.25 0.5 0.5 0.5 0.5 ) ∗ ( 0.25 0.5 0.25 ) = (0.25 0.5 0.5 0.5 0.25) 0.5 0.5 ) ∗ ( 0.25 0.5 0.25 ) = (0.25 0.5 0.5 0.5 0.25) 0.5 0.25) 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 An is denoted det(A), det A, or |A| B Classification and calculation: - General matrix: 1) n = 1, A = a11 => det(A) = a11 2) n = 2, A = a11 a12 a21 a22 => det(A) = (-1)1+1.a11.|M11| + (-1)1+2.a12.|M12| = a11.a22 – a12.a21 download by : skknchat@gmail.com (expand the determinant in row 1) 3) n = 3, A = a11 a12 a13 a21 a22 a23 a31 a32 a33 => det(A) = (-1)1+1.a11 |M11| + (-1)1+2.a12.|M12| + (-1) 1+3.a13 |M13| = a11.det a22 a32 a23 – a12.det a21 a23 + a13 det a21 a22 a33 a32 a31 a33 a31 = a11.a22.a33 – a11.a23.a32 – a12.a21.a33 + a12.a23.a31 + a13.a21.a32 – a13.a22.a31 = a11.a22.a33 + a12.a23.a31 + a13.a21.a32 – a11.a23.a32 – a12.a21.a33 – a13.a22.a31 (expand the determinant in row 1) *Especially: We can calculate the determinant of A3 by the fastest way like this: + Rewrite the elements in the matrix in rows and columns respectively a11 a12 a13 a21 a22 a23 a31 a32 a33 + Add the first columns of the matrix to the right of the previously written elements a11 a12 a13 a11 a12 a21 a22 a23 a21 a22 a31 a32 a33 a31 a32 + det(A) = ∑ (product of elements on each blue diagonal) – ∑ (product of elements on each red diagonal) a11 a12 a13 a11 a12 a21 a22 a23 a21 a22 download by : skknchat@gmail.com a31 a32 a33 a31 a32 => det(A) = a11.a22.a33 + a12.a23.a31 + a13.a21.a32 – a11.a23.a32 – a12.a21.a33 – a13.a22.a31 4) n = 4, A = a11 a12 a13 a14 a21 a22 a23 a24 a31 a32 a33 a34 a41 a42 a43 a44 => det(A) = (-1)1+1.a11.|M11| + (-1)1+2.a12.|M12| + (-1)1+3 a13.|M13| + (-1)1+4.a14 |M14| = (-1)1+1.a11.det a22 a23 a24 + (-1)1+2.a12.det a21 a23 a24 a32 a33 a34 a31 a33 a34 a42 a43 a44 a41 a43 a44 a24 + (-1)1+4.a14.det a21 a22 a23 +(-1)1+3 a13.det a21 a22 a31 a32 a34 a31 a32 a33 a41 a42 a44 a41 a42 a43 = a11.a22.a33.a44 + a11.a23.a34.a42 + a11.a24.a32.a43 – a11.a24.a33.a42 – a11.a22.a34.a43 – a11.a23.a32.a44 – a12.a21.a33.a44 – a12.a23.a34.a41 – a12.a24.a31.a43 + a12.a24.a33.a41 + a12.a21.a34.a43 + a12.a23.a31.a44 + a13.a21.a32.a44 + a13.a22.a34.a41 + a13.a24.a31.a42 – a13.a24.a32.a41 – a13.a21.a34.a42 – a13.a22.a31.a44 – a14.a21.a32.a43 – a14.a22.a33.a41 – a14.a23.a31.a42 + a14.a23.a32.a41 + a14.a21.a33.a42 + a14.a22.a31.a43 5) n ≥ 5, we should turn the matrix An into the upper triangular matrix A’n and det (An) = det(A’n) = product of elements on the main diagonal of A’n download by : skknchat@gmail.com An = a11 a12 a13 … a1n a a1 a2 …… ax a21 a22 a23 … a2n a31 a32 a33 … a3n => A’n = b b1 …… by c …… cz …………………… …………………… an1 an2 an3 … ann 0 ……… m => det(An) = det(A’n) = a.b.c…m - Diagonal matrix: An = a 0 ……… 0 b ……… 0 c ……… => det(An) = a.b.c…m ………………… 0 ……… m - Identity matrix: In = 0 ……… 0 ……… 0 ……… => det(In) = ………………… 0 ……… - Triangular matrix: An = a a1 a2 …… ax a 0 ……… 0 b b1 …… by b1 b ……… 0 c …… cz or An = c2 c1 c ……… ………………….0 download by : skknchat@gmail.com 0 0……… m mx my mz …… m => det (An) = a.b.c…m C Properties of determinant: + When we swap rows or swap columns, the determinant is changed sign Example: det = 1.4 – 2.3 = -2 => det 4 det = 1.4 – 2.3 = -2 => det 4 = 3.2 – 1.4 = = 2.3 – 4.1 = + If matrix A has proportional rows or proportional columns then det(A) = Example: det =8–4=0 + If matrix A has all elements on a row = or on a column = 0, then det(A)=0 0 Example: det = 0 0 = 0.2.6 + 0.3.4 + 0.1.5 – 4.2.0 – 5.3.0 – 6.1.0 = + The common factor of a row or the common factor of a column can be taken out of the determinant Example: 10 5 det = 2.det = 2.3.det 15 4 15 download by : skknchat@gmail.com + det(An) = det(ATn) Example: det = det = 6.9 – 7.8 = -2 9 + det(An Bn) = det(An).det(Bn) Example: det = det det = (4 – 3.2).(5.8 – 7.6) = 4 + det(α.An) = αn det(An) Example: det = det 14 = 22.det 16 = 4.(3.2 – 8.7) = -200 + det(An) = (det A)n Example: det = (3.9 – 7.5)2 = 64 Let A, B and C be defined as complex numbers in the complex plane The vectors from C to A and from C to B are given by z1 = (x1−x3) + i(y1−y3)z1=(x1−x3) + i(y1−y3) z2 = (x2−x3) + i(y2−y3) so the area of the triangle is: A= ½ Z1.Z2 A= ½ | (Im ( (x1−x3)−i(y1−y3)) ((x2−x3)−i(y2−y3)) ) | download by : skknchat@gmail.com = 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?? x y point -2 point point -1 Evaluate that determinant We will expand on column 2 1 1 = + (2) 1 1 1 download by : skknchat@gmail.com + = -2 ( + ) - ( + ) + ( - ) = -2 ( ) - ( ) + ( -3 ) = -12 - - 18 = -33 So the area of the triangle is ½ detA =33/2= 16.5 Problem2: Calculate the matrix: 1 1 1 1 -2 => -2 => -2 A= Solution: 1 -1 0 -5/2 -5/4 0 -5/2 -5/4 0 1/2 0 => 9/4  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 m equations in the n unknowns can be written as: a11 x1 + a12 x2 + + a1j xj + + a1n xn = b1 ai1 x1 + ai2 x2 + + aij xj + + ain xn = bi (1) am1 x1 + am2 x2 + + amj xj + + amn xn = bm download by : skknchat@gmail.com Matrix is called the augmented matrix for the system (1), which is obtained by adjoining column B to matrix A as the last column 𝐴𝐵 = (𝑎𝑖𝑗 |𝑏𝑖 )𝑚∗(𝑛+1) • The system (1) is called a homogeneous if B = 0m×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 = If : - r(A) = n : there is only trivial solution X = - r(A) < n : there is infinitely many solutions or non-trivial solutions C Practical problems: a Problem 1: Balance the chemical equation : NH3 + O2 → NO + H2O (Not balanced) • Solution : - To balance the equation, we insert unknowns, multiplying the reactants and the products to get an equation of the form: (x1)NH3 + (x2)O2 → (x3)NO + (x4) H2O - 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 = x3 ; H : 3x1 = 2x4 ; O : 2x2 = x3 + x4 ; - 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, x2, x3 and x4 x1 - x3 = 3x1 - 2x4 = 2x2 - x3 - x4 = - - Writing this equations or system in matrix form, we have the augmented matrix : −1 0 ( 0 −2 0) −1 −1 First, we subtract row multiplied by from row 2: R2 = R2 − 3R1 : −1 0 ( 0 −2 0) −1 −1 download by : skknchat@gmail.com - - - Swap rows and 3, then divide row by 2: R2 = R2/2 and row by 3: R3 = R3/3 After that, add row to row 1: R1 = R1 + R3 We obtain : −2/3 −1/2 −1/2 0) 0 −2/3 Add row multiplied by 1/2 to row 2: R2= R2 + R3/2 We have : 0 −2/3 ( −5/6 0) 0 −2/3 ( 0 Let x4 = x4 We get : x1 = (2/3).x4 x2 = (5/6).x4 x3 = (2/3).x4 x4 = x4 - To balance the equation without fractions, we choose x4 = Then, our balance equation is : 4NH3 + 5O2 → 4NO + 6H2O b Problem : 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 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 denoted as f1, f2, f3 respectively : 30f1 + 45f2 + 15f3 = 1785 20f1 + 45f2 + 20f3 = 1642.5 30f1 + 60f2 + 35f3 = 2472.5 download by : skknchat@gmail.com - Writing this equations or system in matrix form, we have the augmented matrix : - ) 30 60 35 2472.5 First, we divide row by 30: R1 = R1/30 , subtract row multiplied by 20 from row 2: R2 = R2 – 20R1 and subtract row multiplied by 30 from row 3: R3 = R3 − 30R1 : - - ( 30 20 45 45 15 20 3/2 ( 15 15 59.5 454.5) 687.5 We divide row by 15: R2 = R2/15 , subtract row multiplied by 3/2 from row 1: R1 = R1 − (3R2)/2 , subtract row multiplied by 15 from row 3: R3 = R3 − 15R2 : −1/2 14.25 ( 2/3 181/6) 0 10 235 Divide row by 10: R3 = R3/10 , add row multiplied by 1/2 to row 1: R1 = R1 + R3/2 , subtract row multiplied by 2/3 from row 2: R2 = R2 – (2R3)/3 We get : - 1/2 10 20 1785 1642.5 0 (0 0 26 14.5) 23.5 In conclusion, to meet the dietary requirements, the serving size of the meal should contain: + Food : 26 mg + Food : 14.5 mg + Food : 23.5 mg download by : skknchat@gmail.com ... a 13 a 21 a 22 a 23 a 31 a 32 a 33 => det(A) = ( -1) 1 +1. a 11 |M 11| + ( -1) 1 +2. a 12. |M 12| + ( -1) 1+ 3. a 13 |M 13| = a 11. det a 22 a 32 a 23 – a 12. det a 21 a 23 + a 13 det a 21 a 22 a 33 a 32 a 31 a 33 a 31 = a 11. a 22. a 33. .. a 11. a 22. a 33 – a 11. a 23. a 32 – a 12. a 21 . a 33 + a 12. a 23. a 31 + a 13. a 21 . a 32 – a 13. a 22. a 31 = a 11. a 22. a 33 + a 12. a 23. a 31 + a 13. a 21 . a 32 – a 11. a 23. a 32 – a 12. a 21 . a 33 – a 13. a 22. a 31 (expand the determinant in row 1) *Especially:... diagonal) a 11 a 12 a 13 a 11 a 12 a 21 a 22 a 23 a 21 a 22 download by : skknchat@gmail.com a 31 a 32 a 33 a 31 a 32 => det(A) = a 11. a 22. a 33 + a 12. a 23. a 31 + a 13. a 21 . a 32 – a 11. a 23. a 32 – a 12. a 21 . a 33 – a 13. a 22. a 31 4)

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

w