WGU C960 DISCRETE MATH II UNIT 2
NUMBER THEORY AND CRYPTOGRAPHY
EXAM QUESTIONS WITH COMPLETE
SOLUTIONS
2.3.3: Computing div and mod.
-10 mod 5
0
Starting with -10, when 5 is added 2 times to -10, the result is 0, which is in the
range from 0 through 4.-10 + 2 · 5 = 0-10 = -2 · 5 + 0
2.3.3: Computing div and mod.
-13 mod 6
5
Starting with -13, adding 6 three times gives 5, in one range from 0 through 5. -
13 + 3 · 6 = 5-13 = -3 · 6 + 5
2.3.3: Computing div and mod.
-13 div 6
-3
starting with -13, 6 is added 3 times until the result falls within the range from 0
through 5.
-13 + 3 · 6 = 5
-13 = -3 · 6 + 5
,2.3.1: Compute quotient and remainder.
344 mod 5
4
344 = 68·5 + 4, hence 344 mod 5 = 4.
2.3.1: Compute quotient and remainder.
344 div 5
68
344 = 68·5 + 4, hence 344 div 5 = 68.
2.3.1: Compute quotient and remainder.
(-215) mod 7
2
(−215) = (−31)·7 + 2, so (−215) mod 7 = 2.
2.3.1: Evaluate divisor and modulus.
(−215) div 7
−31
(−215) = (−31)·7 + 2, so (−215) div 7 = −31.
Lesson 2.5.2 Evaluating arithmetic expressions modulo n.
(43¹⁷+32*130) mod n 7
4
The value of the expression (43¹⁷+32*139) mod 7 does not change if 43, 32, and
139 are replaced by 43 mod 7, 32 mod 7, and 139 mod 7.
,The worth of the expression is therefore (1¹⁷+4*6) mod 7.
(43¹⁝+32*139) mod 7=(1+24) mod 7=25 mod 7=4
2.5.3: Evaluate arithmetic expressions, modulo n.
(651²³ + 17) mod 10
8
651 mod 10 = 1. Thus,
(651²³ + 17) mod 10
= (1²³ + 17) mod 10
= (1 + 17) mod 10
=8
2.5.1: Evaluate an expression using modulo arithmetic.
[(47 mod 6) + (36 mod 6)] mod 6
5
2.5.1: Evaluate an expression using modulo arithmetic
[(34 mod 6 )(72 mod 6)] mod 6
0
2.5.1: Compute expression using modular arithmetic.
[27 · 70] mod 7
0
, 2.5.1: Compute expression using modular arithmetic
[26¹⁹ + 13] mod 5
4
2.5.1: Computing using modular arithmetic
38⁷ mod 3
2
387 mod 3 = (38 mod 3)7 mod 3 = (27) mod 3 = 128 mod 3 = 2
2.5.1: Computing using modular arithmetic
(72 · (−65) + 211) mod 7
4
(72 · (−65) + 211) mod 7 = ((72 mod 7) · (−65 mod 7) + (211 mod 7)) mod 7 =
(2 · 5 + 1) mod 7 = 11 mod 7 = 4
2.5.1: Computing using modular arithmetic
(77 · (−65) + 147) mod 7
0
NUMBER THEORY AND CRYPTOGRAPHY
EXAM QUESTIONS WITH COMPLETE
SOLUTIONS
2.3.3: Computing div and mod.
-10 mod 5
0
Starting with -10, when 5 is added 2 times to -10, the result is 0, which is in the
range from 0 through 4.-10 + 2 · 5 = 0-10 = -2 · 5 + 0
2.3.3: Computing div and mod.
-13 mod 6
5
Starting with -13, adding 6 three times gives 5, in one range from 0 through 5. -
13 + 3 · 6 = 5-13 = -3 · 6 + 5
2.3.3: Computing div and mod.
-13 div 6
-3
starting with -13, 6 is added 3 times until the result falls within the range from 0
through 5.
-13 + 3 · 6 = 5
-13 = -3 · 6 + 5
,2.3.1: Compute quotient and remainder.
344 mod 5
4
344 = 68·5 + 4, hence 344 mod 5 = 4.
2.3.1: Compute quotient and remainder.
344 div 5
68
344 = 68·5 + 4, hence 344 div 5 = 68.
2.3.1: Compute quotient and remainder.
(-215) mod 7
2
(−215) = (−31)·7 + 2, so (−215) mod 7 = 2.
2.3.1: Evaluate divisor and modulus.
(−215) div 7
−31
(−215) = (−31)·7 + 2, so (−215) div 7 = −31.
Lesson 2.5.2 Evaluating arithmetic expressions modulo n.
(43¹⁷+32*130) mod n 7
4
The value of the expression (43¹⁷+32*139) mod 7 does not change if 43, 32, and
139 are replaced by 43 mod 7, 32 mod 7, and 139 mod 7.
,The worth of the expression is therefore (1¹⁷+4*6) mod 7.
(43¹⁝+32*139) mod 7=(1+24) mod 7=25 mod 7=4
2.5.3: Evaluate arithmetic expressions, modulo n.
(651²³ + 17) mod 10
8
651 mod 10 = 1. Thus,
(651²³ + 17) mod 10
= (1²³ + 17) mod 10
= (1 + 17) mod 10
=8
2.5.1: Evaluate an expression using modulo arithmetic.
[(47 mod 6) + (36 mod 6)] mod 6
5
2.5.1: Evaluate an expression using modulo arithmetic
[(34 mod 6 )(72 mod 6)] mod 6
0
2.5.1: Compute expression using modular arithmetic.
[27 · 70] mod 7
0
, 2.5.1: Compute expression using modular arithmetic
[26¹⁹ + 13] mod 5
4
2.5.1: Computing using modular arithmetic
38⁷ mod 3
2
387 mod 3 = (38 mod 3)7 mod 3 = (27) mod 3 = 128 mod 3 = 2
2.5.1: Computing using modular arithmetic
(72 · (−65) + 211) mod 7
4
(72 · (−65) + 211) mod 7 = ((72 mod 7) · (−65 mod 7) + (211 mod 7)) mod 7 =
(2 · 5 + 1) mod 7 = 11 mod 7 = 4
2.5.1: Computing using modular arithmetic
(77 · (−65) + 147) mod 7
0