This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Homework 2: Math 3360 Applicable Algebra Chapter 5: Congruence 24. Find a divisibility test for 6. Solution: Combine the divisibility tests for 2 and 3, i.e. a number a is divisible by 6 iff 3 divides the sum of the digits of a AND 2 divides the units digit of a . 37. Show that if you try to type in a valid 16 digit credit card number, but mistype one of the 16 digits, the resulting number will be shown invalid by Luhn’s formula. Solution: Suppose you attempt to type a valid 16 digit credit card number, a, but mistype exactly one digit. De Luhn’s formula takes the number a = a 16 a 15 ...a 2 a 1 and sums it up as S = a 1 + p ( a 2 )+ ... + a 15 + p ( a 16 ) where p is the function described in Section D, and says that it will be valid iff S ≡ 0( mod 10). It is important to note that the function p is onetoone, i.e. that no two numbers are sent to the same number. Suppose that a i was mistyped as a i 6 = a i . Then our sum becomes S = S a i + a i if i is odd or S = S p ( a i ) + p ( a i ) is i is even. Note that S ≡ 0( mod 10). Since a i 6 = a i and hence p ( a i ) 6 = p ( a i ) then we get that 1 ≤  S S  ≤ 9 since the largest difference between two non equal digits base 10 is 9 and the smallest is 1. Insince the largest difference between two non equal digits base 10 is 9 and the smallest is 1....
View
Full
Document
This note was uploaded on 09/05/2011 for the course MATH 3360 taught by Professor Billera during the Spring '08 term at Cornell.
 Spring '08
 BILLERA
 Algebra, Congruence

Click to edit the document details