Solve the congruence to the smallest possible modulus.

  • Thread starter Thread starter sg001
  • Start date Start date
  • Tags Tags
    Modulus
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
sg001
Messages
134
Reaction score
0

Homework Statement



solve the congruence to the smallest possible modulus.

38x[itex]\equiv[/itex]10 (mod84)



Homework Equations





The Attempt at a Solution



Ok so I thought I knew how to do these but apparently not.

So I start out by

38x+84y = 10

Now I think I should find the gcd so I can simplify

so

84 = 38(2) + 8[itex]\Rightarrow[/itex] 8= 84 - 38(2)

38= 8(4) + 6 [itex]\Rightarrow[/itex] 6= 38 - 8(4)

8 = 6(1) + 2 [itex]\Rightarrow[/itex] 2 = 8 - 6(1)

6 = 2(3) + 0 [itex]\Leftrightarrow[/itex] gcd = 2

so 19x + 42y = 5


but then where? I seem to get lost at this point?
 
Physics news on Phys.org
You need to use GCD algorithm, but not just to find GCD. It's a more powerful tool. Let me demonstrate.

Lets start with your simplified version, 19x=5 (mod42), which you turn into 19x+42y=5. But if you know x, you know y. If you know y, you know x. So we can switch things around.

42y=5 (mod19)

Except 42>19, and we can take 19 away twice.

4y=5 (mod19)

Better! But why should we stop?

4y+19z=5

19z=5 (mod4)

3z=5 (mod4)

3z+4w=5

4w=5 (mod3)

w=5

Woo-hoo! Now, you can use w to find z, z to find y... I'll let you do all that.
 
K^2 said:
You need to use GCD algorithm, but not just to find GCD. It's a more powerful tool. Let me demonstrate.

Lets start with your simplified version, 19x=5 (mod42), which you turn into 19x+42y=5. But if you know x, you know y. If you know y, you know x. So we can switch things around.

42y=5 (mod19)

Except 42>19, and we can take 19 away twice.

4y=5 (mod19)

Better! But why should we stop?

4y+19z=5

19z=5 (mod4)

3z=5 (mod4)

3z+4w=5

4w=5 (mod3)

w=5

Woo-hoo! Now, you can use w to find z, z to find y... I'll let you do all that.

ok good got it now thanks.