Download presentation
Presentation is loading. Please wait.
Published byEverett Gibbs Modified over 8 years ago
1
Coding Theory for the Classroom? Josef Böhm nojo.boehm@pgv.at Mathe mit Gewinn 2, Textbook for College for Business Administration (= HAK = Handelsakademie) All files are available on request. The respective chapter has been translated. See the pdf-file.
2
Mathematics in Codes of everday life: ISBN, EAN, UPC, Credit Cards, Social Insurance Number, …. Data Compressing Huffman Code Error Correcting Codes Hamming Code
3
International Herald Tribune, June 27-28, 2009
4
Old ISBN and new ISBN: Simon Singh: “The Code Book“ 10*1+9*8+ …+2*9 = wS 11-mod(wS,11) = check digit 1*9+3*7+1*8 …+3*9 = wS 10-mod(wS,10) = check digit
6
Single errors and phonetic errors are recognized. Prove the detection of phonetic errors (13 30; 14 40; …) EAN Code = UPC 13
7
Shift 1,n and n,0 by one digit and repeat the calculation.
8
ISBN and
9
Data Compressing The Huffman Code
10
“dieser text wird verwendet“
11
110|0011|011|00010|....... results in: dies...
12
freq(text) returns a frequency table of the characters contained in text huffcode(text,code) encodes the string text applying the Huffman-Code connected with this string. The code is given as a 2n-matrix (1st row: characters, 2nd row: code words). huffdecode(codtxt,code) decodes the encoded plain text codtxt, which was encoded applying code. hufftree(text) = Program for automatic generating a code for message plain. Because the code is part of the encoded message, it will be returned. He will be used for the final encoding of the message - and then for decoding. Entering 1 as second parameter presents how the Code develops (Nodes-weights and branches). hufftree2(text) has a tighter code. Because of the slight change in the structure of the lists nodes with same weights are sorted in another way. The resulting code is also optimal. All texts and code words are strings – must be entered in quotes! ("text")
13
Error Correcting Codes The Hamming Code
14
Hamming Code
15
Hamming Code and DERIVE hammdist(word1, word2) gives the Hamming distance of two code words. hamcode(text) gives the encoded text. (Use only Uppercase letters and punctuation characters. hamdecode(codeword) returns the codeword entered, its error free version in case of a transmission error and the decoded value. full_hamdecode(encoded text)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.