Extended euclidean algorithm and Chinese Remainder theorem

In summary, the conversation discusses solving a system of congruences using the Euclidean algorithm and the extended Euclidean algorithm. The first step is to calculate the modulo M by multiplying the given moduli. Then, the individual Mi values are calculated by dividing M by each given modulus. The new congruences are then solved by finding the largest common divisor using the Euclidean algorithm and using the extended Euclidean algorithm to find a linear combination. This process is repeated for each congruence. Once a solution is found for each congruence, a solution to the entire system can be constructed using the linear combinations and the given values. The solution will be in modulo M and may require further reduction. The conversation ends with a question about how
  • #1
Mkorr
48
0

Homework Statement



Solve

x [itex]\cong[/itex] 1 mod 7
x [itex] \cong[/itex] 4 mod 6
x [itex] \cong [/itex] 3 mod 5

by (and I have to use this method) using Euclidean algorithm to find the largest common divisor, then the extended euclidean algorithm to find a linear combination, then a solution to each of the three modified congruences and then finally a solution to the system above.

The Attempt at a Solution



First I calculate the modulo M: M = m1*m2*m3 = 7*6*5 = 210.

Then I calculate the individual Mi:

M1 = 210 / 7 = 30
M2 = 210 / 6 = 35
M3 = 210 / 5 = 42

The new congruences I have to solve become:

30x1 [itex]\cong[/itex] 1 mod 7 (1)
35x2 [itex] \cong[/itex] 1 mod 6 (2)
42x3 [itex] \cong [/itex] 1 mod 5 (3)

Finding the largest common divisor (7, 30) using Euclidean algorithm for (1):

30 = 7*4 + 2
7 = 2*3 + 1
2 = 1*2 + 0

Largest common divisor (7, 30) is 1. Using the extended Euclidean algorithm to find a linear combination:

1 = 7 - 2*3
1 = 7 - (30 - 7*4) * 3
1 = 7 - 30 * 3 + 7 * 12
1 = 13*7 - 30*3

I have carried out this combination of the Euclidean algorithm and the extended Euclidean algorithm for (2) and (3), getting 6*6 - 1*35 and 17*5 - 2*42 respectively.

Using one of the linear combinations, one can calculate a solution for the corresponding congruence so I can use 1 = 13*7 - 30*3 to solve (1).

After I have found a solution for each of (1)-(3), I construct a solution to the system of congruences by using

x = b1M1x1 + b2M2x2 + b3M3x3

(where b is the 1, 4 and 3 respectively)

This constructed solution will be in modulo 210 and will most likely require some reduction.

Now, my problem is this: how do I get from a linear combination acquired from the extended euclidean algorithm (e. g. 1 = 13*7 - 30*3) to a solution to one of the equations (e. g. (1))?
 
Physics news on Phys.org
  • #2
I'm sorry if this question is too vague or if it's inappropriate but I have been working on this problem for the past few days and I can't figure out how to get from the linear combination to a solution.Thanks in advance for any help.
 

1. What is the Extended Euclidean Algorithm?

The Extended Euclidean Algorithm is a method for finding the greatest common divisor (GCD) of two integers, as well as the coefficients that make up the GCD. It is an extension of the Euclidean Algorithm, which only finds the GCD.

2. How does the Extended Euclidean Algorithm work?

The Extended Euclidean Algorithm works by using the same basic principle as the Euclidean Algorithm, but also keeps track of the coefficients used in each step. These coefficients are then used to find the GCD and its corresponding coefficients.

3. What is the Chinese Remainder Theorem?

The Chinese Remainder Theorem is a mathematical theorem that provides a method for solving systems of linear congruences. It states that if the moduli in the system are pairwise relatively prime, then there exists a unique solution that satisfies all the congruences.

4. How are the Extended Euclidean Algorithm and Chinese Remainder Theorem related?

The Extended Euclidean Algorithm is used in the Chinese Remainder Theorem to find the coefficients that satisfy the system of congruences. These coefficients are then used to find the unique solution to the system.

5. What are the applications of the Extended Euclidean Algorithm and Chinese Remainder Theorem?

The Extended Euclidean Algorithm and Chinese Remainder Theorem have many applications in number theory and cryptography. They are used in the RSA encryption algorithm, as well as in solving linear congruences in diophantine equations and in finding inverses in modular arithmetic.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
642
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
972
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
13
Views
946
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
2K
Back
Top