Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapters 16 & 17 Sarah Cameron 18 March 2010.  Review of Modular Arithmetic  Identification Numbers ZIP Codes Bar Codes  Binary Codes  Encryption.

Similar presentations


Presentation on theme: "Chapters 16 & 17 Sarah Cameron 18 March 2010.  Review of Modular Arithmetic  Identification Numbers ZIP Codes Bar Codes  Binary Codes  Encryption."— Presentation transcript:

1 Chapters 16 & 17 Sarah Cameron 18 March 2010

2  Review of Modular Arithmetic  Identification Numbers ZIP Codes Bar Codes  Binary Codes  Encryption

3  a mod n = the remainder when a is divided by n  Examples: 3 mod 2 = 1 37 mod 10 = 7

4  Identification Numbers: Unambiguously identify the person or thing with which it is associated Should be “self-checking”

5  Five Digits: ABCDE  A: Represents one of 10 geographic areas in the US, normally a grouping of states  BC: These two digits in combination with the first, identify a central mail-distribution point known as a sectional center.  DE: The last two digits indicate the town or local post office, the order is often alphabetical for towns within a delivery area

6  4 code: FGHJ  FG: Represent a delivery sector.  HJ: Narrow the area further based on the needs of the delivery sector. Bonus Trivia: Using the ZIP + 4 code makes you eligible for cheaper bulk rates.

7  Binary Code: any system for representing data with only two symbols  Bar Code: a series of dark and light spaces that represent characters

8  Has been used since 1973.  12 Digit number: KLMNOPQRSTUV  K: This digit identifies the kind of product.  LMNOP: These digits identify the manufacturer.  QRSTU: These digits are assigned by the manufacturer to identify the product.  V: The final digit is the check digit.

9  Check Digits Used for error detection and correction Can be the last digit in an ID number or a binary code. Often for ID numbers:  Sum the individuals digits and mod by the check digit

10  Take binary string a 1 a 2 a 3 a 4 and append three check digits c 1 c 2 c 3 so that any single error in any of the seven positions can be corrected  Choose 3 different sums: c 1 : a 1 + a 2 + a 3 c 2 : a 1 + a 3 + a 4 c 3 : a 2 + a 3 + a 4  If the value of the check is even, the check digit should be zero.  If the value of the check sum is odd, the check digit should be one.  Using this method you are able to produce a list of all possible a 1 a 2 a 3 a 4 c 1 c 2 c 3 combinations.

11  Nearest-Neighbor Decoding This method decodes a received message as the code word that agrees with the message in the most positions  Distance Between Two Strings (of equal length) The number of positions in which the strings differ.  Example: Real Message: 1000110 Received as: 1010110 The distance between the real message and the received message is one.  If there are two possible translations for an erroneous message, it is not decoded.

12  Binary Linear Code Consists of words composed of 0’s and 1’s obtained from all possible messages of a given length by using parity-check sums to append check digits to the messages. These words are called code words.  Weight of a Binary Code Is the minimum number of 1’s that occur among all nonzero words of that code.  Accuracy: If the weight of a binary code is odd, the code will correct any (t-1)/2 or fewer errors. If the weight of a binary code is even, the code will correct any (t-2)/2 or fewer errors. If you simply want to detect errors, the code will detect t-1 errors

13  Encryption The process of disguising data  Cryptology The study of methods to make and break secret codes  Data Compression The process of encoding data so that the most frequently occurring data are represented by the fewest symbols

14

15 1. Delete all occurrences of h and w. 2. Assign numbers to the remaining letters as follows: 0: A, E, I, O, U 1: B, F, P, V 2: C, G, J, K, Q, S, X, Z 3: D, T 4: L 5: M, N 6: R 3. If two or more letters with the same numeric value are adjacent, omit all but the first. 4. Delete the first character of the original name, if still present. 5. Delete all occurrences of A, E, I, O, U, and Y. 6. Retain only the first three digits corresponding to the remaining letters. 7. Append trailing 0’s if fewer than three letters remain. 8. Precede the digits with the first letter of the name.

16 ABCDEFGHIJKLMNOPQRSTUVWXYZ DEFGHIJKLMNOPQRSTUVWXYZABC Used by Julius Caesar to send messages to his troops. Decode “DWWDFN DW GDZQ” The encoded message: “ATTACK AT DAWN”

17 ATTACK AT DAWN019 0210019302213 MATHMA TH MATH120197120197120197 MTMHOK ?? ????12191271410 Choose a key word, which can be anything. Add the digit position of the original letter to the digit position of the key word letter. Mod that number by 26 = digit position of the coded letter. Repeat the key word for as many characters as you need. Answer: TA PAPU;19, 0, 15, 0, 15, 20

18  Questions?  Applications?  Homework: (7 th Edition) Chapter 16: #74 Chapter 17: #11


Download ppt "Chapters 16 & 17 Sarah Cameron 18 March 2010.  Review of Modular Arithmetic  Identification Numbers ZIP Codes Bar Codes  Binary Codes  Encryption."

Similar presentations


Ads by Google