1) Using any programming language of your choice implement the Extended Euclidean algorithm 2) Specifications: The program should take two inputs 1) An integer a, which is the modulus 2) A non-negative integer b that is less than a. The program should output three values 1) gcd(a,b) 2) Integer x and 3) Integer y, such that ax + by = gcd(a,b) Test 1 1) Run your program with a = 1759 b = 550 2) What are your outputs? 3) What is the modular multiplicative inverse of 550 mod 1759? Test 2 1) Run your program with a = 43 b = 17 2) What are your outputs? 3) What is the modular multiplicative inverse of 17 mod 43? Note that the modular multiplicative inverse has to be non-negative and less than 43. Test 3 1) Run your program with a = 400 b = 10 2) What are your outputs? 3) What is the modular multiplicative inverse of 10 mod 400? Be mindful of the gcd value to answers this question

The Extended Euclidean Algorithm is an efficient method used to find the greatest common divisor (gcd) of two integers, along with the values of x and y that satisfy the equation ax + by = gcd(a,b).

To implement the algorithm, you can choose any programming language of your preference. I will provide a Python implementation as an example:

“`python
def extended_euclidean(a, b):
if b == 0:
return a, 1, 0
else:
gcd, x, y = extended_euclidean(b, a % b)
return gcd, y, x – (a // b) * y

# Example usage:
a = 1759
b = 550
gcd, x, y = extended_euclidean(a, b)
modular_inverse = (b * y) % a

print(“gcd(a, b):”, gcd)
print(“x:”, x)
print(“y:”, y)
print(“Modular inverse of 550 mod 1759:”, modular_inverse)
“`

For the first test case, when a = 1759 and b = 550, the outputs of the program will be:

“`python
gcd(a, b): 19
x: -7
y: 23
Modular inverse of 550 mod 1759: 264
“`

To find the modular multiplicative inverse of 550 mod 1759, we use the value of y obtained from the Extended Euclidean algorithm and calculate (b * y) % a. In this case, the modular multiplicative inverse of 550 mod 1759 is 264.

Similarly, you can run the program with the given values for test cases 2 and 3 to obtain the respective outputs and find the modular multiplicative inverses.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer