Finding x in Modular Equations with Large Exponents

  • Context: Graduate 
  • Thread starter Thread starter coolul007
  • Start date Start date
  • Tags Tags
    Modulus
Click For Summary

Discussion Overview

The discussion revolves around solving modular equations involving large exponents, specifically focusing on the relationships between variables defined by modular conditions. Participants explore methods to find a specific variable without directly calculating large numbers, while considering the implications of the Chinese Remainder Theorem and properties of modular arithmetic.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks a method to determine x in the equations n == a mod(m), m == b mod(r), and n == x mod(r) without calculating large values of n.
  • Another participant notes that any solution, if it exists, will be unique modulo lcm(m,r) and questions whether this lcm is too large for practical purposes.
  • There is a suggestion to analyze how many solutions can be derived from the first two equations, which already yield a value for n.
  • Clarification is made that r is fixed to be less than m, and the participant emphasizes the importance of choosing m for predictable results on n.
  • A later reply proposes that the problem may be simplified to solving just the last equation and suggests considering Euler's theorem and the coprimality of the base with the modulus.
  • Another participant mentions that the exponentiation can be computed more efficiently using binary representation of the exponent, allowing for intermediate reductions modulo m.
  • One participant indicates that their exponents are extremely large, specifically powers of 2, and expresses intent to investigate modular properties further.

Areas of Agreement / Disagreement

Participants express various methods and considerations for solving the modular equations, but there is no consensus on a definitive approach or solution. Multiple competing views and techniques are presented, reflecting the complexity of the problem.

Contextual Notes

Participants have not fully resolved the implications of their assumptions regarding the relationships between n, m, and r, nor have they clarified the specific conditions under which certain theorems apply.

coolul007
Gold Member
Messages
271
Reaction score
8
I am wondering if there is a way to solve the following: (Chinese Remainder Theorem does not apply)

n == a mod(m)

m == b mod(r)

n == x mod(r), I need to know x, without dealing with a gigantic number(n),

I can find a and b, as I chose m to give me predictable results.

I appreciate any insight...

Sorry, for not including work so far, etc. Here is an example of what I am trying to do with manageable numbers:

5^(2)^13 = 5^8192 == 25 mod(5^13 -1), (always comes out 5^2)

5^13 - 1 == 614 mod(7927)

5^8192 == ? mod(7927) here is my dilemma. I know Power Residues will eventually crank out an answer, but my exponents are so large that it is prohibitive.
 
Last edited:
Physics news on Phys.org
Hello,
any solution, if it exists, will be unique modulo lcm(m,r). Is that lcm too "gigantic" for your purposes?

Also, I'd try to think how many solutions are there using only the first two equations, since those already produce a value for n. (Hope this helps.)

Edit: Hmmm, more to the point: exactly what is fixed and what can be moved? It sounds like only m is taken as fixed. In that case, what is wrong with any r > m, b=m, and any n=a=x < m ?
 
Last edited:
Dodo said:
Hello,
any solution, if it exists, will be unique modulo lcm(m,r). Is that lcm too "gigantic" for your purposes?

Also, I'd try to think how many solutions are there using only the first two equations, since those already produce a value for n. (Hope this helps.)

Edit: Hmmm, more to the point: exactly what is fixed and what can be moved? It sounds like only m is taken as fixed. In that case, what is wrong with any r > m, b=m, and any n=a=x < m ?

r is fixed to be less than m, in fact r is a number less than m, I chose m because it has predictable results on n. The problem remains n == ? mod(r), knowing n,m,r as being fixed.
 
Ah. If I understand you correctly, your problem is just solving the last equation, not really a system of 3. Here are some ideas, but they depend on what else do you know about your numbers:

- Is Euler's theorem applicable?
- Does the base (in your example, 5) is coprime to the modulus? (Thus, has an inverse)

Where I'm going to, is that maybe your big exponentiation a^big can be reduced if you know that a^something == 1.

-- Edit:

All this not helping, there are ways of computing the exponent without too much hassle. For example, say the exponent is 11. (Could be much bigger as well.) In binary, this exponent is 11=8+2+1. So a^11 = a^8 * a^2 * a^1 . In practice, you begin with the base a, and square it on each iteration; whenever a bit in the exponent is one, you multiply that power of a into an accumulator (which began as 1). Notice that there are plenty of intermediate steps to reduce modulo m.
 
Last edited:
My exponents are on the order of 2^9,876,543 not the real exponents, but size is right. It is always a power of 2. The base is 5. Thank you for the leads, I will investigate a^something == 1 mod(r).
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 8 ·
Replies
8
Views
8K