1. Home
  2. Explore
  3. Mathematics
  4. Modular Arithmetic

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Modular Arithmetic

  • 55Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Modular Foundations
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What does arithmetic modulo nnn keep track of?

Tap to flipClick to flipspace

The remainders left when integers are divided by nnn.

Or swipe the card

55 cards

  1. What does arithmetic modulo nnn keep track of?

    The remainders left when integers are divided by nnn.

  2. How does arithmetic modulo 222 describe even and odd numbers?

    Even numbers have remainder 000; odd numbers have remainder 111.

  3. What does the notation a ext{ is congruent to } b mod n mean?

    The integers aaa and bbb differ by an integer multiple of nnn.

  4. What is the division algorithm for an integer aaa and a positive integer nnn?

    There is a unique pair of integers q,rq,rq,r such that a=qn+ra=qn+ra=qn+r and 0≤r<n0\le r<n0≤r<n.

  5. How can congruence modulo nnn be characterized using remainders?

    aaa is congruent to bbb modulo nnn if and only if they have the same remainder when divided by nnn.

  6. Why do equal remainders imply that two integers are congruent modulo nnn?

    If a=qn+ra=qn+ra=qn+r and b=q′n+rb=q'n+rb=q′n+r, then a−b=(q−q′)na-b=(q-q')na−b=(q−q′)n, a multiple of nnn.

  7. Why does congruence modulo nnn imply equal remainders?

    If the remainders are rrr and r′r'r′, their difference lies strictly between −n-n−n and nnn. Since congruence makes that difference a multiple of nnn, it must be 000.

  8. What does the clock analogy show about 121212 and 555 modulo 777?

    They are congruent modulo 777 because both land at the same position on a seven-position clock.

  9. In clock arithmetic modulo nnn, which integers represent the possible positions?

    The remainders 0,1, dots,n-1.

  10. How do you perform addition and multiplication modulo nnn?

    Perform the usual operation, then reduce the result to its remainder modulo nnn.

  11. What is 10exttimes1210 ext{ times }1210exttimes12 modulo 777?

    10exttimes12=12010 ext{ times }12=12010exttimes12=120, and 120120120 has remainder 111 modulo 777.

  12. What determines a product's remainder modulo nnn when the factor remainders are known?

    The product of the factor remainders, reduced modulo nnn.

  13. Does changing the order of modular addition change the result?

    No. Modular addition is commutative: a+ba+ba+b is congruent to b+ab+ab+a modulo nnn.

  14. Does changing the grouping of modular addition change the result?

    No. Modular addition is associative: (a+b)+c(a+b)+c(a+b)+c is congruent to a+(b+c)a+(b+c)a+(b+c) modulo nnn.

  15. Is modular multiplication commutative?

    Yes. The order of the factors does not change the product modulo nnn.

  16. How does multiplication distribute over addition modulo nnn?

    a(b+c)a(b+c)a(b+c) is congruent to ab+acab+acab+ac modulo nnn.

  17. What do addition and multiplication tables modulo nnn record?

    The remainder produced by each pairwise sum or product of possible remainders.

  18. What is the greatest common divisor, or GCD, of two integers?

    The largest positive integer that divides both integers.

  19. Why is checking every possible divisor a poor way to compute a GCD for large integers?

    It can require testing too many candidates, making it impractical for very large numbers.

  20. If bot<ab ot<abot<a, what basic GCD identity lets you replace bbb with a smaller number?

    extGCD(a,b)=extGCD(a,b−a) ext{GCD}(a,b)= ext{GCD}(a,b-a)extGCD(a,b)=extGCD(a,b−a).

  21. Why does subtracting one integer from another preserve their common divisors in the GCD step?

    A divisor of both aaa and bbb divides b−ab-ab−a, and a divisor of both aaa and b−ab-ab−a divides bbb.

  22. How does the division algorithm give a stronger GCD identity?

    If b=qa+rb=qa+rb=qa+r, then extGCD(a,b)=extGCD(a,r) ext{GCD}(a,b)= ext{GCD}(a,r)extGCD(a,b)=extGCD(a,r).

  23. What are the steps of the Euclidean algorithm?

    Divide the larger number by the smaller, replace the larger number with the remainder, and repeat with the new pair until the remainder is 000.

  24. When does the Euclidean algorithm stop, and how is the GCD identified?

    It stops when the remainder is 000; the last nonzero remainder is the GCD.

  25. What remainder sequence computes extGCD(360,46) ext{GCD}(360,46)extGCD(360,46)?

    360360360 divided by 464646 leaves 383838; 464646 divided by 383838 leaves 888; 383838 divided by 888 leaves 666; 888 divided by 666 leaves 222; 666 divided by 222 leaves 000.

  26. What is extGCD(360,46) ext{GCD}(360,46)extGCD(360,46)?

    222.

  27. What does the extended Euclidean algorithm find in addition to the GCD?

    Integers sss and ttt such that sa+tb=extGCD(a,b)sa+tb= ext{GCD}(a,b)sa+tb=extGCD(a,b).

  28. How can an equation sa+tb=dsa+tb=dsa+tb=d, where d=extGCD(a,b)d= ext{GCD}(a,b)d=extGCD(a,b), certify that ddd is the GCD?

    Any common divisor of aaa and bbb must divide sa+tb=dsa+tb=dsa+tb=d, so no common divisor can be larger than ddd.

  29. What is a multiplicative inverse of aaa modulo nnn?

    A number sss such that asasas is congruent to 111 modulo nnn.

  30. What are the multiplicative inverses of 222 and 444 modulo 777?

    They are inverses of each other: 2exttimes4=82 ext{ times }4=82exttimes4=8, which is congruent to 111 modulo 777.

  31. Why does every nonzero element modulo a prime ppp have a multiplicative inverse?

    For nonzero aaa modulo ppp, extGCD(a,p)=1 ext{GCD}(a,p)=1extGCD(a,p)=1. The extended Euclidean algorithm gives as+pt=1as+pt=1as+pt=1, so asasas is congruent to 111 modulo ppp.

  32. Why does 000 have no multiplicative inverse modulo nnn?

    Multiplying 000 by any number gives 000, never a number congruent to 111 modulo nnn.

  33. When can an element aaa have a multiplicative inverse modulo a possibly composite nnn?

    Exactly when extGCD(a,n)=1 ext{GCD}(a,n)=1extGCD(a,n)=1.

  34. How does the extended Euclidean algorithm produce an inverse of aaa modulo nnn when extGCD(a,n)=1 ext{GCD}(a,n)=1extGCD(a,n)=1?

    Find s,ts,ts,t with as+nt=1as+nt=1as+nt=1; then sss is an inverse of aaa modulo nnn.

  35. How can multiplication by a modular inverse undo multiplication by aaa?

    If asasas is congruent to 111 modulo nnn, multiplying a product by sss cancels the factor aaa modulo nnn.

  36. What is the inverse of 555 modulo 666?

    555; indeed, 5exttimes5=255 ext{ times }5=255exttimes5=25, which is congruent to 111 modulo 666.

  37. What does it mean for two positive integers aaa and bbb to be relatively prime?

    Their GCD is 111.

  38. What does the Chinese remainder theorem say for relatively prime moduli aaa and bbb?

    For any specified residues modulo aaa and bbb, exactly one integer nnn in the range 0≤n<ab0\le n<ab0≤n<ab has both residues.

  39. What does the Chinese remainder theorem establish about integers from 000 to ab−1ab-1ab−1 and pairs of residues?

    Each integer corresponds to a unique pair of remainders modulo aaa and bbb, and every possible pair occurs.

  40. If two integers have the same remainder modulo aaa, what does that imply about their difference?

    Their difference is divisible by aaa.

  41. Why does having the same remainders modulo relatively prime aaa and bbb force two integers to be congruent modulo ababab?

    Both aaa and bbb divide their difference, and because extGCD(a,b)=1 ext{GCD}(a,b)=1extGCD(a,b)=1, their product ababab divides it.

  42. How does the range 0≤x,y<ab0\le x,y<ab0≤x,y<ab help prove uniqueness in the Chinese remainder theorem?

    If xxx and yyy have the same two remainders, then ababab divides x−yx-yx−y. Distinct numbers in that range cannot differ by a nonzero multiple of ababab, so x=yx=yx=y.

  43. Why does proving uniqueness of the residue pair also establish that every pair of residues occurs?

    There are ababab integers in the range and ababab possible residue pairs; a one-to-one assignment between these equally sized finite sets must use every pair.

  44. How can you construct a solution to nnn congruent to rrr modulo aaa and nnn congruent to sss modulo bbb?

    Write n=kb+sn=kb+sn=kb+s and solve kbkbkb congruent to r−sr-sr−s modulo aaa.

  45. How do you solve for kkk in the construction of a Chinese remainder solution?

    Since aaa and bbb are relatively prime, find b−1b^{-1}b−1 modulo aaa and set kkk congruent to b−1(r−s)b^{-1}(r-s)b−1(r−s) modulo aaa.

  46. What is the smallest nonnegative solution to nnn congruent to 444 modulo 555 and nnn congruent to 111 modulo 777?

    292929.

  47. What role does modular arithmetic play in cryptography?

    It is a mathematical foundation for cryptographic schemes and can support private computation.

  48. In the card-based movie-preference demonstration, what arrangement represents a participant who likes the movie?

    Place the red card next to the center red card and the black card on the outside.

  49. In the card-based preference demonstration, what does a run of three red cards indicate?

    Both participants chose that they like the movie.

  50. How does a random cyclic shift help conceal individual answers in the card demonstration?

    It changes where the cards appear in the sequence, so an individual arrangement cannot be identified from its position.

  51. How does the card demonstration illustrate a zero-knowledge proof idea?

    It can reveal the outcome of a shared preference check without exposing which participant gave a particular individual answer.

  52. How can modular remainders be used to represent snippets of a large file?

    Represent the file as an integer NNN, then send moduli and the corresponding remainders of NNN.

  53. When can a set of file remainders determine a large integer file value?

    When the moduli are pairwise relatively prime and their product exceeds the possible file value, the Chinese remainder theorem can reconstruct it.

  54. Why can repeatedly broadcasting different modular snippets help many people retrieve the same file?

    Each recipient can collect enough snippets for the product of their moduli to exceed the file value, then reconstruct the file.

  55. What important complication is omitted from the simplified fountain-code illustration?

    Real systems must account for errors in transmitted messages.

Card 1 of 55
Card 1 of 55

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent