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

How can the familiar rules for adding even and odd numbers be understood using arithmetic modulo 222?

55 questions

  1. 1

    How can the familiar rules for adding even and odd numbers be understood using arithmetic modulo 222?

    Model answer

    Modulo 222, an even number has remainder 000 and an odd number has remainder 111. Adding these remainders explains why even plus even is even and even plus odd is odd.

    Explanation

    Arithmetic modulo 222 tracks only remainders after division by 222, so parity is determined by those remainders.

  2. 2

    What does the notation a≡b(modn)a \equiv b \pmod na≡b(modn) mean?

    Model answer

    It means that the integers aaa and bbb differ by an integer multiple of nnn.

    Explanation

    This is the defining relationship for congruence modulo nnn.

  3. 3

    State the division algorithm for an integer aaa and a positive integer nnn.

    Model answer

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

    Explanation

    The quotient is qqq and the remainder is rrr; the remainder must be one of 0,1,…,n−10,1,\ldots,n-10,1,…,n−1.

  4. 4

    How can congruence modulo nnn be characterized using remainders?

    Model answer

    a≡b(modn)a \equiv b \pmod na≡b(modn) if and only if aaa and bbb have the same remainder when divided by nnn.

    Explanation

    Equal remainders make the difference a multiple of nnn, and a difference that is a multiple of nnn forces the remainders to match.

  5. 5

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

    Model answer

    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, an integer multiple of nnn.

    Explanation

    The shared remainder cancels when the two division-algorithm expressions are subtracted.

  6. 6

    Why does congruence modulo nnn imply equal remainders?

    Model answer

    Writing a=qn+ra=qn+ra=qn+r and b=q′n+r′b=q'n+r'b=q′n+r′, their difference is (q−q′)n+(r−r′)(q-q')n+(r-r')(q−q′)n+(r−r′). Since a−ba-ba−b is a multiple of nnn and −n<r−r′<n-n<r-r'<n−n<r−r′<n, the only possibility is r−r′=0r-r'=0r−r′=0.

    Explanation

    The only multiple of nnn strictly between −n-n−n and nnn is 000, so the remainders must be equal.

  7. 7

    How does the clock interpretation explain why 12≡5(mod7)12 \equiv 5 \pmod 712≡5(mod7)?

    Model answer

    On a clock with positions 000 through 666, moving 121212 steps from 000 ends at the same position as moving 555 steps, because 121212 makes one full circuit plus 555 steps.

    Explanation

    The two numbers have the same remainder modulo 777, so they land at the same clock position.

  8. 8

    What does it mean to say that two integers belong to the same congruence class modulo nnn?

    Model answer

    They have the same remainder when divided by nnn, so modular arithmetic treats them as equivalent.

    Explanation

    For example, 121212 and 555 represent the same position modulo 777.

  9. 9

    Why can a modular-arithmetic calculation use different integers with the same remainder interchangeably?

    Model answer

    Modular arithmetic tracks remainders rather than the number of times a value has gone around the modulus, so integers with the same remainder represent the same modular value.

    Explanation

    This is the remainder-based meaning of congruence and the basis of the clock analogy.

  10. 10

    How is multiplication performed modulo nnn?

    Model answer

    Multiply as usual, then subtract or add multiples of nnn to reduce the result to a remainder between 000 and n−1n-1n−1.

    Explanation

    The same approach applies to addition: do the ordinary operation first, then reduce modulo nnn.

  11. 11

    Use remainders to explain why 10⋅12≡1(mod7)10 \cdot 12 \equiv 1 \pmod 710⋅12≡1(mod7).

    Model answer

    Since 10≡3(mod7)10 \equiv 3 \pmod 710≡3(mod7) and 12≡5(mod7)12 \equiv 5 \pmod 712≡5(mod7), their product has the same remainder as 3⋅5=153\cdot5=153⋅5=15, which is 111 modulo 777.

    Explanation

    Indeed, 10⋅12=12010\cdot12=12010⋅12=120, and 120120120 leaves remainder 111 when divided by 777.

  12. 12

    What does the congruence of a product say about the remainders of its factors?

    Model answer

    If the factors have remainders uuu and vvv modulo nnn, their product has the same remainder as uvuvuv modulo nnn.

    Explanation

    The actual values of the factors do not matter beyond their remainders when determining the product's remainder.

  13. 13

    What does the addition table for remainders modulo 777 show about adding 000 to 000 and 222 to 222?

    Model answer

    The remainders are 000 and 444, respectively, since 0+0=00+0=00+0=0 and 2+2=42+2=42+2=4.

    Explanation

    The modular addition table records the ordinary sum reduced to its remainder modulo 777.

  14. 14

    Why does adding 444 to 444 modulo 777 give the remainder 111?

    Model answer

    Because 4+4=84+4=84+4=8, and 888 leaves remainder 111 after subtracting one multiple of 777.

    Explanation

    The modular result is the remainder after reducing the ordinary sum.

  15. 15

    What is the result of multiplying 333 by 333 modulo 777, and why?

    Model answer

    The result is 222, because 3⋅3=93\cdot3=93⋅3=9 and 999 leaves remainder 222 when divided by 777.

    Explanation

    A modular multiplication table is formed by multiplying normally and reducing each product to its remainder.

  16. 16

    Does addition modulo 777 satisfy associativity and commutativity?

    Model answer

    Yes. Regrouping or reordering the addends does not change the modular sum.

    Explanation

    These familiar addition properties continue to hold in modular arithmetic.

  17. 17

    How does the distributive property work in modular arithmetic?

    Model answer

    a(b+c)a(b+c)a(b+c) modulo nnn gives the same result as ab+acab+acab+ac modulo nnn.

    Explanation

    Multiplication distributes over addition in modular arithmetic just as it does for ordinary integers.

  18. 18

    What is the greatest common divisor of two integers?

    Model answer

    It is the largest integer that divides both integers.

    Explanation

    The greatest common divisor may be 111 when the integers have no common divisor greater than 111.

  19. 19

    Why is checking every integer up to the smaller input a poor general method for computing a GCD?

    Model answer

    It may require testing too many possible divisors, making it impractical for very large integers.

    Explanation

    The Euclidean algorithm avoids this exhaustive search and computes the GCD efficiently.

  20. 20

    State the GCD subtraction lemma when b≥ab\ge ab≥a.

    Model answer

    gcd⁡(a,b)=gcd⁡(a,b−a)\gcd(a,b)=\gcd(a,b-a)gcd(a,b)=gcd(a,b−a).

    Explanation

    Replacing bbb by b−ab-ab−a preserves exactly the common divisors of aaa and bbb.

  21. 21

    Why does every common divisor of aaa and bbb also divide b−ab-ab−a?

    Model answer

    If kkk divides both aaa and bbb, then (b−a)/k=b/k−a/k(b-a)/k=b/k-a/k(b−a)/k=b/k−a/k is an integer, so kkk divides b−ab-ab−a.

    Explanation

    The difference of two integers is an integer, which establishes divisibility of the difference.

  22. 22

    Why does every common divisor of aaa and b−ab-ab−a also divide bbb?

    Model answer

    If kkk divides aaa and b−ab-ab−a, then it divides their sum, a+(b−a)=ba+(b-a)=ba+(b−a)=b.

    Explanation

    Thus the common divisors of the two pairs in the subtraction lemma are the same.

  23. 23

    How does the division algorithm give a stronger GCD reduction than subtracting aaa just once?

    Model answer

    Writing b=qa+rb=qa+rb=qa+r lets us subtract qqq copies of aaa at once, giving gcd⁡(a,b)=gcd⁡(a,r)\gcd(a,b)=\gcd(a,r)gcd(a,b)=gcd(a,r), where rrr is the remainder.

    Explanation

    This is repeated use of the subtraction lemma, with the remainder often much smaller than the original numbers.

  24. 24

    Describe the repeated step used in the Euclidean algorithm.

    Model answer

    Divide the larger number by the smaller, replace the larger number with the remainder, and repeat with the resulting pair.

    Explanation

    Each remainder step preserves the GCD while reducing the numbers until a remainder is 000.

  25. 25

    Apply the Euclidean algorithm to find gcd⁡(360,46)\gcd(360,46)gcd(360,46).

    Model answer

    360=7⋅46+38360=7\cdot46+38360=7⋅46+38, 46=1⋅38+846=1\cdot38+846=1⋅38+8, 38=4⋅8+638=4\cdot8+638=4⋅8+6, 8=1⋅6+28=1\cdot6+28=1⋅6+2, and 6=3⋅2+06=3\cdot2+06=3⋅2+0, so the GCD is 222.

    Explanation

    The last nonzero remainder is the GCD; equivalently, the final pair is 222 and 000.

  26. 26

    Why is gcd⁡(a,0)=a\gcd(a,0)=agcd(a,0)=a for a positive integer aaa?

    Model answer

    Every integer divides 000, so the common divisors of aaa and 000 are the divisors of aaa; the greatest is aaa.

    Explanation

    This is why the Euclidean algorithm returns the last nonzero remainder when the process reaches 000.

  27. 27

    What additional information does the extended Euclidean algorithm keep track of?

    Model answer

    It tracks how each remainder is expressed as an integer linear combination of the original inputs.

    Explanation

    This bookkeeping produces coefficients that express the GCD using the original numbers.

  28. 28

    State the integer linear-combination result for the GCD of aaa and bbb.

    Model answer

    There are integers sss and ttt such that sa+tb=gcd⁡(a,b)sa+tb=\gcd(a,b)sa+tb=gcd(a,b).

    Explanation

    The extended Euclidean algorithm finds such coefficients as it computes the GCD.

  29. 29

    How can an equation sa+tb=dsa+tb=dsa+tb=d, where d=gcd⁡(a,b)d=\gcd(a,b)d=gcd(a,b), certify that no larger common divisor exists?

    Model answer

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

    Explanation

    The equation gives a checkable certificate that the proposed GCD is at least as large as every common divisor.

  30. 30

    What is a multiplicative inverse of an element modulo nnn?

    Model answer

    It is an element that multiplies with the given element to give a result congruent to 111 modulo nnn.

    Explanation

    For example, 222 and 444 are inverses modulo 777 because 2⋅4=8≡1(mod7)2\cdot4=8\equiv1\pmod72⋅4=8≡1(mod7).

  31. 31

    Why does 000 have no multiplicative inverse modulo nnn when n>1n>1n>1?

    Model answer

    Multiplying 000 by any integer gives 000, which is not congruent to 111 modulo nnn.

    Explanation

    This is why the question of whether every element has an inverse concerns nonzero elements.

  32. 32

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

    Model answer

    For any nonzero element bbb modulo ppp, gcd⁡(b,p)=1\gcd(b,p)=1gcd(b,p)=1. Thus there are integers s,ts,ts,t with bs+pt=1bs+pt=1bs+pt=1, so bs≡1(modp)bs\equiv1\pmod pbs≡1(modp).

    Explanation

    The coefficient sss is a multiplicative inverse of bbb modulo ppp.

  33. 33

    What condition determines whether an element bbb has a multiplicative inverse modulo a possibly composite modulus nnn?

    Model answer

    bbb has an inverse modulo nnn exactly when gcd⁡(b,n)=1\gcd(b,n)=1gcd(b,n)=1.

    Explanation

    The GCD condition allows an integer linear combination of bbb and nnn to equal 111, producing the inverse.

  34. 34

    Why does the GCD condition produce a modular inverse?

    Model answer

    If gcd⁡(b,n)=1\gcd(b,n)=1gcd(b,n)=1, the extended Euclidean algorithm gives bs+nt=1bs+nt=1bs+nt=1. Reducing modulo nnn gives bs≡1(modn)bs\equiv1\pmod nbs≡1(modn), so sss is an inverse.

    Explanation

    The term ntntnt vanishes modulo nnn.

  35. 35

    How can the extended Euclidean algorithm be used to compute the inverse of aaa modulo a prime ppp?

    Model answer

    Run it on aaa and ppp to find s,ts,ts,t with as+pt=1as+pt=1as+pt=1; then sss reduced modulo ppp is the inverse of aaa.

    Explanation

    Because ppp is prime and aaa is nonzero modulo ppp, their GCD is 111.

  36. 36

    Why does 555 have a multiplicative inverse modulo 666, despite 666 not being prime?

    Model answer

    Because gcd⁡(5,6)=1\gcd(5,6)=1gcd(5,6)=1; in fact, 5⋅5=25≡1(mod6)5\cdot5=25\equiv1\pmod65⋅5=25≡1(mod6), so 555 is its own inverse.

    Explanation

    A prime modulus is sufficient for all nonzero elements to have inverses, but it is not necessary for an individual element to have one.

  37. 37

    Translate the treasure-coin conditions into congruences.

    Model answer

    If the number of coins is nnn, the conditions are n≡4(mod5)n\equiv4\pmod5n≡4(mod5) and n≡1(mod7)n\equiv1\pmod7n≡1(mod7).

    Explanation

    Each congruence records the specified remainder after grouping the coins by the stated group size.

  38. 38

    What is the smallest number of coins satisfying n≡4(mod5)n\equiv4\pmod5n≡4(mod5) and n≡1(mod7)n\equiv1\pmod7n≡1(mod7)?

    Model answer

    It is 292929, since 292929 leaves remainder 444 when divided by 555 and remainder 111 when divided by 777.

    Explanation

    The number satisfies both modular constraints and is the smallest positive value that does so.

  39. 39

    State the Chinese remainder theorem for relatively prime positive integers aaa and bbb.

    Model answer

    If gcd⁡(a,b)=1\gcd(a,b)=1gcd(a,b)=1, each pair of residue conditions n≡r(moda)n\equiv r\pmod an≡r(moda) and n≡s(modb)n\equiv s\pmod bn≡s(modb) determines exactly one nnn in the range 0≤n<ab0\le n<ab0≤n<ab.

    Explanation

    The theorem says that the two residues uniquely identify one value among the ababab possible values in that range.

  40. 40

    Why is the condition gcd⁡(a,b)=1\gcd(a,b)=1gcd(a,b)=1 important in the Chinese remainder theorem?

    Model answer

    It ensures that if both aaa and bbb divide a difference, their product ababab divides that difference.

    Explanation

    This divisibility property is essential to proving that two values with the same pair of remainders cannot be distinct within the stated range.

  41. 41

    How does the Chinese remainder theorem establish uniqueness of a solution in 0≤n<ab0\le n<ab0≤n<ab?

    Model answer

    If two values have the same remainders modulo both aaa and bbb, then both moduli divide their difference. Since they are relatively prime, ababab divides the difference; two distinct values in the range cannot differ by a nonzero multiple of ababab.

    Explanation

    Therefore the two values must be equal.

  42. 42

    Why does the uniqueness argument also guarantee that every pair of residues has a solution?

    Model answer

    There are ababab possible values of nnn in the range and ababab possible residue pairs. Each value maps to a pair, and uniqueness shows no two values map to the same pair, so every pair is attained.

    Explanation

    A one-to-one mapping between two finite sets of equal size is also onto.

  43. 43

    How can one construct a solution to n≡r(moda)n\equiv r\pmod an≡r(moda) and n≡s(modb)n\equiv s\pmod bn≡s(modb) when aaa and bbb are relatively prime?

    Model answer

    Write n=kb+sn=kb+sn=kb+s, so the second congruence is satisfied. Then solve kb≡r−s(moda)kb\equiv r-s\pmod akb≡r−s(moda) by multiplying by the inverse of bbb modulo aaa.

    Explanation

    The inverse exists because gcd⁡(a,b)=1\gcd(a,b)=1gcd(a,b)=1; choosing the resulting remainder for kkk gives a solution in the required range.

  44. 44

    What is the formula for kkk in the construction n=kb+sn=kb+sn=kb+s?

    Model answer

    k≡b−1(r−s)(moda)k\equiv b^{-1}(r-s)\pmod ak≡b−1(r−s)(moda), where b−1b^{-1}b−1 is the inverse of bbb modulo aaa.

    Explanation

    This follows by rearranging kb+s≡r(moda)kb+s\equiv r\pmod akb+s≡r(moda) and multiplying by the modular inverse of bbb.

  45. 45

    How can the Chinese remainder theorem be viewed as a correspondence between integers and residue pairs?

    Model answer

    For relatively prime aaa and bbb, the integers from 000 to ab−1ab-1ab−1 correspond one-to-one with the pairs of remainders modulo aaa and modulo bbb.

    Explanation

    There are ababab integers in the range and ababab possible pairs, and the theorem guarantees each pair occurs exactly once.

  46. 46

    In the card-based private-preference demonstration, how does a participant encode a “yes” or “no” response?

    Model answer

    For “yes,” the participant places their red card next to the center red card and the black card on the outside; for “no,” they place the black card next to the center and the red card on the outside.

    Explanation

    The card order encodes the response without requiring the participant to announce it.

  47. 47

    What pattern in the cards indicates that both participants answered “yes” in the demonstration?

    Model answer

    Three red cards appear consecutively in the cyclic arrangement.

    Explanation

    Each “yes” places a red card next to the central red card, producing a run of three when both answer yes.

  48. 48

    What does the card arrangement show if at least one participant answers “no”?

    Model answer

    There are not three consecutive red cards; the arrangement has only two consecutive red cards.

    Explanation

    A “no” places a black card next to the center red card, preventing the three-red pattern.

  49. 49

    Why are the cards cut randomly after being stacked in the private-preference demonstration?

    Model answer

    The random cuts create a cyclic shift, hiding which participant's cards occupy particular positions while preserving the relevant consecutive-card pattern.

    Explanation

    The shift helps prevent observers from inferring an individual's response from the cards' positions.

  50. 50

    How does the card demonstration provide plausible deniability for someone who likes the movie when the other participant does not?

    Model answer

    The final arrangement does not reveal which participant answered yes, so that person can deny liking the movie.

    Explanation

    The demonstration reveals whether both participants agreed to watch, not each person's individual response.

  51. 51

    How can modular arithmetic support reconstruction of a large file using multiple streamed snippets?

    Model answer

    Represent the file as an integer nnn and send its remainders modulo several moduli. Once the product of the moduli exceeds nnn, the Chinese remainder theorem can reconstruct nnn from those remainders.

    Explanation

    The combined residues identify the file value uniquely when the moduli satisfy the theorem's conditions.

  52. 52

    Why can different recipients reconstruct the same file from different sets of streamed snippets?

    Model answer

    Each recipient can collect a set of residues whose moduli have a product large enough to identify the file; the particular snippets collected need not be identical.

    Explanation

    The residue information can reconstruct the same integer through the Chinese remainder theorem.

  53. 53

    Why can a broadcaster repeatedly send snippets rather than coordinating one fixed transmission for every recipient?

    Model answer

    Recipients can listen until they have collected enough information to reconstruct the file, even if they begin listening at different times or receive different snippets.

    Explanation

    The repeated broadcast resembles a fountain: each recipient gathers enough data independently.

  54. 54

    What role do the moduli play in the simplified fountain-code example?

    Model answer

    Each modulus specifies how the file integer is reduced to a remainder, and the associated remainder is one snippet of information about the file.

    Explanation

    Together, enough modulus-remainder pairs can determine the original integer.

  55. 55

    What limitation of the fountain-code explanation is acknowledged in the content?

    Model answer

    It is a simplified account; a practical treatment must also address issues such as errors in transmitted messages.

    Explanation

    The modular-remainder idea illustrates reconstruction, but real fountain codes involve additional concerns.

1 of 55
Question 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