You are on page 1of 4

Math is one of the most important parts of our life. Even before kindergarten, we have a basic understanding of addition.

Math is in every part of our life. When we wake up in the morning and start the coffee, we use math to figure out how much water we need for the amount of coffee we are using. We use math on our way to work and school, figuring out if we have enough time to be on time. Math is everywhere. And with the advent of computers, math is even more integrated into our everyday lives. Computers have made our lives many times easier. With the computer, many tasks that we would normally have to do by hand (checking the weather, multiplying and dividing numbers, typing a document) can be done on the computer. Behind computers is math. Computers use math in their programming to solve things it is confronted with. For example, each letter that is typed is based on an if-then statement attached to the keyboards hardware. We also use computers to make huge databases, organizing the information we need in an easy-to-read fashion. Databases are used in computers to record information about various things. Three things that are used quite often are book ISBNs, credit card numbers, and IMEI numbers. When using these numbers, it is important that they are correct. With the ISBN, this is for simple convenience. But with the credit card and IMEI numbers sensitive user data is attached to the numbers. So a way was needed to validate numbers, and to only make certain numbers valid, to cut down on error. On the back of every book sold since 1970 is an ISBN number identifying the book. This ISBN number has a few components. For example, the book Algebra 2, published by Holt, Rinehart, and Winston, has the ISBN 0-03-092351-4. The first digit, 0, identifies the group. 0 is used as the group of all English speaking countries. The second block, 03, identifies the publisher. 03 is Houghton Mifflin School. The next block is the title. 092351 is Holt California Algebra 2, 2008 edition. The final digit is the check digit, which is the most important digit in the ISBN. This digit checks the rest of the number

and if it matches, the ISBN is a valid ISBN. ISBN check digits are calculated using modular arithmetic. We use modular arithmetic every daytime is based on modular arithmetic. It's based on numbers wrapping around after they reach a certain value, known as the modulus. In time, when you add 8 hours to 6:00, it will be 2:00 rather than 14:00 because time wraps around every 12 hours. In modular arithmetic, the modulus is congruent to zero. So in time, 12:00 could also be called 0:00. Likewise, 38 is congruent to 2 in mod 12 because 38-2 =36, which is a multiple of 12. ISBNs have a modulus of 11. The calculation of the check digit is based on this. Take the ISBN 003-092351-4 from the Algebra 2 book. The check digit in this ISBN is 4. This is calculated using (10x1 + 9x2 + 8x3 + 7x4 + 6x5 + 5x6 + 4x7 + 3x8 + 2x9 + x10), where the total, mod 11, is congruent to zero. In other words, the total must be a multiple of 11. So, here is how the Algebra 2's book's check digit is calculated. Number Product 0 0 0 9 0 3 8 24 0 7 0 9 6 54 2 5 10 3 4 12 5 3 15 1 2 2 117 Total

Multiplier 10

The total from the first 9 digits (which can be whatever they need to be) is 117. The nearest multiple of 11 is 121. So the book's check digit is 4. 117+4=121. And 121 mod 11 is congruent to zero. Now when this is punched into an ISBN identification system, the total checks and this is a valid ISBN. Algorithms like this are also used in other ways. One very common way that they are used is in credit card numbers. Many people use credit cards every day. When a credit card is used in a store, the merchant will almost always either swipe the card or use a near field communication (NFC) device to complete the transaction. When one of these methods is used, the card number is transmitted

securely, but most importantly, correctly. But when a user shops online, there is no physical card used. The user simply types in a card number. With this, there is much more room for error. A user can accidentally skip a number, or type in the wrong number, or add a number. If this goes unchecked, transactions could be charged onto the wrong user's account. This would also open the doors to security attacks, where hackers could develop scripts to try out every possible combination of numbers until they get a hit. But with the use of the check digit, similarly to how it is used in the ISBN system, only some credit card numbers are valid, and it is easy to check and to program systems to check. The credit card check digit system also uses modular arithmetic to form numbers. However, the modulus is different. The credit card check digit system works in mod 10 (versus mod 11 in the ISBN system). The mod 10 algorithm is known as the Luhn Algorithm, named after the mathematician that came up with the mod 10 algorithm. The mod 10 algorithm works on any string of numbers to output a check digit from 0-9. Additional zeros in front don't affect the check digit, allowing systems to easily add extra digits. Here's how the mod 10 algorithm works. Take the VISA credit card number 4606 8400 8953 5651. This credit card's check digit (the last one) is 1. The Luhn Algorithm works by multiplying every other digit, starting with the digit on the farthest right. You then add them up (similarly to how the mod 11 algorithm works; for 2 digit numbers, add the digits) and find the difference between the number and a multiple of ten. Account Number Double Every Other Sum 4 8 8 6 6 6 0 0 0 6 6 6 8 16 7 4 4 4 0 0 0 0 0 0 8 7 9 9 5 10 1 3 3 3 5 1 6 6 5 10 1 59 Total

16 9

10 6

59 is the total of the first 15 digits (which can be whatever they need to be). The nearest multiple of 10 is 60. 60-59=1. The check digit is 1. And 60 mod 10 is congruent to zero. When this is

used online for shopping or in any other place, the number checks as a valid credit card number. Another way the Luhn Algorithm is used is in International Mobile Equipment Identification (IMEI) numbers. Every mobile device capable of operating on a wireless mobile network is assigned a unique IMEI. This IMEI gives an unchangeable identification to a device, allowing stolen devices to be blacklisted and rendered unusable and worthless by mobile device carriers. This helps cut down on theft, since there is no incentive to steal worthless devices, and protects customers from paying charges they didn't authorize. It's very important that the wrong IMEI is not put in. So, a check digit is used here also. The exact same method is used to calculate check digits for IMEIsmod 10. Take the IMEI 354455041764679. The check digit here is 9. IMEI Number Double Every Other Sum 3 3 3 5 1 4 4 4 8 8 5 5 5 5 10 1 0 0 0 4 8 8 1 1 1 7 14 5 6 6 6 4 8 8 6 6 6 7 14 5 61 Total

10 4

61 is the total of the first 14 digits (which can be whatever they need to be). The nearest multiple of 10 is 70. 70-61=9. The check digit is 9. And 70 mod 10 is congruent to zero. When this is looked up by a carrier and the carrier attempts to blacklist this device, the number checks as a valid IMEI number. As you can see, math is extremely important to the effective use of database numbers. One wrong number can cost a company millions of dollars in lost profits or lawsuits, or could cost a consumer hundreds. It can also cause extreme inconvenience to the customer. That's why systems like this were designed, to prevent these kinds of errors.

You might also like