Solving large #s raised to a large # with the mod function

  • Thread starter Fresh4Christ
  • Start date
  • Tags
    Function
In summary, the problem asks to solve for the remainder when raising large numbers to even larger exponents and taking the modulo of a given number. The first attempt was to use a calculator, but this resulted in an incorrect answer. So, the approach was to break down the problem into smaller parts and use manipulations such as squaring and reducing mod to simplify the calculations. This method can be optimized by noticing patterns and using clever manipulations.
  • #1
Fresh4Christ
10
0

Homework Statement



Both of these questions are similar but the second is much larger so I thought I would post them both.

Solve:
1) 252^(611) mod 1207

2) 8126^(3461) mod 8549



Homework Equations



Well, the most difficult part is that the numbers are so large you cannot just put it in the calculator.

When you mod a number you are just looking for the remainder after you divide.

The Attempt at a Solution



First I tried just putting it in my calculator and my calculator responded with infinity as the answer, which is not correct.

So I started thinking about what I know about mod's. I know my answer for the first question will be in the quantity 0<=ANSWER<=1206 and my second question will be 0<=ANSWER<=8548.

So I tried to break up the exponent into smaller values such as 252^10 * 252^10 * ... but I realized that this would take really long and for my second question, that method would not be practical. So there has got to be someway to break the number down to a size the calculator can handle. Also the mod function by definition would be a great way to reduce that number if there was some way I could mod the number before taking the exponents when I break it down, but I'm not sure the rules and manipulates required to adjust the problem. There just has to be a better way to solve this type of a problem. Could you help? Thanks.
 
Physics news on Phys.org
  • #2
If you just want to calculate them you can do it this way. Take your first example. Find
252^2 mod 1207=740. Now to get 252^4 square 740 mod 1207.
252^4 mod 1207=829. Now to get 252^8 square 829 mod 1207.
252^8 mod 1207=458. Keep repeating
252^16 mod 1207=953
252^32 mod 1207=545
252^64 mod 1207=103
252^128 mod 1207=953
252^256 mod 1207=545
252^512 mod 1207=103

Now 611=512+64+32+2+1. So you can just multiply the corresponding numbers from the table and reduce mod 1207. If you are clever, you can save even more time. Notice the 16 and 128 entries are the same. So 252^(128-16) mod 1207=1. Can you see how that would help?
 
  • #3


I understand the challenge of solving large numbers raised to even larger numbers. In this case, the use of the mod function is a smart approach. The mod function allows us to find the remainder after dividing a number, and it is especially useful when dealing with large numbers.

To solve these problems, we can use the following formula:
(a^b) mod c = ((a mod c)^b) mod c

Using this formula, we can break down the large numbers into smaller, more manageable ones. For the first problem, we can rewrite it as (252 mod 1207)^611 mod 1207. Now we just need to find the remainder of 252 divided by 1207, which is 252. So our new problem becomes 252^611 mod 1207. This is much more manageable than the original problem and can be easily solved using a calculator or by hand.

For the second problem, we can use the same formula to break it down into smaller parts. We can rewrite it as (8126 mod 8549)^3461 mod 8549. Again, we just need to find the remainder of 8126 divided by 8549, which is 8126. So our new problem becomes 8126^3461 mod 8549. This can also be solved using a calculator or by hand.

Overall, the use of the mod function is a great way to solve these types of problems. It allows us to break down large numbers into smaller ones and find the remainder, making the calculations much easier. I hope this helps with your homework and understanding of the mod function.
 

What is the mod function?

The mod function, short for modulus function, calculates the remainder after dividing one number by another.

How do I solve large numbers raised to a large number with the mod function?

To solve this type of problem, you can use the property that (a^b) mod n is equal to [(a mod n)^b] mod n. This allows you to break down the problem into smaller parts and solve it more efficiently.

What is the purpose of using the mod function in this type of problem?

The mod function is useful in solving large numbers raised to a large number because it can help reduce the size of the numbers being calculated, making it easier to work with and less prone to errors.

What are some applications of solving large numbers raised to a large number with the mod function?

The mod function is commonly used in cryptography and computer science algorithms, as well as in number theory and modular arithmetic.

What are some tips for solving large numbers raised to a large number with the mod function?

Some tips for solving these types of problems include breaking down the numbers into smaller parts, using the property mentioned earlier, and simplifying the numbers as much as possible before using the mod function.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
28
Views
3K
  • Precalculus Mathematics Homework Help
Replies
15
Views
525
  • Precalculus Mathematics Homework Help
Replies
7
Views
275
  • Precalculus Mathematics Homework Help
Replies
4
Views
3K
  • Quantum Physics
Replies
3
Views
907
  • Precalculus Mathematics Homework Help
Replies
10
Views
886
  • Precalculus Mathematics Homework Help
Replies
10
Views
567
  • Precalculus Mathematics Homework Help
Replies
13
Views
783
  • Precalculus Mathematics Homework Help
Replies
3
Views
2K
  • Mechanical Engineering
Replies
12
Views
1K
Back
Top