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

Click For Summary

Homework Help Overview

The discussion revolves around solving equations in finite fields, specifically focusing on the use of modular arithmetic and Fermat's Little Theorem. Participants are attempting to solve equations like 3x + 50 = 11 in F53 and 7x + 2 = 2 - 100 in F19.

Discussion Character

  • Mixed

Approaches and Questions Raised

  • Participants discuss finding modular inverses using the Extended Euclidean Algorithm and explore the implications of multiplying both sides of an equation by these inverses. There are questions about the validity of assumptions made during the simplification process, particularly regarding the application of Fermat's Little Theorem to simplify powers of 2 in modular arithmetic.

Discussion Status

Some participants have provided guidance on how to proceed with the calculations, while others express uncertainty about their methods and seek clarification on specific steps. There is an ongoing exploration of different interpretations and approaches without a clear consensus on the best method.

Contextual Notes

Participants are navigating the complexities of modular arithmetic and the application of Fermat's Little Theorem, with some expressing confusion over specific calculations and assumptions. There is mention of constraints related to the properties of prime numbers in the context of the problems being discussed.

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
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
4
Views
2K
Replies
3
Views
9K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
6K