Modular Arithmetic
- 41Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What does Bézout's identity guarantee for any integers a and b?
What does Bézout's identity guarantee for any integers a and b?
41 questions
- 1
What does Bézout's identity guarantee for any integers a and b?
- A
There are integers s and t such that gcd(a,b)=as+bt.
- B
There are positive integers s and t such that a=bs+bt.
- C
There are integers s and t such that ab=s+t.
- D
There are integers s and t such that gcd(a,b)=a+b+st.
Correct answer
AThere are integers s and t such that gcd(a,b)=as+bt.
Explanation
Bézout's identity states that the greatest common divisor of a and b can be written as an integer linear combination, as+bt.
- A
- 2
What is the role of the pulverizer, or extended Euclidean algorithm, in using Bézout's identity?
- A
It efficiently computes coefficients expressing the gcd as a linear combination.
- B
It determines the prime factorization of every linear combination.
- C
It finds the quotient and remainder for every pair of inputs.
- D
It efficiently lists every integer divisible by either input.
Correct answer
AIt efficiently computes coefficients expressing the gcd as a linear combination.
Explanation
The extended Euclidean algorithm efficiently computes the coefficients s and t in a Bézout identity.
- A
- 3
When can an integer be written as an integer linear combination of a and b?
- A
Exactly when it is relatively prime to both a and b.
- B
Exactly when it is divisible by both a and b.
- C
Exactly when it is greater than both a and b.
- D
Exactly when it is divisible by gcd(a,b).
Correct answer
DExactly when it is divisible by gcd(a,b).
Explanation
An integer is an integer linear combination of a and b if and only if it is divisible by their gcd.
- A
- 4
What does the division theorem guarantee when dividing an integer n by a positive integer d?
- A
A unique pair of integers q,r with n=qd+r and −d<r<0.
- B
A pair of integers q,r with n=qd+r and 0<r≤d.
- C
A unique pair of positive integers q,r with n=qd+r.
- D
A unique pair of integers q,r with n=qd+r and 0≤r<d.
Correct answer
DA unique pair of integers q,r with n=qd+r and 0≤r<d.
Explanation
For d>0, the division theorem gives a unique quotient q and remainder r satisfying n=qd+r and 0≤r<d.
- A
- 5
In the division theorem, which terms name q and r in n=qd+r?
- A
q is the divisor, and r is the dividend.
- B
q is the quotient, and r is the remainder.
- C
q is the dividend, and r is the divisor.
- D
q is the remainder, and r is the quotient.
Correct answer
Bq is the quotient, and r is the remainder.
Explanation
In the division theorem, q is called the quotient and r is called the remainder.
- A
- 6
What is the central idea of modular arithmetic?
- A
Numbers are grouped by their remainders, ignoring differences that are multiples of the modulus.
- B
Numbers are grouped only when they have the same absolute value.
- C
Numbers are replaced by their prime factors, ignoring their remainders.
- D
Numbers are grouped by their quotients, ignoring differences that are less than the modulus.
Correct answer
ANumbers are grouped by their remainders, ignoring differences that are multiples of the modulus.
Explanation
Working modulo n focuses on remainders and treats differences by multiples of n as irrelevant.
- A
- 7
Why is modular arithmetic often described as clock arithmetic?
- A
A clock converts every time interval into a prime number of minutes.
- B
A clock cycles through a fixed set of positions, so elapsed full cycles can be ignored.
- C
A clock displays a different remainder for every full cycle completed.
- D
A clock measures only the quotient when dividing elapsed time by twelve.
Correct answer
BA clock cycles through a fixed set of positions, so elapsed full cycles can be ignored.
Explanation
Clock readings repeat after a fixed number of units, so full cycles can be ignored and only the remainder matters.
- A
- 8
Which condition defines the congruence a≡b(modn)?
- A
a and b have the same quotient when divided by n.
- B
a divides b−n.
- C
n is equal to a−b.
- D
n divides a−b.
Correct answer
Dn divides a−b.
Explanation
By definition, a is congruent to b modulo n precisely when a−b is divisible by n.
- A
- 9
What is an equivalent way to test whether a≡b(modn)?
- A
Check whether a and b have the same quotient when divided by n.
- B
Check whether a and b have the same remainder when divided by n.
- C
Check whether their quotients differ by exactly one.
- D
Check whether their remainders add to n.
Correct answer
BCheck whether a and b have the same remainder when divided by n.
Explanation
Two integers are congruent modulo n if and only if their remainders on division by n are equal.
- A
- 10
How many distinct residue classes are there modulo a positive integer n?
- A
There are n−1 classes, represented by 1,2,…,n−1.
- B
There are n+1 classes, represented by 0,1,…,n.
- C
There are n classes, represented by 0,1,…,n−1.
- D
There are infinitely many classes because the integers are infinite.
Correct answer
CThere are n classes, represented by 0,1,…,n−1.
Explanation
The n possible remainders from 0 through n−1 represent all residue classes modulo n.
- A
- 11
Which integers belong to the residue class of 1 modulo 5?
- A
Only the integers 1,6,11, because negative integers are excluded.
- B
All integers whose difference from 1 is divisible by 5, such as 1,6,11,−4.
- C
All integers whose quotient on division by 5 is 1.
- D
All integers whose difference from 1 is divisible by 4, such as 1,5,9,−3.
Correct answer
BAll integers whose difference from 1 is divisible by 5, such as 1,6,11,−4.
Explanation
The class of 1 modulo 5 consists of integers of the form 1+5k for integer k, including negative values such as −4.
- A
- 12
How can you identify the residue class of an integer k modulo 5?
- A
Find the greatest multiple of 5 less than k and use that multiple.
- B
Use the quotient from dividing k by 5, regardless of the remainder.
- C
Divide 5 by k and use the quotient in the range 0 through 4.
- D
Divide k by 5 and use the remainder in the range 0 through 4.
Correct answer
DDivide k by 5 and use the remainder in the range 0 through 4.
Explanation
The residue class is determined by the remainder when k is divided by 5; the remainder is one of 0,1,2,3,4.
- A
- 13
Why do equal remainders imply congruence modulo n?
- A
Writing a=qn+r and b=q′n+r makes a−b=q−q′, which must be zero.
- B
Equal remainders force both numbers to have the same quotient.
- C
Writing a=qn+r and b=q′n+r makes a−b=n(q−q′), a multiple of n.
- D
Equal remainders imply that a+b is a multiple of n.
Correct answer
CWriting a=qn+r and b=q′n+r makes a−b=n(q−q′), a multiple of n.
Explanation
If the remainders agree, subtracting the division forms cancels r and leaves a multiple of n.
- A
- 14
Why does a≡b(modn) imply that a and b have the same remainder modulo n?
- A
Their difference is zero, so their quotients must also be zero.
- B
Their sum is a multiple of n, so both remainders must be zero.
- C
Their quotients are equal by definition of congruence.
- D
Their difference is a multiple of n, so adding that multiple changes the quotient but not the remainder.
Correct answer
DTheir difference is a multiple of n, so adding that multiple changes the quotient but not the remainder.
Explanation
If a=b+kn for an integer k, then the two numbers differ only by full multiples of n. The division theorem's uniqueness gives them the same remainder.
- A
- 15
What is the relationship between the residue classes modulo n and all the integers?
- A
The residue classes contain only nonnegative integers and omit negative integers.
- B
The residue classes cover only integers that are multiples of n.
- C
The residue classes overlap so that every integer belongs to all of them.
- D
The residue classes partition the integers, placing each integer in exactly one class.
Correct answer
DThe residue classes partition the integers, placing each integer in exactly one class.
Explanation
Every integer has exactly one remainder from 0 to n−1, so it belongs to exactly one of the residue classes.
- A
- 16
Under the convention used in the content, what range is used for the remainder when the divisor is positive?
- A
The remainder is nonnegative and strictly less than the divisor.
- B
The remainder is always positive and can equal the divisor.
- C
The remainder must equal the quotient or be greater than it.
- D
The remainder can be negative but must have absolute value less than the divisor.
Correct answer
AThe remainder is nonnegative and strictly less than the divisor.
Explanation
The convention is the division theorem's range: for positive divisor n, the remainder satisfies 0≤r<n, including when the dividend is negative.
- A
- 17
Why can the notation a=b mod n be confusing?
- A
It means that a is the quotient and b is the remainder.
- B
It is valid only when n is prime.
- C
It can blur the distinction between a congruence relation and a remainder function that returns a value.
- D
It always means that a and b have different remainders modulo n.
Correct answer
CIt can blur the distinction between a congruence relation and a remainder function that returns a value.
Explanation
The notation can make a congruence relation look like an equality involving a remainder function. Writing a≡b(modn) for congruence helps distinguish the ideas.
- A
- 18
If a≡b(modn), which addition rule is always valid?
- A
a+c≡c−b(modn) for every integer c.
- B
a+c≡b−c(modn) for every integer c.
- C
a+c≡b+c(modn) for every integer c.
- D
a+c≡b(modn) only when c is a multiple of n.
Correct answer
Ca+c≡b+c(modn) for every integer c.
Explanation
Adding the same integer to congruent numbers preserves their congruence modulo n.
- A
- 19
If a≡b(modn), which subtraction statement is guaranteed?
- A
a−c≡b+c(modn) for every integer c.
- B
a−c≡b−c(modn) for every integer c.
- C
a−c≡c−b(modn) only when c=n.
- D
a−c≡b(modn) for every integer c.
Correct answer
Ba−c≡b−c(modn) for every integer c.
Explanation
Subtracting the same integer from both sides preserves congruence modulo n.
- A
- 20
If a≡b(modn), what relationship holds after subtracting each from the same integer c?
- A
c−a≡a−c(modn) for every a,b,c.
- B
c−a≡b−c(modn).
- C
c−a≡c+b(modn).
- D
c−a≡c−b(modn).
Correct answer
Dc−a≡c−b(modn).
Explanation
Since a−b is a multiple of n, the difference (c−a)−(c−b)=b−a is also a multiple of n.
- A
- 21
If a≡b(modn), what happens when both sides are multiplied by an integer c?
- A
a+c≡bc(modn).
- B
ac≡bc(modn).
- C
ac≡b+c(modn).
- D
ac≡b(modn) only when c=1.
Correct answer
Bac≡bc(modn).
Explanation
Multiplying a difference divisible by n by c still gives a multiple of n, so multiplication preserves congruence.
- A
- 22
If a≡b(modn) and c is a positive integer, what can be concluded about their powers?
- A
ac≡bc(modn).
- B
ac≡bc(modn) only when n is prime.
- C
No relationship between the powers can be concluded.
- D
ac≡b(modn) for every positive c.
Correct answer
Aac≡bc(modn).
Explanation
Repeated multiplication preserves congruence, so the congruent bases raised to the same positive integer power remain congruent.
- A
- 23
Which example shows why congruent exponents cannot generally be substituted into a power?
- A
Although 1≡6(mod5), 21 and 26 are equal as integers.
- B
Although 1≡6(mod5), (−1)1 and (−1)6 are not congruent modulo 5.
- C
Because 1 and 6 have different remainders modulo 5, this cannot test exponent substitution.
- D
Because (−1)1≡(−1)6(mod5), exponent substitution always works.
Correct answer
BAlthough 1≡6(mod5), (−1)1 and (−1)6 are not congruent modulo 5.
Explanation
The exponents 1 and 6 are congruent modulo 5, but the powers are −1 and 1, which are not congruent modulo 5. Thus exponents cannot generally be reduced modulo the modulus.
- A
- 24
When simplifying a large expression modulo 100, why may 11335 be replaced by 35?
- A
Their difference is divisible by 35, so they are congruent modulo 35.
- B
They have the same remainder modulo 100, so congruent values can be substituted in modular arithmetic.
- C
The first two digits of any number can always be discarded in modular arithmetic.
- D
They have the same quotient when divided by 100, so their powers are equal.
Correct answer
BThey have the same remainder modulo 100, so congruent values can be substituted in modular arithmetic.
Explanation
Since 11335−35 is divisible by 100, the numbers are congruent modulo 100 and can be interchanged in a computation modulo 100.
- A
- 25
What is the remainder of 1133511111⋅6+77995000 when divided by $100?
- A
7
- B
1
- C
75
- D
25
Correct answer
D25
Explanation
Modulo 100, 11335≡35 and 7799≡−1. The power (−1)5000 is 1, while 3511111≡75. Thus the expression is congruent to 75⋅6+1=451, whose remainder is 51.
- A
- 26
What conclusion follows from the fact that only 100 residue values are possible modulo 100?
- A
Every power modulo 100 must eventually equal zero.
- B
Every sequence of powers modulo 100 repeats after exactly two terms.
- C
A sufficiently long sequence of powers modulo 100 must repeat a residue, after which a repeating pattern occurs.
- D
No power sequence modulo 100 can repeat unless its base is prime.
Correct answer
CA sufficiently long sequence of powers modulo 100 must repeat a residue, after which a repeating pattern occurs.
Explanation
There are only 100 possible residues. Once a residue repeats in a sequence formed by repeatedly multiplying by the same base, the subsequent values repeat as well.
- A
- 27
Why is cancellation invalid in 3x≡3(mod6) if one concludes x≡1(mod6)?
- A
The original congruence has no solutions because 3 is not prime.
- B
Cancellation is invalid because the right-hand side is not a multiple of 6.
- C
The conclusion is valid only if x is an even integer.
- D
For example, x=3 satisfies the original congruence but is not congruent to 1 modulo 6.
Correct answer
DFor example, x=3 satisfies the original congruence but is not congruent to 1 modulo 6.
Explanation
Taking x=3 gives 3x=9≡3(mod6), but 3≡1(mod6). Thus cancellation by 3 is not valid here.
- A
- 28
Why does 3 have no multiplicative inverse modulo 6?
- A
The inverse exists, but it must be greater than 6.
- B
The inverse exists only when the modulus is divisible by 3.
- C
There is no integer a such that 3a≡1(mod6), since 3 is odd.
- D
There is no integer a such that 3a≡1(mod6), since gcd(3,6)=3.
Correct answer
DThere is no integer a such that 3a≡1(mod6), since gcd(3,6)=3.
Explanation
An inverse would require 3a−1 to be divisible by 6, which is impossible. Equivalently, gcd(3,6)=1.
- A
- 29
What is a multiplicative inverse of x modulo n?
- A
A number y such that x+y≡1(modn).
- B
A number y such that xy≡0(modn).
- C
A number y such that x−y≡0(modn).
- D
A number y such that xy≡1(modn).
Correct answer
DA number y such that xy≡1(modn).
Explanation
A multiplicative inverse is defined by the condition that its product with the original number is congruent to 1 modulo the modulus.
- A
- 30
Why are 2 and 3 multiplicative inverses of each other modulo 5?
- A
Their sum is 5, and 5≡1(mod5).
- B
Their product is 5, and 5≡1(mod5).
- C
Their difference is 1, and 1≡0(mod5).
- D
Their product is 6, and 6≡1(mod5).
Correct answer
DTheir product is 6, and 6≡1(mod5).
Explanation
Since 2⋅3=6 and 6 differs from 1 by a multiple of 5, their product is congruent to 1 modulo 5.
- A
- 31
When does an integer a have a multiplicative inverse modulo n?
- A
Exactly when a and n are both prime.
- B
Exactly when gcd(a,n)=1.
- C
Exactly when a is a multiple of n.
- D
Exactly when a<n and n is even.
Correct answer
BExactly when gcd(a,n)=1.
Explanation
An inverse exists if and only if a and n are relatively prime, meaning their gcd is 1.
- A
- 32
How does Bézout's identity explain the criterion for an inverse modulo n?
- A
If gcd(a,n)=1, then a+n=1, giving a≡1(modn).
- B
An inverse exists whenever ab+qn is divisible by n.
- C
If gcd(a,n)=1, then 1=ab+qn for some integers b,q, giving ab≡1(modn).
- D
If gcd(a,n)>1, then 1=ab+qn for some integers b,q.
Correct answer
CIf gcd(a,n)=1, then 1=ab+qn for some integers b,q, giving ab≡1(modn).
Explanation
When the gcd is 1, Bézout's identity expresses 1 as a linear combination of a and n. Reducing that equation modulo n shows that b is an inverse of a.
- A
- 33
How can 7x≡14(mod30) be solved for x?
- A
Since 7+30=37, add 37 to both sides to obtain x≡2(mod30).
- B
Since gcd(7,30)=1, multiply by the inverse 13 to obtain x≡2(mod30).
- C
Since 7 divides 14, cancel 7 to obtain x≡1(mod30).
- D
Since gcd(7,30)=1, divide the modulus by 7 to obtain x≡14(mod30).
Correct answer
BSince gcd(7,30)=1, multiply by the inverse 13 to obtain x≡2(mod30).
Explanation
The number 13 is an inverse of 7 modulo 30 because 7⋅13=91≡1(mod30). Multiplying both sides by 13 gives x≡182≡2(mod30).
- A
- 34
What does Fermat's Little Theorem state when p is prime and a is not divisible by p?
- A
ap−1≡0(modp).
- B
ap−1≡1(modp).
- C
ap≡a(modp−1).
- D
ap≡1(modp−1).
Correct answer
Bap−1≡1(modp).
Explanation
Fermat's Little Theorem states that if p is prime and p does not divide a, then ap−1 is congruent to 1 modulo p.
- A
- 35
Why is the condition that a is not divisible by p necessary in Fermat's Little Theorem?
- A
If p divides a, then ap−1≡0(modp), not 1.
- B
If p divides a, then ap−1≡p−1(modp).
- C
If p divides a, then p is no longer prime.
- D
If p divides a, then ap−1 is undefined.
Correct answer
AIf p divides a, then ap−1≡0(modp), not 1.
Explanation
When a≡0(modp), any positive power of a is also congruent to 0, so the theorem's conclusion would fail.
- A
- 36
In the standard proof of Fermat's Little Theorem, why are a,2a,…,(p−1)a all nonzero modulo p?
- A
Every product is a multiple of p, but its remainder is defined to be nonzero.
- B
The products are nonzero because a must be larger than p.
- C
Neither a nor any coefficient from 1 to p−1 is divisible by the prime p, so their products are not divisible by p.
- D
The coefficients are all equal to p−1 modulo p.
Correct answer
CNeither a nor any coefficient from 1 to p−1 is divisible by the prime p, so their products are not divisible by p.
Explanation
Since p is prime and does not divide a or any coefficient 1,2,…,p−1, it cannot divide their products.
- A
- 37
Why are the values a,2a,…,(p−1)a distinct modulo p in the proof?
- A
The values are distinct only when a=1.
- B
If ia≡ja(modp), the invertibility of a modulo p gives i≡j(modp), and the coefficients are therefore equal.
- C
If ia≡ja(modp), primality forces i and j to be prime.
- D
The values are distinct because their ordinary integer sizes increase.
Correct answer
BIf ia≡ja(modp), the invertibility of a modulo p gives i≡j(modp), and the coefficients are therefore equal.
Explanation
Because p does not divide a, a has an inverse modulo p. Cancelling a shows that equal products require equal coefficients modulo p; coefficients from 1 to p−1 then must be equal.
- A
- 38
What results from multiplying all the congruences represented by the list a,2a,…,(p−1)a in the proof?
- A
(p−1)!≡ap−1+pemainderp.
- B
(p−1)!≡a(p−1)(modp).
- C
p!≡ap(p−1)!emainderp.
- D
(p−1)!≡ap−1(p−1)!(modp).
Correct answer
D(p−1)!≡ap−1(p−1)!(modp).
Explanation
The coefficients multiply to (p−1)!, and the product contains p−1 factors of a, giving ap−1(p−1)!.
- A
- 39
Why can (p−1)! be cancelled from the product congruence modulo prime p?
- A
None of its factors is divisible by p, so (p−1)! has an inverse modulo p.
- B
It is divisible by p, so both sides can be divided by p.
- C
Its value is always equal to 1 modulo p.
- D
It can be cancelled for every modulus, whether or not the modulus is prime.
Correct answer
ANone of its factors is divisible by p, so (p−1)! has an inverse modulo p.
Explanation
Each factor from 1 through p−1 is nonzero modulo p. Their product is therefore relatively prime to p and has a multiplicative inverse modulo p.
- A
- 40
What reduction of the exponent does Fermat's Little Theorem permit when working modulo a prime p with a base not divisible by p?
- A
Every exponent can be replaced by its remainder modulo p.
- B
Every exponent can be reduced to zero modulo p−1.
- C
Exponents that differ by a multiple of p−1 give congruent powers modulo p.
- D
Exponents that differ by a multiple of p always give congruent powers modulo p.
Correct answer
CExponents that differ by a multiple of p−1 give congruent powers modulo p.
Explanation
Since ap−1≡1(modp), factors of ap−1 can be removed, so exponents can be reduced modulo p−1 under the theorem's conditions.
- A
- 41
What is the remainder of 795 when divided by 13?
- A
1
- B
2
- C
7
- D
11
Correct answer
B2
Explanation
Since 13 is prime and 7 is not divisible by 13, reduce the exponent modulo 12: 795≡711(mod13). Fermat's theorem gives 712≡1, so 711 is the inverse of 7 modulo 13. Since 7⋅2=14≡1(mod13), the remainder is 2.
- A

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