Question

In: Computer Science

Show that he gcd of 63 and 40 is 1 and find all integer solutions: 63s...

Show that he gcd of 63 and 40 is 1 and find all integer solutions: 63s + 40t = 1. Use the Euclidean algorithm to find the gcd. Then back solve to find s and t.

To get full credit, use the format shown in the post below titled Bezout's Theorem. (See the example where we find the gcd of 18 and 5.)

Bézout's theorem says

"If  d is the gcd of m and n then we can find integers s and t such that ms + nt = d."

To find s and t we first compute d using the Euclidean algorithm. Then we can backsolve to express d in terms of m and n.

Example: Find all integer solutions to 18s + 5t = 1. (So 18 is m, 5 in n and 1 is d in Bézout's Theorem.)

18 =3(5) + 3

5 = 1(3) + 2

3 = 1(2) + 1.

2 = 2(1) + 0.

Since 1 is the last nonzero remainder, it's the gcd of 18 and 5.

Now we can back solve to find a linear combination of 18 and 5 that equals 1:

1 = 3 - 2

= 3 - (5 - 3)

= -5 + 2(3)

= -5 + 2(18 - 3(5))

= 2(18) - 7(5).

In this example 18 and 5 are m and n. So s = 2 and t = -7.

Call the initial two solutions s0 and t0.

To get all solutions use s = s0 + (n/d)k and t = t0 - (m/d)k.

In the example above we get s = 2 + 5k and t = -7 - 18k.

For example, taking k = -1 gives s = -3 and t = 11. We can check that these values work: -3(18) + 11(5) = -54 + 55 = 1.

Or taking k = 2, gives s = 12 and t = -43. Again we can check that the values work: 12(18) - 43(5) = 216 - 215 = 1.

Solutions

Expert Solution

Show that he gcd of 63 and 40 is 1 and find all integer solutions: 63s + 40t = 1.

Comparing the given equation with ms + nt = d , we get  63 is m, 40 is n and 1 is d (Bézout's Theorem)

63 =1(40) + 23

40 = 1(23) + 17

23 = 1(17) + 6

17 = 2(6) + 5

6 = 1(5) + 1

5 = 5(1) + 0

Since 1 is the last nonzero remainder, it's the gcd of 63 and 40.

Now we can back solve to find a linear combination of 63 and 40 that equals 1:

1 = 6 - 5

= 6 - [ 17 - 2(6) ]

= -17 + 3 (6)

= -17 + 3 [ 23 - 17 ]

= - 4(17) + 3 (23)

= -4 [ 40-23 ] + 3 (23)

= -4(40) +7(23)

= -4(40) +7[ 63 - 40 ]

= -11(40) + 7(63)

In this example 63 and 40 are m and n. So s = 7 and t = -11.

Call the initial two solutions s0 and t0.

To get all solutions use s = s0 + (n/d)k and t = t0 - (m/d)k.

In the example above we get s = 7 + 40k and t = -11 - 63k.

For example, taking k = 1 gives s = 47 and t = -74. We can check that these values work: 47(63) - 74(40) = 2961 - 2960 = 1.

Or taking k = 3, gives s = 127 and t = -200. Again we can check that the values work: 127(63) - 200(40) = 8001 - 8000 = 1.


Related Solutions

Write a Diophantine Equation program in C++. Find integer solutions to Ax + By = GCD...
Write a Diophantine Equation program in C++. Find integer solutions to Ax + By = GCD (A, B) Ex: a = 3, b = 6, c = 9 a = 2, b = 5 , c = 1
Find all integer solutions to the equation: a) 105x + 83y = 1 b) 105x +...
Find all integer solutions to the equation: a) 105x + 83y = 1 b) 105x + 83y = 8
All necessary steps much show for these problems, please. Use the Euclidean algorithm to find gcd(12345,...
All necessary steps much show for these problems, please. Use the Euclidean algorithm to find gcd(12345, 54321). Write gcd(2420, 70) as a linear combination of 2420 and 70. The work to obtain the gcd is provided. 2420 = 34(70) + 40 70 = 1(40) + 30 40 = 1(30) + 10 30 = 3(10) + 0 Determine if 1177 is prime or not. If it is not, then write 1177 as a product of primes Find gcd(8370, 465) by unique...
Find the general form of all (integer) solutions for the equation 22x+48y+4z = 18.
Find the general form of all (integer) solutions for the equation 22x+48y+4z = 18.
Find the greatest common divisor d = gcd(527, 341). Show all calculation steps. We assume that...
Find the greatest common divisor d = gcd(527, 341). Show all calculation steps. We assume that the modulus is a positive integer. But the definition of the expression a mod n also makes perfect sense if n is negative. Determine the following: a. 7 mod 4 b. 7 mod -4 c. -7 mod 4 d. -7 mod -4
63, 40, 40, 39, 56, 45, 48, and 76 a. Find the sample mean b. Find...
63, 40, 40, 39, 56, 45, 48, and 76 a. Find the sample mean b. Find the sample median c. Find the sample mode d. Find the sample range e. Find the lower and upper quarrtiles, and the sample interquartile range IQR Q1= Q3= IQR= f. Display the data with a boxplot (with fences and whiskers) Fences: g. Write a brief description of this data (symmetry, outliers) h. Which is the better summary measure of these data, the mean or...
This is a combinatorics problem Suppose we wish to find the number of integer solutions to...
This is a combinatorics problem Suppose we wish to find the number of integer solutions to the equation below, where 3 ≤ x1 ≤ 9, 0 ≤ x2 ≤ 8, and 7 ≤ x3 ≤ 17. x1 + x2 + x3 = r Write a generating function for this problem, and use it to solve this problem for r = 20.
find the integer solutions to A^2 + 2*B^2 = C^2?
find the integer solutions to A^2 + 2*B^2 = C^2?
using 8 bits and 2s complement integer arithmetic, show how a processor would calculate 63 -...
using 8 bits and 2s complement integer arithmetic, show how a processor would calculate 63 - 17
Let gcd(a, p) = 1 with p a prime. Show that if a has at least...
Let gcd(a, p) = 1 with p a prime. Show that if a has at least one square root, then a has exactly 2 roots. [hint: look at generators or use x^2 = y^2 (mod p) and use the fact that ab = 0 (mod p) the one of a or b must be 0(why?) ]
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT