Sunday, January 5, 2025

2025/002) What is the general solution of the linear diophantine equation $63x-23y=-7$

 Because $GCD(63,23) =1 $ so this has a solution. 

Now let us find a particular solution a and b such that $63a + 23b= 1$

For this we shall use extended Euclidean algorithm.

We have

$63= 2 * 23 + 17\cdots(1)$

$23= 17  + 6\cdots(2)$

$17= 2 * 6 + 5\cdots(3)$

$6= 5 + 1\cdots(4)$

as we have got 1 as the last remainder we are done,.

Now let us work back wards to see

$1= 6- 5$

$=6- (17 - 2 *6)$ from (3)

$= 3 * 6 - 17$

$= 3 * (23-17)  - 17$ from (2)

$= 3 * 23- 4 * 17$

$= 3 * 23 - 4 * (63-2 * 23)$ from (1)

$=11 * 23 - 4 * 63$

So we have $ 1= 11 * 23 - 4 * 63$

Hence $ -7 = - 77 * 23 + 28 * 63$

The above solution is correct however we can reduce the absolute value of coefficients of 23 and 63 by adding 63 to 1st one and subtracting 23 from 2nd one to get

$-7 = 5 * 63- 14 * 23$

so $(x,y) = (5,14)$ is a solution and general solution is $5 + 23t,14+63t)$ as $23 * 63 - 63 * 23 = 0$ 


No comments: