Modular Exponentiation
Loading...
3,198
Loading...
Uploader Comments (timfarage)
see all
All Comments (14)
-
good video Thanks :)
-
Why do you sound so familiar?? Oh wait...
-
If this is without a calculator who the heck knows 5^32 off the top of their heads?!?! no one!!!!
-
thax foh this video..was helpful..
-
Thanks so much !
-
This was very helpful, the example in my book is very bad, but it makes sense after seeing someone do it. Not too hard after all, thanks
Loading...
Thanks for the explanation. If possible, does this idea follow thru for a fast multiplication process? I am attempting to multiply two very large numbers each being apx 500 mil digits resulting in a 1 gig digit number. Been using gmp library but ran out of ram so I need to think of another method that is comparably fast.
opreese 3 weeks ago
@opreese Unfortunately, it doesn't apply to multiplying any two integers, although it does apply to raising an integer to an integer power even without mods, although the numbers can get big fast.
Have fun computing a 1 billion digit number!
timfarage 3 weeks ago
I'm glad you recognized me. For the rest of you, I am the Ghost of Christmas Past.
timfarage 3 months ago
You're right, no one knows 5^32 off the top of their head. But if you follow the algorithm I show in the video you can calculate,say, 5^32 mod 7 without even using a calculator. And very quickly as well. The secret is that when you raise a number to a power mod N, the fact that you are taking the modulus allows for the fast algorithm I give to work.
timfarage 4 months ago
Glad to have helped. Wouldn't want you to have lost your *ss.
timfarage 9 months ago