Finding x through mod regarding G.C.D

  • Context: Undergrad 
  • Thread starter Thread starter joao_pimentel
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around solving a system of congruences involving the greatest common divisor (G.C.D) of two coprime integers, m and n. Participants explore methods to find a value of x that satisfies the given modular equations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant presents a problem involving finding x such that x ≡ 3 (mod n) and x ≡ 2 (mod m), given that G.C.D(m,n) = 1.
  • Another participant suggests researching the "Chinese remainder theorem" and mentions the "Euclidean algorithm" as potentially useful topics.
  • A different participant attempts to develop the system of equations and expresses that they have derived a relationship involving the fractions of q_1 and q_2, but seeks further assistance to continue.
  • One participant introduces Bézout's identity, explaining that it guarantees the existence of integers a and b such that ma + nb = 1, which can be used to find x.
  • This same participant provides a method to express x in terms of a and b, noting that there are multiple solutions due to the periodic nature of modular arithmetic.

Areas of Agreement / Disagreement

Participants present various approaches and insights, but there is no consensus on a single method or solution. The discussion includes different perspectives on how to proceed with the problem.

Contextual Notes

Some participants reference mathematical concepts that may require further exploration, such as Bézout's identity and the Chinese remainder theorem, which could have dependencies on prior knowledge or definitions.

joao_pimentel
Messages
68
Reaction score
0
Hi, my problem is this one:
____

G.C.D of (m,n)=1

x ≡3 (mod n)
x ≡2 (mod m)

Find x.

______

Just kindly tell me which subjects shall I study, and kindly give me some quick web references...
web articles, web pages, etc...

I'm around this problem and I can't find anything.

I know that

[tex]x=q_1 n+3[/tex]

[tex]x=q_2 m +2[/tex]

and i know the fraction [tex]\frac{m}{n}[/tex] is irredutible, but which next steps shall I give?

Thank you
 
Physics news on Phys.org
Hi, Joao,
you need to google for the "chinese remainder theorem". The Wikipedia page can be a bit obscure depending on your background; this page may be more clear:
http://www.math.okstate.edu/~wrightd/crypt/lecnotes/node21.html

It may point you to study other things first, like the "Euclidean algorithm".
Hope this helps!
 
I tried to develop the system considering [tex]q_1[/tex] and [tex]q_2[/tex] are naturals...

[tex]\begin{cases}<br /> x=q_1 n+3 \\<br /> x=q_2 m+2 \\<br /> \end{cases}[/tex]

I developed then and I saw that:

[tex]\frac{m}{n}=\frac{q_1}{q_2}\frac{x-2}{x-3} \ \ q_1,q_2 \in \mathbb{N}[/tex]

I know that G.C.D(m.n)=1, then these are Irreducible fractions

can you kindly help out to continue?
 
Here is a simpler version of the story, hopefully.

When working with coprime numbers like your m,n, numbers such that GCD(m,n)=1, a common strategy is to rely on something called "Bézout's identity": it says that it is always possible to find other integers a,b, such that ma+nb=1. Assume the existence of these other integers a,b for the moment; we can go into more detail later as to why they exist, or you can google that for yourself.

Notice, then, that the equation ma+nb=1, which we can write as either ma - 1 = n(-b), or as nb - 1 = m(-a), implies respectively that:
ma ≡ 1 (mod n), and
nb ≡ 1 (mod m)

Now you're almost done, as the x you are looking for is x = 3ma + 2nb. It's not hard to see that this x, modulo n, is 3 . 1 + 0 = 3, and modulo m it is 0 + 2 . 1 = 2, which is what you wanted.

The issue, then, is that you convince yourself about the truth of Bézout's identity, which is a very common trick in dealing with numbers whose GCD is 1.

--------------
P.S.:
In your particular example, given that you have integers [itex]q_1[/itex], [itex]q_2[/itex] such that
[tex]\begin{cases} <br /> x=q_1 n+3 \\ <br /> x=q_2 m+2 \\ <br /> \end{cases}[/tex]
then, as the two right-hand sides are both equal to x, they are equal among themselves, and
[tex]q_1 n + 3 = q_2 m + 2[/tex]
It follows that
[tex]q_1 n + 1 = q_2 m[/tex]
which can be written as
[tex]q_2 m - q_1 n = 1[/tex]
so the integers a,b I was talking about before, are [itex]a=q_2[/itex] and [itex]b=-q_1[/itex].

Thus your solution is x = 3ma + 2nb = [itex]3 m q_2 - 2 n q_1[/itex]. (Actually, there are many other solutions, as adding or subtracting any multiple of mn will produce another solution; there will be only one solution in the interval between 0 and mn-1, both inclusive.)
 
Last edited:
Thank you very much for your kind attention

Best regards
 

Similar threads

  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
48
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K