# BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS

Rai University
15 Mar 2015
1 sur 14

### BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS

• 1. Class: B.Sc CS. Subject: Discrete Mathematics Unit-5 RAI UNIVERSITY, AHMEDABAD
• 2. UNIT-V- Solution of System of Linear Equations using Matrix  Equivalent System of Linear Equations: Two linear systems using the same set of variables are equivalent if each of the equations in the second system can be derived algebraically from the equations in the first system, and vice-versa. OR Two systems are equivalent if either both are inconsistent or each equation of any of them is a linear combination of the equations of the other one. OR Two linear systems are equivalent if and only if they have the same solution set.  Example-1.Prove that following system of linear equations (1) is equivalent to (2). (1) 𝒙 + 𝟒𝒚 = −𝟏𝟎 , 𝟑𝒙 − 𝒚 = 𝟗 (2) 𝟒𝒙 + 𝟑𝒚 = −𝟏, −𝟐𝒙 + 𝟓𝒚 = −𝟏𝟗 Solution: Here we have  𝑥 + 4𝑦 = −10 ………………………………………………………(1) 3𝑥 − 𝑦 = 9 ……………………………………………………………(2)  Multiply equation (2) by 4 and add in to (1) we get 𝑥 + 4𝑦 = −10
• 3. 12𝑥 − 4𝑦 = 36 _______________________ 13𝑥 = 26 ∴ 𝑥 = 2  Put 𝑥 = 2 in equation (1) we get 2 + 4𝑦 = −10 ∴ 4𝑦 = −12 ⟹ 𝑦 = −3  Hence we get solution set (𝑥, 𝑦) = (2, −3)for system of linear equations (1). Now we have to check for System (2) .  Here we have, 4𝑥 + 3𝑦 = −1……………………………………………………… (1) −2𝑥 + 5𝑦 = −19 …………………………………………………... (2)  Multiply equation (2) by 2 and add in to (1) we get 4𝑥 + 3𝑦 = −1 −4𝑥 + 10𝑦 = −38 _______________________ 13𝑦 = −39 ∴ 𝑦 = −3  Now put 𝑦 = −3in equation (1) we get 4𝑥 − 9 = −1 ⟹ 4𝑥 = 8 ⟹ 𝑥 = 2  Hence we get solution set (2,-3) for system of linear equations (2)  ∴ Both systems have same solution therefore we can say that system (1) is equivalent to system (2).  Homogeneous Systemof linear Equations:
• 4. A system of linear equations is homogeneous if all of the constant terms are zero: A homogeneous system is equivalent to a matrix equation of the form AX=0 Where A is an m × n matrix, x is a column vector with n entries, and 0 is the zero vectors with m entries. For a system of homogeneous linear equations 𝐴𝑋 = 0. 1) 𝑋 = 0 is always a solution. This solution in which each unknown has the value zero is called the Null solution or the trivial solution. Thus a homogeneous system is always consistent. (i.e it has solution) 2) A system of homogeneous linear equations has either the trivial solution or an infinite number of solutions. 3) If 𝑅( 𝐴) = number of unknowns, the system has only the trivial solution. 4) If 𝑅(𝐴) < number of unknowns, the system has an infinite number of non –trivial solutions.
• 5.  Example-1. Determine ‘b’ such that the system of homogeneous equations 𝟐𝒙 + 𝒚 + 𝟐𝒛 = 𝟎 𝒙 + 𝒚 + 𝟑𝒛 = 𝟎 𝟒𝒙 + 𝟑𝒚 + 𝒃𝒛 = 𝟎 Has (i) trivial solution (ii) Non-trivial solution. Find the Non–Trivial solution using matrix method. Solution:  Here we have, 2𝑥 + 𝑦 + 2𝑧 = 0 𝑥 + 𝑦 + 3𝑧 = 0 4𝑥 + 3𝑦 + 𝑏𝑧 = 0 A systemof homogeneous linear equations AX=0 Always has a solution If R(A) equal to n Unique or trivial solution If R(A) less than n Infiniteno. of non trivial solution
• 6.  (i) For trivial Solution: We know that 𝑥 = 0, 𝑦 = 0 𝑎𝑛𝑑 𝑧 = 0. So, b can have any value.  (ii) For non trivial Solution: The given equations are written in the matrix form as  [ 2 1 2 1 1 3 4 3 𝑏 ][ 𝑥 𝑦 𝑧 ] = [ 0 0 0 ]  [ 1 1 3 2 1 2 4 3 𝑏 ][ 𝑥 𝑦 𝑧 ] = [ 0 0 0 ] 𝑅1 ↔ 𝑅2  [ 1 1 3 0 −1 −4 0 −1 𝑏 − 12 ][ 𝑥 𝑦 𝑧 ] = [ 0 0 0 ] 𝑅2 → 𝑅2 − 2𝑅1,𝑅3 → 𝑅3 − 4𝑅1  [ 1 1 3 0 −1 −4 0 0 𝑏 − 8 ][ 𝑥 𝑦 𝑧 ] = [ 0 0 0 ] 𝑅3 → 𝑅3 − 𝑅2  For non trivial solution Infinite solutions =𝑅( 𝐴) = 2 < Number of unknowns 𝑏 − 8 = 0 ∴ 𝑏 = 8  Example-2. Solve the homogeneous linearsystem of equations: 𝒙 𝟏 + 𝟑𝒙 𝟐 + 𝒙 𝟒 = 𝟎 𝒙 𝟏 + 𝟒𝒙 𝟐 + 𝟐𝒙 𝟑 = 𝟎 −𝟐𝒙 𝟐 − 𝟐𝒙 𝟑 − 𝒙 𝟒 = 𝟎 𝟐𝒙 𝟏 − 𝟒𝒙 𝟐 + 𝒙 𝟑 + 𝒙 𝟒 = 𝟎 𝒙 𝟏 − 𝟐𝒙 𝟐 − 𝒙 𝟑 + 𝒙 𝟒 = 𝟎 Solution:  We have given system of equation 𝑥1 + 3𝑥2 + 𝑥4 = 0 𝑥1 + 4𝑥2 + 2𝑥3 = 0 −2𝑥2 − 2𝑥3 − 𝑥4 = 0
• 7. 2𝑥1 − 4𝑥2 + 𝑥3 + 𝑥4 = 0 𝑥1 − 2𝑥2 − 𝑥3 + 𝑥4 = 0  We can write this equation in the matrix form as [ 1 3 0 1 4 2 0 2 1 −2 −4 −2 −2 1 −1 1 0 −1 1 1 ] [ 𝑥1 𝑥2 𝑥3 𝑥4 ] = [ 0 0 0 0 0]  ~ [ 1 3 0 0 1 2 0 0 0 −2 −10 −5 −2 1 −1 1 −1 −1 −1 0 ] [ 𝑥1 𝑥2 𝑥3 𝑥4 ] = [ 0 0 0 0 0] {(−1) 𝑅1 + 𝑅2, (−2) 𝑅1 + 𝑅4, (−1) 𝑅1 + 𝑅5}  ~ [ 1 3 0 0 1 2 0 0 0 0 0 0 2 21 9 1 −1 −3 −11 −5 ] [ 𝑥1 𝑥2 𝑥3 𝑥4 ] = [ 0 0 0 0 0] {2𝑅2 + 𝑅3, 10𝑅2 + 𝑅4, 5𝑅2 + 𝑅5}  ~ [ 1 3 0 0 1 2 0 0 0 0 0 0 1 21 9 1 −1 −3/2 −11 −5 ] [ 𝑥1 𝑥2 𝑥3 𝑥4 ] = [ 0 0 0 0 0] 𝑅3 ( 1 2 )  ~ [ 1 3 0 0 1 2 0 0 0 0 0 0 1 0 0 1 −1 −3/2 −85/2 −37/2] [ 𝑥1 𝑥2 𝑥3 𝑥4 ] = [ 0 0 0 0 0] (−21) 𝑅3 + 𝑅4,(−9) 𝑅3 + 𝑅5  ~ [ 1 3 0 0 1 2 0 0 0 0 0 0 1 0 0 1 −1 −3/2 1 −37/2] [ 𝑥1 𝑥2 𝑥3 𝑥4 ] = [ 0 0 0 0 0] 𝑅4 (− 2 85 )
• 8.  ~ [ 1 3 0 0 1 2 0 0 0 0 0 0 1 0 0 1 −1 −3/2 1 0 ] [ 𝑥1 𝑥2 𝑥3 𝑥4 ] = [ 0 0 0 0 0] 𝑅4 ( 37 2 ) + 𝑅5 ∴ 𝑥1 + 3𝑥2 + 𝑥4 = 0 …………………………………….(1) 𝑥2 + 2𝑥3 − 𝑥4 = 0 ……………………………………. (2) 𝑥3 − 3 2 𝑥4 = 0 …………………………………… (3) 𝑥4 = 0 ... ………………………………………. (4)  Since 𝑥4 = 0 from equation (3) we get 𝑥3 = 0.  Since 𝑥3 = 0, 𝑥4 = 0 from equation (2) we get 𝑥2 = 0  Since 𝑥2 = 0, 𝑥4 = 0 from equation (1) we get 𝑥1 = 0.  Hence 𝑥1 = 0, 𝑥2 = 0, 𝑥3 = 0, 𝑥4 = 0  i.e. system has only a trivial solution.  Non Homogeneous Systemof Linear equations and its Solution:  The vector equation is equivalent to a matrix equation of the form   Where A is an m×n matrix, x is a column vector with n entries, and b is a column vector with m entries.
• 9.  The above system of equations AX=b is known as non homogeneous system of equations.  Here C=[A/B] is Augmented matrix  Example-1. Show that the non Homogeneous systemof linear equation are not consistant. 𝟐𝒙 + 𝟔𝒚 = −𝟏𝟏 𝟔𝒙 + 𝟐𝟎𝒚 − 𝟔𝒛 = −𝟑 𝟔𝒚 − 𝟏𝟖𝒛 = −𝟏 Solution:  In the matrix form 𝐴𝑋 = 𝐵 we can write A systemof non-homogeneous linear equations AX=B if R(A)=R(C) solution exists systemis consistant if R(A)=R(C)=n systemhas unique solution if R(A)=R(C) less than n InfiniteSolution if R(A)# R(C) solution does not exist systemis inconsistant
• 10. [ 2 6 0 6 20 −6 0 6 −18 ] [ 𝑥 𝑦 𝑧 ] = [ −11 −3 −1 ]  ~ [ 2 6 0 0 2 −6 0 6 −18 ] [ 𝑥 𝑦 𝑧 ] = [ −11 30 −1 ] (−3) 𝑅1 + 𝑅2  ~ [ 2 6 0 0 2 −6 0 0 0 ] [ 𝑥 𝑦 𝑧 ] = [ −11 30 −91 ] (−3) 𝑅2 + 𝑅3  ∴ Rank of C = 3 and Rank of A=2  Here, ( Rank of C = 3) ≠ (Rank of A=2)  ∴ System has no solution that means system is inconsistent.  Example-2. Testfor consistencythe following system of equations and if consistentthen solve them 𝒙 𝟏 + 𝟐𝒙 𝟐 − 𝒙 𝟑 = 𝟑 𝟑𝒙 𝟏 − 𝒙 𝟐 + 𝟐𝒙 𝟑 = 𝟏 𝟐𝒙 𝟏 − 𝟐𝒙 𝟐 + 𝟑𝒙 𝟑 = 𝟐 𝒙 𝟏 − 𝒙 𝟐 + 𝒙 𝟑 = −𝟏 Solution:  We have given system of solution 𝑥1 + 2𝑥2 − 𝑥3 = 3 3𝑥1 − 𝑥2 + 2𝑥3 = 1 2𝑥1 − 2𝑥2 + 3𝑥3 = 2 𝑥1 − 𝑥2 + 𝑥3 = −1  The System of equation can be written in matrix form as [ 1 2 −1 3 −1 2 2 1 −2 −1 3 1 ][ 𝑥1 𝑥2 𝑥3 ] = [ 3 1 2 −1 ]
• 11.  ~[ 1 2 −1 0 −7 5 0 0 −6 −3 5 2 ][ 𝑥1 𝑥2 𝑥3 ] = [ 3 −8 −4 −4 ] (−3) 𝑅1 + 𝑅2, (−2) 𝑅1 + 𝑅3, (−1) 𝑅1 + 𝑅4  ~[ 1 2 −1 0 −7 5 0 0 0 0 5/7 −1/7 ][ 𝑥1 𝑥2 𝑥3 ] = [ 3 −8 20/7 −4/7 ] − 6 7 𝑅2 + 𝑅3 , − 3 7 𝑅2 + 𝑅4  ~[ 1 2 −1 0 −7 5 0 0 0 0 5/7 0 ][ 𝑥1 𝑥2 𝑥3 ] = [ 3 −8 20/7 0 ] 1 5 𝑅3 + 𝑅4 ……………………….(1)  ∴ Rank of C=3  Rank of A=3  Hence 𝑅( 𝐴) = 𝑅( 𝐶) = 3  ∴ System is consistant.  Also rank = no. of variable (n) = 3  ∴ System has unique solution.  Now we can write equation (1) as  ~[ 1 2 −1 0 −7 5 0 0 5/7 ][ 𝑥1 𝑥2 𝑥3 ] = [ 3 −8 20/7 ]  ∴ 𝑥1 + 2𝑥2 − 𝑥3 = 3 ……………………………………. (2) −7𝑥2 + 5𝑥3 = −8 ……………………………………. (3) 5 7 𝑥3 = 20 7 …………………………………… (4)  From equation (4) we get 𝑥3 = 4  Put 𝑥3 = 4 in (3) we get, −7𝑥2 + 5(4) = −8
• 12. ∴ −7𝑥2 = −28 ⟹ 𝑥2 = 4  Put 𝑥3 = 4 and 𝑥2 = 4 in (2) we get, 𝑥1 + 2(4) − 4 = 3 ∴ 𝑥1 + 4 = 3 ⟹ 𝑥1 = −1  Hence 𝑥1 = −1, 𝑥2 = 4, 𝑥3 = 4.  Reference BookandWebsite Name: 1. Introduction to Engineering Mathematics-1 by H.K. Dass and Dr.Rama Verma. (S.Chand) 2. A Textbookof Engineering mathematics by N.P.Bali and Dr.Manish goyal 3. http://en.wikipedia.org/wiki/System_of_linear_equations 4. http://www.mathwords.com/e/equivalent_system_of_equations.htm 5. http://en.wikipedia.org/wiki/System_of_linear_equations
• 13. EXERCISE-5 Q-1.Evaluate the following questions: 1. Solve the system of homogeneous equation 𝑥1 + 3𝑥2 + 2𝑥3 = 0 2𝑥1 − 𝑥2 + 3𝑥3 = 0 3𝑥1 − 5𝑥2 + 4𝑥3 = 0 𝑥1 + 17𝑥2 + 4𝑥3 = 0 2. Solve the following System of homogeneous equation 5𝑥 + 2𝑦 − 3𝑧 = 0 3𝑥 + 𝑦 + 𝑧 = 0 2𝑥 + 𝑦 + 6𝑧 = 0 3. Check that the following system of equations is equivalent or not? (a) 𝑥 − 6𝑦 = −8 , 𝑥 2 − 3𝑦 = −4 (b)3𝑥 + 7𝑦 = 15,5𝑥 + 2𝑦 = −4 Q.2 Evaluate the following questions: 1. Discuss the consistency of the following system of equations if it is consistant then find its solution: 2𝑥 + 3𝑦 + 4𝑧 = 11 𝑥 + 5𝑦 + 7𝑧 = 15 3𝑥 + 11𝑦 + 13𝑧 = 25 2. Test for the consistency of the following system of equations 𝑥1 + 2𝑥2 + 3𝑥3 + 4𝑥4 = 5 6𝑥1 + 7𝑥2 + 8𝑥3 + 9𝑥4 = 10 11𝑥1 + 12𝑥2 + 13𝑥3 + 14𝑥4 = 15
• 14. 16𝑥1 + 17𝑥2 + 18𝑥3 + 19𝑥4 = 20 21𝑥1 + 22𝑥2 + 23𝑥3 + 24𝑥4 = 25 3. Test the consistency of the following equations and solve them if possible. 3𝑥 + 3𝑦 + 3𝑧 = 1 𝑥 + 2𝑦 = 4 10𝑦 + 3𝑧 = −2 2𝑥 − 3𝑦 − 𝑧 = 5