M

Addition modulaire

addition mod

L'addition modulaire est une opération mathématique qui revient à zéro après avoir atteint une certaine valeur, appelée le modulo.

Addition modulaire is a mathematical operation that involves adding two integers and then taking the remainder when divided by a third integer known as the modulus. This operation is commonly used in various fields, including l'informatique, cryptography, and number theory.

Mathématiquement, l'addition modulaire peut être exprimée comme :

a + b (mod m)

Ici, a and b are the integers being added, and m is the modulus. The result of the operation is the remainder of the sum a + b when divided by m.

Par exemple, si nous voulons effectuer une addition modulaire avec a = 7, b = 5, and m = 6, we first add the two numbers:

7 + 5 = 12

Ensuite, nous trouvons le reste lorsque 12 est divisé par 6 :

12 mod 6 = 0

Ainsi, 7 + 5 (mod 6) = 0.

L'addition modulaire possède plusieurs propriétés importantes, notamment :

  • Fermeture : The sum of any two integers under a given modulus will always yield another integer within the same modulus.
  • Propriété associative : L'ordre dans lequel les additions sont effectuées n'affecte pas le résultat.
  • Propriété commutative : La somme reste la même quel que soit l'ordre des opérandes.

Ces propriétés rendent l'addition modulaire particulièrement utile dans algorithms where a fixed range of values is needed, such as in cyclic tasks, scheduling, and even in creating hash functions.

oEmbed (JSON) + /