Use the binary exponentiation algorithm to compute....

In summary, the first part of the conversation discusses finding the value of ##19^{53}\pmod {503}## using binary exponentiation and modular arithmetic. The second part discusses finding the value of ##141^{47}\pmod {1537}## using a similar method. Both results are verified and the second part suggests an alternative method for calculating the value.
  • #1
Math100
802
222
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
  • #2
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##.
 
  • Like
Likes Math100

FAQ: Use the binary exponentiation algorithm to compute....

What is the binary exponentiation algorithm?

The binary exponentiation algorithm is a mathematical algorithm used to efficiently compute large powers of a number. It is based on the concept of repeated squaring and is commonly used in computer programming and cryptography.

How does the binary exponentiation algorithm work?

The algorithm works by breaking down the exponent into its binary representation and using the properties of exponents to compute the result in a faster and more efficient manner. It reduces the number of multiplication operations needed, making it much faster than the traditional method of repeated multiplication.

What are the advantages of using the binary exponentiation algorithm?

The main advantage of using this algorithm is its efficiency. It significantly reduces the number of multiplication operations needed, making it much faster than other methods of computing large powers. It is also relatively easy to implement and can handle very large numbers without any loss of precision.

When is the binary exponentiation algorithm typically used?

The algorithm is commonly used in computer programming and cryptography, where large powers of numbers need to be computed efficiently. It is also used in applications that involve modular arithmetic, such as in encryption and decryption processes.

Are there any limitations to the binary exponentiation algorithm?

While the algorithm is efficient for computing large powers, it may not be the best choice for smaller exponents. It also requires the use of binary representation, which may not be suitable for all applications. Additionally, the algorithm may not be as efficient when dealing with very large numbers with a high number of digits.

Similar threads

Replies
5
Views
2K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
2
Views
2K
3
Replies
93
Views
12K
Replies
3
Views
2K
Back
Top