Download presentation

Presentation is loading. Please wait.

Published byJakob Copley Modified over 3 years ago

1
Math for Liberal Studies

2
Problems can occur when data is transmitted from one place to another The two main problems are transmission errors: the message sent is not the same as the message received security: someone other than the intended recipient receives the message

3
“Party tonight, bring chipd”

4
We detect the error because “chipd” is not a word in our dictionary

5
“Party tonight, bring chipd” We detect the error because “chipd” is not a word in our dictionary Can we correct the error?

6
“Party tonight, bring chipd” Even though “chipd” is not the correct word, we can assume that the correct word is close What words are one letter away from “chipd”? After considering the possibilities, “chips” is the most likely correction

7
“Party tonight, bring sofa” This time, all of the words are in the dictionary, but we still suspect something is wrong (unless it’s a furniture party)

8
“Party tonight, bring sofa” This time, all of the words are in the dictionary, but we still suspect something is wrong (unless it’s a furniture party) Again we can change a single letter to change “sofa” to “soda,” which seems likely to be the original intended message

9
“Party tonight, bring sedr” Identifying the error is easy: “sedr” is not a word However, this time, changing a single letter doesn’t get us a word that makes sense

10
“Party tonight, bring sedr” We can change two letters, but that gives us two viable options: sedr → sodr → soda sedr → bedr → beer It is impossible to tell which of these was the original intended message

11
Errors can be detected when the message isn’t in a “dictionary” of valid messages We can try to correct errors by finding valid messages that are “close” to the message we receive (but this doesn’t always work)

12
Machines communicate with each other using a language entirely made of 0’s and 1’s The same kinds of errors we studied earlier (substitution, transposition) can occur when these digital signals are sent We can use special techniques to detect and correct these errors

13
As an example, consider the Mars rovers, which landed in 2004 NASA sends signals to the rover to command it to perform various tasks, like movement These signals are sent in binary

14
Suppose these messages are 4 digits long That makes 16 possible messages NASA could send:

15
Suppose NASA sends the message “0110,” which might be telling the rover to move backwards to avoid a crater If, over the vast distances between planets, the message is garbled and received as “0010,” this could be disastrous

16
If the garbled message is interpreted as “move forward,” this could mean the end of a very expensive mission To avoid this problem, we will add check digits to the message, just like we did for ID numbers

17
Many of the check digit schemes we studied involved adding up the digits of our ID number We’ll do something similar here, but keep in mind that since every digit of a binary message must be 0 or 1, our check digit must be 0 or 1 also

18
A “checksum” is just a check digit that is based on a sum of digits in the message The “parity” of the sum is 0 if the sum is even, and 1 if the sum is odd Another way to think about parity is that it is the remainder when the sum is divided by 2

19
Let’s go back and add a parity checksum digit to each of these messages

20
For example: 1011 The sum of the digits is 3, which has parity 1 So the code word is 10111

21
Doing this for each of the messages gives us the code words shown below

22
Now when NASA wants to send the message “0110,” they send the code word “01100.” Now see what happens when there is a substitution error: 00100 We can detect the error because this is not a valid code word

23
Can we correct the error? Using the ideas from before, we want to look for the valid code word that is “closest” to the message we received What does “closest” mean? We have to define the idea of distance between code words

24
The distance between two code words is simply the number of digits in which they differ For example, the distance between 01101 and 10111 is 3

25
To correct the error in our message, we will compare it to every valid message and find the one that is closest (in the sense of having the smallest distance) This is called the minimum distance decoding method

26
We compare the message we received (00100) to the valid code words: Code Word Distance Code Word Distance Code Word Distance Code Word Distance 000001000113001011001101 010013010103011001011113 100013100103101001101113 110003110115111013111103

27
Unfortunately, there are 5 code words that are tied for the closest We have no way of knowing which one is correct! Code Word Distance Code Word Distance Code Word Distance Code Word Distance 000001000113001011001101 010013010103011001011113 100013100103101001101113 110003110115111013111103

28
Why didn’t our checksum allow us to correct this error? If we look closely at our list of code words, we see that some of them are at a distance of 2 from each other

29
Distance 2 is significant because it means that if there is a single error, the new message is now 1 away from the original, but also 1 away from a new code word

30
If we can create a code system where the minimum distance between code words is 3, then we will be able to correct any single digit error

31
Our solution is to add more checksums to our messages Let’s call the four digits of our message M 1, M 2, M 3, and M 4 So for the message 0110, M 1 = 0, M 2 = 1, M 3 = 1, and M 4 = 0

32
This time we will have three checksums, which we’ll call C 1, C 2, and C 3 C 1 is the parity of M 1 + M 2 + M 3 C 2 is the parity of M 1 + M 3 + M 4 C 3 is the parity of M 2 + M 3 + M 4 Let’s try it on an example: 0111

33
Our message is 0111 C 1 is the parity of M 1 + M 2 + M 3 = 2, which is 0 C 2 is the parity of M 1 + M 3 + M 4 = 2, which is 0 C 3 is the parity of M 2 + M 3 + M 4 = 3, which is 1 So the code word is 0111001

34
Doing this for each of our 4-digit messages, we get a new list of 7-digit code words:

35
This time, the minimum distance between code words is 3, which means that we can detect any single error

36
If we start with a valid code word and there is a single error, we are 1 away from where we started, and at least 2 away from anywhere else

37
Also, we can detect any two errors using this code, since after 2 errors, we are still at least 1 away from any valid code word

38
In general, if we know that the minimum distance between code words is D: the code can detect D – 1 errors the code can correct (D – 1)/2 errors, rounded down In our examples, when D = 2, we could detect 1 error, but could not correct any When D = 3, we can detect 2 errors, can correct 1

Similar presentations

OK

Math for Liberal Studies. None of the methods we have investigated so far can detect transposition errors In this section we will investigate new.

Math for Liberal Studies. None of the methods we have investigated so far can detect transposition errors In this section we will investigate new.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on obesity prevention in children Ppt on enterprise resource planning Ppt on indian culture download Ppt on elements compounds and mixtures Web technology books free download ppt on pollution Ppt on inhabiting other planets in the milky Ppt on social contract theory ethics Ppt on renewable energy sources in india Ppt on structure of chromosomes during prophase Ppt on central limit theorem examples