Use the binary exponentiation algorithm to compute....

  • Thread starter Thread starter Math100
  • Start date Start date
  • Tags Tags
    Algorithm Binary
AI Thread Summary
The discussion focuses on using the binary exponentiation algorithm to compute modular exponentiation, specifically for 19 raised to the power of 53 modulo 503 and 141 raised to the power of 47 modulo 1537. The calculations show that 19^53 modulo 503 equals 406, while 141^47 modulo 1537 equals 658. The binary representation of the exponents is utilized to simplify the calculations, breaking them down into smaller powers. An alternative method for the second calculation is mentioned, involving the modular inverse, which may be useful for smaller moduli. Overall, the results of both computations are confirmed to be accurate.
Math100
Messages
813
Reaction score
229
Homework Statement
Use the binary exponentiation algorithm to compute both ## 19^{53}\pmod {503} ## and ## 141^{47}\pmod {1537} ##.
Relevant Equations
None.
First, consider ## 19^{53}\pmod {503} ##.
Then ## 53=(110101)_{2}=2^{5}+2^{4}+2^{2}+1=32+16+4+1 ##.
Note that
\begin{align*}
19^{2}\equiv 361\pmod {503}\\
19^{4}\equiv 44\pmod {503}\\
19^{8}\equiv 427\pmod {503}\\
19^{16}\equiv 243\pmod {503}\\
19^{32}\equiv 198\pmod {503}.\\
\end{align*}
Thus ## 19^{53}\equiv (19^{32}\cdot 19^{16}\cdot 19^{4}\cdot 19)\pmod {503}\equiv (198\cdot 243\cdot 44\cdot 19)\pmod {503} ##.
Therefore, ## 19^{53}\equiv 406\pmod {503} ##.
Next, consider ## 141^{47}\pmod {1537} ##.
Then ## 47=(101111)_{2}=2^{5}+2^{3}+2^{2}+2+1=32+8+4+2+1 ##.
Note that
\begin{align*}
141^{2}\equiv 1437\pmod {1537}\\
141^{4}\equiv 778\pmod {1537}\\
141^{8}\equiv 1243\pmod {1537}\\
141^{16}\equiv 364\pmod {1537}\\
141^{32}\equiv 314\pmod {1537}\\
\end{align*}
Thus ## 141^{47}\equiv (141^{32}\cdot 141^{8}\cdot 141^{4}\cdot 141^{2}\cdot 141)\pmod {1537}\equiv (314\cdot 1243\cdot 778\cdot 1437\cdot 141)\pmod {1537} ##.
Therefore, ## 141^{47}\equiv 658\pmod {1537} ##.
 
Physics news on Phys.org
I checked the first one in detail and both results. Everything is fine.

Only a remark on the second one: you can alternatively calculate
$$
\dfrac{{141}^{32}\cdot {141}^{16}}{141} = {141}^{32}\cdot {141}^{16}\cdot 1428 \pmod {1537}
$$
but I had the computer calculate ##141^{-1} =1428 \pmod {1537}## so I do not know whether this is really an improvement. However, it is something to keep in mind for modules smaller than ##1537##.
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Back
Top