Congruence behaves well with respect to operations: you can “reduce modulo ” at any moment of the computation, which makes even otherwise enormous powers feasible.
Property — Compatibility with operations
If and , then Modular arithmetic “respects” the operations of sum, product and power. Not always division: does not imply (also works). Modular division requires .
Example — Fast computation of modular powers
. By Fermat . Then
Links
Topics: Distribuzioni probabilita
Concepts: Aritmetica modulare · Congruenza
Methods: Aritmetica modulare
Skills: Calcolare · Usare formule