You are on page 1of 3

1.

Show your complete solution in a piece of paper, take a picture of it, and
submit on or before the deadline.

A. Choose any 2 significant dates in history, or any special occasions in the


past. Using Zeller's Congruence, determine the day of the week these dates
were.

March 16, 1521:

d = 16, m = 1, c = 15, y = 21, x = ?


13 ( m) −1 y c
x = ([ ] + [ 4 ] + [ 4 ] + d + y – 2c) mod7
5
13 ( 1 ) −1 21 15
x = ([ ] + [ 4 ] + [ 4 ] + 16+ 21 – 2(15)) mod7
5

x = (2+ 5+ 3 + 26+ 21 – 30) mod7

x = 27 mod7

x = 6, Saturday

February 22, 1986

d = 22, m = 12, c = 19, y = 85, x = ?


13 ( m) −1 y c
x ≡ ([ ] + [ 4 ] + [ 4 ] + d + y – 2c) mod7
5
13 ( 12 ) −1 85 19
x ≡ ([ ] + [ 4 ] + [ 4 ] + 22 + 85 – 2(19)) mod7
5

x ≡ (31+ 21+ 4 + 22+ 85 – 38) mod7

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 –

(3(0+7+0+2+5+0) + (4+4+0+4+1) mod10

d12 ≡ 10 – (42+ 13) mod10

d12 ≡ 10 – 55 mod10

d12 ≡ 45 mod10

d12 ≡ 5, VALID

d12 ≡ 10 – ( 3d1 + d2 + 3d3 + d4 + 3d5 + d6


+3d7 + d8 + 3d9 + d10 + 3d11) mod10

d12 ≡ 10 –

(3(8+6+4+0+6+6) + (7+9+1+0+4) mod10

d12 ≡ 10 – (90 + 21) mod10

d12 ≡ 10 – 111 mod10

d12 ≡ 101 mod10


d12 ≡ 1, NOT VALID

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.

5488 – 6845 – 9123 – 4567


[(1+0)+4+(1+6)+8+(1+2)+8+8+5+(1+8)+1+4+3+8+5+(1+2)+7)
= 87 mod10
87 mod10 ≠ 0, NOT VALID

5425 – 1801 – 2345 – 6789


[(1+0)+4+2+5+2+8+0+1+4+3+8+5+(1+2)+7(1+6)+9)
= 69 mod10
69 mod10 ≠ 0, NOT VALID

You might also like