There are many places in our lives where we meet identification numbers;
for example, passports, bank accounts, credit cards, ISBN book numbers,
and so on. Each identification number obeys a rule which makes it
easy to check (most of the time) whether the number has been copied
correctly or not and for this reason they are also called check codes.
Here are some of the methods for checking the validity of these numbers.
They use modulus or clock arithmetic.
Which of the following are valid identification numbers? The rules for each type are given below.
US Money Order: 123-123-123-45
Airline tickets: 123456780
Universal Product Code: 654321123456
Credit card: 1723-1001-2065-1098
ISBN number: 0 5215 3612 4
US banks: 07100013
US Postal Service Money Order: This is an eleven digit number using digits 1,2,...9 where the sum of the first ten digits is
congruent to the eleventh digit modulo 11. That is
where
mod 9. The
last digit is called the check digit.
For example 23548762912 is a valid number because the first ten digits add up to 47 which is congruent to 2 mod 9.
Airline tickets: This number can be any length. It uses the digits 0 to 9 and the last digit is a check digit. The number
formed by omitting the check digit must be congruent to the check digit modulo 7. That is
where
mod 7.
For example 2943739573 is a valid number because
mod 7.
Universal Product Code: This is a twelve digit number
using the digits 0 to
9, where
is the category of the goods (clothes, food,...),
is the manufacturer's code
is the code for the product,
is the check digit.
If we rewrite this type of identification code in the form
, then
these codes must satisfy the following condition:
Note that if a number
is congruent to zero mod 10 it means that
is a multiple of 10. For example 582039827198 is a valid code because 3(5+2+3+8+7+9)+(8+0+9+2+1+8)=130.
All Major Credit Cards: These identification codes
have sixteen digits using digits 0 to 9, where
mod 10 and where
For example 6356 0125 0327 9616 is a valid code because
,
,
and
.
ISBN Numbers: Books have ten digit identification numbers
using the digits 0 to 9 where
Sometimes this forces the check-digit
to be
; as this would
then give an eleven digit number the publishers use
instead of
.
For example, to check 0 7167 2393 X we calculate 0+63+8+42+42+10+12+27+6=210 so, as the check digit is 10 which makes the total
220 (a multiple of 11) we know this is a valid ISBN number.
US banks: These are nine digit identification numbers
using the digits 0 to 9 where
mod 10. For example 123456780 is a valid US bank identification number.