 Hello friends! Welcome to this session of problem solving on Euclid's division algorithm to find GCD of two positive integers. So we have gone through the theory and concepts of Euclid division algorithms to find out GCD of any two given integers. Now in this session we are going to take up an example problem and solve it and basically find the GCD of two given positive integers and also express that GCD so obtained as a linear combination of the two given numbers. So let's read out the question. So question here says that find the hcf or find the hcf of 237 and 81. So these are the two integers given and express it as a linear combination linear combination of 237 and 81 okay. So we know how to find out the GCD of two given numbers. Here are two positive integers by Euclid's division algorithm. So what is the underlying concept? We are going to use Euclid's division algorithm. Okay so let's start. So how do we do it? So you know that in this case A is 237 the bigger of the two integers become the 230 becomes A then B is 81. So let us start the algorithm. So hence what is the value of A? 237. So let me write 237 here. This 237 is equal to 81 into how many times 81 will go into 237. Clearly 80 times 3 is 240 and here it this is bigger than 81 and this is less than 240. So clearly it should be 2. So 2 times if you find out 2 times 81 you can write it right down here. So 2 times 81 is how much? 2 and 162 is it it? So 2 times 162 this is this is the rough work I am doing here. This is a rough work. So 162 so if you if you subtract 237 minus 162 is what would be the value of R. So this is 5 and this happens to be 75. So hence what should I write here? This is plus 75. Okay so 237 can be written as 81 into 2 plus 75. If you didn't understand what exactly did I do here look again? So 81 into 2 was 162 isn't it? Now I subtracted 162 from 237 to get 75 as the remainder. That's what you will be doing in a long division process also. So first step is done. Now is check what is the check? Is the remainder here 0? Clearly not it is 75 which is not equal to 0. So let us write 75. So the next step would be B becomes the new A. So 81 will be written here and 75 the remainder comes to B's place. So sorry not 71 it's 75. Okay so 75 so 81. Now how many times 75 will go into 81? Clearly one time. So 75 into 1 plus what? Plus 6 plus 6. So if you see is 6 equal to 0? No. So hence so what will happen? I have to now shift 75 here. So 75 comes to A's position and then 6 comes here. 6. Now you see 6 into how many times 6 will go into 75? So 126 or 72? So 12. So that is 72 and 3 is left. So again the remainder is not 0. So hence what do I do? I again repeat the process. So 6 comes here. Okay 6 comes here. 3 comes here. And then into 2 is equal to 6. So hence remainder is 0. Now this is the final step isn't it? So we got we get 0 as the remainder here. So hence what will be my GCD? GCD is 3. So what is GCD? GCD is clearly 3. Now the second part of the question is express this GCD which is 3. So I can write here GCD of GCD of A and B that is 237 comma 81 is equal to 3. So now I have to do what? Now I have to express 3 as linear combination of 237 and 81. How do we start? We start with second step here. So what should I write? I should write 3 can be written as now 75 minus 6 into 12. So what is the idea? Idea is to manipulate it mathematically so that on the right hand side we get two numbers like 237 and 81 should be there on the right hand side. Right now it's not there. So let's substitute whatever values we are getting here back into. So for example what I mean is here 75 is there but I don't require 75 or 12. So I have to keep on substituting these numbers from the previous equations like these equations and finally this equation 2 to get rid of 75 and 6 and get in terms of 81 and 237. If you see the first equation see first one so clearly 75 would be from the first I am writing it here right. So let's say I do the parallel calculation here so if you see 75 is clearly how much 237 into not into 1 that is which is anyways there and minus 81 times 2 isn't it? So let us write this as so this implies 3 can be written as so I can substitute 75 by what this value so I can write this as 237 minus 81 into 2 this is 75. So can you see I am getting you know 237 and 81 back in the equation. Now 6 6 can be expressed as if you see the second equation 6 also can be written as 6 is equal to 81 minus 75. If you see from here I can write 6 as 81 minus 75 and 75 again can be written as this one this value so what can I write so 6 is equal to 81 minus 75 minus 75 is 237 within brackets 237 minus 81 into 2 this is my 75 right so it can be simplified further so 6 can be written as 81 minus 237 and plus 81 into 2 isn't it? So finally it is written as so you can club 81 common here 81 and 81 into 2 is nothing but 3 into 81 3 into 81 minus 237 so again if you see I can replace 6 also here what is 6 now 3 into 81 minus 237 why did I do this exercise just to express 6 in terms of my a and b which was 81 into 37 isn't it now so now the 75 was expressed like this now how can I replace 6 so 6 can be replaced as this 3 into 81 minus 237 and then multiplied by this 12 which is here so bring it down into 12 now if you notice I have all the terms here in this expression which are having which is having 237 or 81 so let us simplify it further so I get 3 equals so 237 and then minus 2 into 81 and then from here 12 into 3 into 81 that is minus 36 12 into 3 is 36 times 81 and then minus minus plus and it is 237 into 12 if you see this is the simplification so finally combining all the all the common terms so for example I can take 237 common here so it becomes 237 into 13 isn't it 237 into 13 and here if you see I take 81 common so if I take 81 common I will get 38 isn't it 38 so finally this can be expressed as so 3 can be expressed as now 237 into 13 plus 81 into minus 38 minus 38 so 3 was expressed as 3 237 into 13 81 into minus 38 so if you see this is my a I think this was taken as a yes this was a and this is my x this is my b and this was was y right so this is what so gcd gcd of 237 comma 81 can be expressed as 13 times 237 plus minus 38 times 81 this is what is called linear combination okay I hope you understood this problem we will be solving a few more problems in this video series and in case you have any doubts you can always reach out to us by putting in comments below in the comment section thanks a lot for watching this video