Lecture 7: Modular Arithmetic and Fast Powering


This lecture introces the concept of modular arithmetic and presents a fast algorithm to compute the power of a number modulo another number. Constructive algorithms, based on the extended Euclidean algorithm, to compute modular inverses and solve the Chinese Remainder problem is presented. Finally, a modular algorithm for integer multiplication is discussed.

Background Material

Reading

Also study Maple's Power, mod, mods, numtheory[phi] and chrem functions.

Motivation

Topics

Maple worksheets and programs and other resources

Practice Assignment

  • affine.mw - Maple worksheet (practice problems) on modular arithmetic and Ceasar and Affine cyphers.
  • Created: April 21, 2008 by jjohnson AT cs DOT drexel DOT edu