How do I use Fermat's Little Theorem to solve for x in F19?

Click For Summary
SUMMARY

This discussion focuses on solving modular equations using Fermat's Little Theorem and the Extended Euclidean Algorithm. The primary example involves solving the equation 3x + 50 = 11 in F53, where the inverse of 3 modulo 53 is calculated as 18. The solution for x is determined to be 40 after applying the inverse. A secondary example of solving 7x + 2 = 2 - 100 in F19 is also presented, emphasizing the use of Fermat's theorem to simplify calculations, specifically that 2^{-100} mod 19 can be reduced to 2^{-10}.

PREREQUISITES
  • Understanding of modular arithmetic
  • Familiarity with Fermat's Little Theorem
  • Proficiency in the Extended Euclidean Algorithm
  • Basic algebraic manipulation in modular systems
NEXT STEPS
  • Study the application of Fermat's Little Theorem in various modular equations
  • Practice solving equations using the Extended Euclidean Algorithm
  • Explore the properties of modular inverses in different fields
  • Learn to simplify large powers in modular arithmetic
USEFUL FOR

Students and educators in number theory, mathematicians working with modular arithmetic, and anyone interested in solving equations in finite fields.

PolyFX
Messages
30
Reaction score
0

Homework Statement


Solve 3x + 50 = 11 in F53

Homework Equations


Extended Euclidean Algorithm

The Attempt at a Solution



To find 3-1 mod 53 using the euclidean algorithm:

gcd(53,3)

1)53/3 = 17 + 2R

53 = 17 * 3 + 2
2 = 53 - 17 * 3

3/2 = 1 + 1R

3 = 1 * 2 + 1
1 = 3 - 1 * 2 = 3 - 2Now going from reverse;

1 = 3 - (53 - 17 * 3)
= 3 - 53 + 17 * 3
= 18*3 - 53

3-1 = 18 mod 53

3x + 50 = 11
3x = 11 - 50 mod53 ==> 3x = -39 mod 53
3x = 14 mod 53

I'm stuck after this step. How do I solve for x?

-Thanks
 
Physics news on Phys.org
When your at 3x=14, just multply both sides by 18=3^{-1}. You should get there then...
 
micromass said:
When your at 3x=14, just multply both sides by 18=3^{-1}. You should get there then...

Hi micromass,

So

3x = 14 mod 53
18 * 3x = 18 * 14 mod 53

Is it safe to assume that 18 * 3x = x since 3*3-1 = 1?

therefore

x = 18 * 14 mod 53
= 252 mod 53
= 40 mod 53

Is this the correct approach?

-Thanks
 
PolyFX said:
Hi micromass,

So

3x = 14 mod 53
18 * 3x = 18 * 14 mod 53

Is it safe to assume that 18 * 3x = x since 3*3-1 = 1?

therefore

x = 18 * 14 mod 53
= 252 mod 53
= 40 mod 53

Is this the correct approach?

-Thanks

It looks fine. Check it. Put x=40 in your original equation. Does it work?
 
Dick said:
It looks fine. Check it. Put x=40 in your original equation. Does it work?

Haha of course. Yep, I plugged in 40 back into the original equation and I got

3x + 50 = 11 mod 53
3(40) + 50 = 11 mod 53
120 => 11 mod 53


However, I have another question

Say you're given something like this

"Solve 7x + 2 = 2-100 in F19"

I tried doing this the same way as the previous problem but once again I am stuck. Here is what I have so far.


Find 7-1 mod 19

gcd(19,7)

19/7 = 2 + 5R

19 = 2 * 7 + 5
5 = 19 - 2 * 7


7/5 = 1 + 2 R

7 = 1 * 5 + 2
2 = 7 - 1*5

5/2 = 2 + 1
5 = 2 * 2 + 1
1 = 5 - 2 * 2

Going from reverse:

1 = 5 - 2 * 2
= 5 - 2 * (7 - 5)
= 5 - 2*7 + 2*5
= 3*5 - 2*7
3*(19-2*7) - 2*7
=3*19 - 6*7 -2*7
=3*19 -8*7

Therefore 7-1 = -8 = 11 mod 19

7x = 2-100 - 2 mod 19

This is where I'm having problems. What do I do next?
 
Just multiply both sides by 7^{-1}.
Also, 2^{100} can be simplified by using Fermat's little theorem.
 
micromass said:
Just multiply both sides by 7^{-1}.
Also, 2^{100} can be simplified by using Fermat's little theorem.
Hi, I'm a little lost as to how to use Fermats Little Theorem to simplify.

2-100 mod 19

Since 19 is prime then that should mean that 218 mod 19 = 1.

So,

2-100 mod 19:

= 218 * -5 + (-10) mod 19
=(218)-5 * 510 mod 19
= 1-5 * 510 mod 19
= 510 mod 19

I need some assistance after this part however, I don't believe it is correct either.-Thanks
 
PolyFX said:
Hi, I'm a little lost as to how to use Fermats Little Theorem to simplify.

2-100 mod 19

Since 19 is prime then that should mean that 218 mod 19 = 1.

So,

2-100 mod 19:

= 218 * -5 + (-10) mod 19
=(218)-5 * 510 mod 19
= 1-5 * 510 mod 19
= 510 mod 19

I need some assistance after this part however, I don't believe it is correct either.


-Thanks

I don't see how that 510 gets there. The answer should be 2^{-100}=2^{-10}.

Now, 210 is easily calculatable, so finding its inverse should also pose no problem...
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
4
Views
2K
Replies
3
Views
8K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 15 ·
Replies
15
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K