440
Relations, Functions, and Matrices
S e c t I o n 5 . 6 Review
technIQueS
• Perform calculations using the mod function.
• Build or search a hash table that uses linear probing
for collision resolution.
• Build or search a hash table that uses chaining for
collision resolution.
• Encode and decode using a Caesar cipher.
• Apply the algorithm to compute a circular left shift
of a binary string.
• Perform encryption and decryption using the RSA
public key encryption algorithm.
• Compute the check digit for the ISBN-10,
ISBN-13, UPC-A, and ABA codes.
maIn IDeaS
• The humble modulo function is useful in many important applications.
exeRcISeS 5.6
Exercises 1–8 concern modular arithmetic mod n.
1. 25 = 11 + 14. Show by computing each expression that
25 mod 6 = (11 mod 6 + 14 mod 6) mod 6
2. 395 = 129 + 266. Show by computing each expression that
395 mod 4 = (129 mod 4 + 266 mod 4) mod 4
3. 262 = 74 + 188. Show by computing each expression that
262 mod 13 = (74 mod 13 + 188 mod 13) mod 13
W
W
Relations, Functions, and Matrices
S e c t I o n 5 . 6 Review
technIQueS
• Perform calculations using the mod function.
• Build or search a hash table that uses linear probing
for collision resolution.
• Build or search a hash table that uses chaining for
collision resolution.
• Encode and decode using a Caesar cipher.
• Apply the algorithm to compute a circular left shift
of a binary string.
• Perform encryption and decryption using the RSA
public key encryption algorithm.
• Compute the check digit for the ISBN-10,
ISBN-13, UPC-A, and ABA codes.
maIn IDeaS
• The humble modulo function is useful in many important applications.
exeRcISeS 5.6
Exercises 1–8 concern modular arithmetic mod n.
1. 25 = 11 + 14. Show by computing each expression that
25 mod 6 = (11 mod 6 + 14 mod 6) mod 6
2. 395 = 129 + 266. Show by computing each expression that
395 mod 4 = (129 mod 4 + 266 mod 4) mod 4
3. 262 = 74 + 188. Show by computing each expression that
262 mod 13 = (74 mod 13 + 188 mod 13) mod 13
W
W
