Assignment 3 Modulo Arithmetic
Assignment 3 Modulo Arithmetic
Show your complete solution in a piece of paper, take a picture of it, and
submit on or before the deadline.
x = 27 mod7
x = 6, Saturday
x ≡ 125 mod7
x ≡ 6, Saturday
B. Find 2 items in your house that has barcodes. Using our formula for ISBN
or UPC, determine whether the numbers in the barcodes are valid or not.
Attach a picture of the barcodes.
d12 ≡ 10 – ( 3d1
+ d2 + 3d3 + d4
+ 3d5 + d6 +3d7
+ d8 + 3d9 + d10
+ 3d11) mod10
d12 ≡ 10 –
d12 ≡ 10 – 55 mod10
d12 ≡ 45 mod10
d12 ≡ 5, VALID
d12 ≡ 10 –
C. Look for 2 credit cards or ATM cards (if none, you may get from google).
Using Luhn's algorithm, determine whether the card number is valid or not.
Attach a picture of the cards.