Professional Documents
Culture Documents
MATHEMATICS
in the
MODERNWORLD
‘Codes are like
people. There
different typesare and
different kinds.…
-Oscar Ingham
Course Learning Outcomes [CLO]
Module Learning Outcomes [MLO]
CLO5. Use mathematics in Topic Learning Outcomes
other areas such as finance
and business, codes
and coding schemes, MLO 1. Apply coding scheme to [TLO]
networks, voting, health and encode and decode different types
medicine, environment, arts of information for identification,
and design, and recreation. TLO 16. Use coding scheme to
privacy and security purposes. encode and decode different
MLO 2. Demonstrate honesty types of information for
and integrity when using codes identification, privacy and
for security purposes security purposes.
TLO 17. Exemplify honesty and
integrity when using codes for
security purposes.
7
CODES
A code is a system of symbols, letters, words, or
signals that are used instead of ordinary words and
numbers to send messages or store information. A code
is used to keep the message short or to keep it secret.
1 0 Pa c k Wr i g l ey ’s Juicy F r u i t G u m
- fi rst b a r- c o d e d retail p r o d u c t p u r c h a s e d in 1 9 7 4
at a g ro c e r y at O h i o, U S A .
The Label
- t h e c o d e s e w n i nto a t-shirt h a s i n fo r m a ti o n o n t h e
fabric c o m p o s i ti o n a n d c o u n t r y of m a n u fa c t u r e . T h e c o d e
is like a n Att r i b u te C o d e for t h e c lothing i te m ’s c o nte n t .
C h ec k Digits
- is a digit a d d e d to a string o f n u m b e r s for
e rro r d ete c ti o n p u r p o s e s . N o r m a l l y, t h e c h e c k
digit is c o m p u t e d f r o m t h e o t h e r digits in t h e
string. A c h e c k digit h e l p s digital s y s t e m s
d ete c t c h a n g e s w h e n d a t a is t ra n sfe r re d f r o m
t ra n s m i tt e r to re ceiver.
1. I S B N - I n t e r n a ti o n a l S t a n d a r d B o o k N u m b e r is a
c o d e u s e d t o u n i q u e l y identi f y a b o o k to get h e r.
The last digit is for error detecti on. So for 13 digits, 5 an d for 10
digits 9.
2. USPS- United States Postal Service- The identification code on
a United States Postal Service money order is an 11-digit number. The first ten
digits are the actual identification code. The 11th digit is the check digit.
The check digit is calculated using the following algorithm:
Let a1, a2, a3, a4, … , a11 be the identification number on a USPS money order,
then a11 = (a1+ a2+ a3 + a4 + a5 + a6+ a7+ a8+ a9+ a10)(mod 9)
Example: Which of the following USPS money order is valid?
1. 21349002734
Answer. 2+1+3+4+9+0+0+2+7+3 = 31 = 9x3 = 27 r.4
Since the remainder is 4 which is equal to the last digit
therefore, the USPS money order is valid.
2. 31059112852
Answer. 3+1+0+5+9+1+1+2+8+5 = 35 = 9x3 = 27 r.8
Since the remainder is 8 which is NOT equal to the last digit
therefore, the USPS money order is not valid. The valid USPS money
order is 31059112858.
3. Airline Tickets- The identification number on an airline ticket is a 15-
digit number. The first fourteen digits are the actual identification number and
the 15th digit is the check digit. The check digit is calculated rom the
identification number using the following algorithm.
Let a1, a2, a3, a4, … , a15 be a valid airline ticket identification number. Then
a15 = (a1a2a3a4a5a6a7a8a9a10a11a12a13a14)(mod 7)
Example: Which of the following airline tickets is valid?
1. 003712224944050
Answer. (00371222494405)(mod7) = 530,317,849,150 r.0
Since the remainder is 0 which is equal to the last digit therefore, the
airline ticket is valid
2. 003712224955053
Answer. (00371222495505)(mod7)= 53,031,785,072 r.1
Since the remainder is 1 which is NOT equal to the last digit
therefore, the airline ticket is NOT valid. The correct digit is
003712224955051
4. UPC: Universal Product Code
UPC’s have 12 digits: a1, a2, a3, a4, … , a12, where a12 is the
check digit. When scanned, computer computes:
3a1 + a2 + 3a3 + ... + 3a11 + a12.
If this sum ends in a 0 (zero), then the UPC is correct. If this sum ends in
something other than 0, there is an error.
Maps to: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Example:
1. Use the Alphabetic Caesar cipher with shift of 3 to encrypt the message: “WE
RIDE AT NOON”
Answer: Using the map above: ZH ULGH DW QRRQ.
Note: To obscure the message, the letters are often rearranged into equal sized blocks. The message ZH ULGH DW
QRRQ could be written in blocks of three characters as ZHU LGH DWQ RRQ.
2. Use the Alphabetic Caesar cipher with shift of 3 to decrypt the message: VSB
LQV LGH
Answer: Using the map above: SPY INS IDE = SPY INSIDE .
Security: Since there are only 25 possible shifts, we would only have to try 25 different possibilities to see which
one produces results that make sense. While that would be tedious, one person could easily do this by hand in a few
minutes. A modern computer could try all possibilities in under a second.
Numeric C a e s a r C i p h e r . In this approach, each letter is
replaced with a number from 0-25. 17146204
ROGUE
A 0 G 6 M 12 S 18 Y 24
B 1 H 7 N 13 T 19 Z 25
C 2 I 8 O 14 U 20
D 3 J 9 P 15 V 21
E 4 K 10 Q 16 W 22
F 5 L 11 R 17 X 23
Example:
1. Use the numeric Caesar cipher substitution above to encrypt the word
CRYPTOGRAPHY
Answer: Using the map above: 21724151914617015724
We write the message in rows of 8 characters each. Nonsense characters are added to the end to
complete the last row.
MEETATFI
RSTANDPI
NEATMIDN
IGHTPXNR
We could then encode the message by recording down the columns. The first column, reading
down, would be MRNI. All together, the encoded message would be MRNI ESEG ETAH TATT
ANMP TDIX FPDN IINR. The spaces would be removed or repositioned to hide the size of table
used, since that is the encryption key in this message.
ENIGMA
The actual Enigma machines used in WWII were
more complex. Each wheel consisted of a complex
substitution cipher, and multiple wheels were used in a
chain. The specific wheels used, order of the wheels, and
starting position of the wheels formed the encryption key.
While captured Engima devices provided the Allied
forces details on the encryption method, the keys still had
to be broken to decrypt messages.
These code breaking efforts led to the development of some of the first
electronic computers by Alan Turing at Bletchley Park in the United Kingdom.
This is generally considered the beginnings of modern computing.
In the 1970s, the U.S. government had a competition and ultimately approved
an algorithm deemed DES (Data Encryption Standard) to be used for encrypting
government data. It became the standard encryption algorithm used. This
method used a combination of multiple substitution and transposition steps,
along with other steps in which the encryption key is mixed with the
message. This method uses an encryption key with length 56 bits, meaning
there are 256 possible keys.
This number of keys make a brute force attack extremely difficult and costly,
but not impossible. In 1998, a team was able to find the decryption key for a
message in 2 days, using about $250,000 worth of hardware. However, the price
and time will go down as computer power increases.
87
References