1 / 6

Lösung 2.1 Information

Lösung 2.1 Information. Wieviele Fragen benötigen Sie beim „Zahlenraten“ 7 nächste_ganze_Zahl_größer( ld n) Eine Nachrichtenquelle sendet Zeichen aus dem Alphabet X = {a,b,c,d} mit den Wahrscheinlichkeiten p(a)=1/4, p(b)=p(c)=1/8

lysa
Télécharger la présentation

Lösung 2.1 Information

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lösung 2.1 Information • Wieviele Fragen benötigen Sie beim „Zahlenraten“ • 7 • nächste_ganze_Zahl_größer( ld n) • Eine Nachrichtenquelle sendet Zeichen aus dem AlphabetX = {a,b,c,d} mit den Wahrscheinlichkeiten p(a)=1/4, p(b)=p(c)=1/8 • H(x) = p(x) *h(x) = ((1/4*2)+(1/8*3)+(1/8*3)+(1/2*1)) bit = 1,75 bit • (2+3+3+1) bit = 9 bit • 4 * 1,75 bit = 7 bit • 1000 * 1,75 bit = 1750 bit • 1000 * H(x) = 1000 * (4 * (1/4 * 2 bit)) = 2000 bit

  2. p(x)(in %) h(x) (in Bit) p(x) * h(x) a 6,51 3,94 0,2566 b 1,89 5,73 0,1082 c 3,06 5,03 0,1539 d 5,08 4,30 0,2184 e 17,40 2,52 0,4390 f 1,66 5,91 0,0982 g 3,01 5,05 0,1521 h 4,76 4,39 0,2091 j 7,55 3,73 0,2814 j 0,27 8,53 0,0230 k 1,21 6,37 0,0771 l 3,44 4,86 0,1672 m 2,53 5,30 0,1342 n 9,78 3,35 0,3280 o 2,51 5,32 0,1334 p 0,79 6,98 0,0552 q 0,02 12,29 0,0025 r 7,00 3,84 0,2686 s 7,27 3,78 0,2749 t 6,15 4,02 0,2474 u 4,35 4,52 0,1967 v 0,67 7,22 0,0484 w 1,89 5,73 0,1082 x 0,03 11,70 0,0035 y 0,04 11,29 0,0045 z 1,13 6,47 0,0731 Lösung 2.2 Huffmann • siehe Tabelle rechts: h(x) • mittlerer Informationsgehalt:H(x) = 4,06 bitRedundanz bei 8bit-Kodierung(z.B. ASCII mit Parity-Bit):R = L-H = 8 bit - 4,06 bit = 3,94 bitr = R/L = 0,49

  3. Lösung 2.2 Huffmann p(x) (in %) a 6,51 b 1,89 c) Beispiele: a 0101 b 000010 c 01000 d 1111 e 001 f 000001 ... c 3,06 d 5,08 q x o w m g e 17,40 qx (0,05) y ow (4,40) u gm (5,54) t h d f 1,66 g 3,01 qxy (0,09) j ouw (8,75) n gmt (11,69) dh (9,84) h 4,76 ... ... ... ... i 7,55 jqxy (0,36) v nouw (18,53) dghmt (21,53) j 0,27 o 1 k 1,21 jqvxy (1,03) p z k dghmntouw (40,06) l 3,44 m 2,53 jqpvxy (1,82) f b kz (2,34) n 9,78 o 2,51 fjqpvxy (3,48) bkz (4,23) c l p 0,79 1 bfjkqpvxyz (7,71) i cl (6,50) a r s q 0,02 ... o r 7,00 bfijkqpvxyz (15,26) e acl (13,01) rs (14,27) s 7,27 ... ... ... o t 6,15 befijkqpvxyz (32,66) aclrs (27,28) u 4,35 1 o v 0,67 abcefijklqprsvxyz (59,94) o w 1,89 x 0,03 Die Bezeichnung der Kanten mit 0 oder 1 ist willkürlich y 0,04 z 1,13

  4. p(x) (in %) l(x) p(x)*l(x) a 6,51 4 0,2604 b 1,89 6 0,1134 c 3,06 5 0,1530 d 5,08 4 0,2032 e 17,40 3 0,5220 f 1,66 6 0,0996 g 3,01 5 0,1505 h 4,76 4 0,1904 j 7,55 4 0,3020 j 0,27 9 0,0243 k 1,21 7 0,0847 l 3,44 5 0,1720 m 2,53 5 0,1265 n 9,78 3 0,2934 o 2,51 5 0,1255 p 0,79 7 0,0553 q 0,02 11 0,0022 r 7,00 4 0,2800 s 7,27 4 0,2908 t 6,15 4 0,2460 u 4,35 4 0,1740 v 0,67 8 0,0536 w 1,89 5 0,0945 x 0,03 11 0,0033 y 0,04 10 0,0040 z 1,13 7 0,0791 Lösung 2.2 Huffmann • H(x) = 4.,06 bitL = 4,1 bitR = L-H = 0,04 bit • r = R/L = 0,01

  5. Lösung 2.3 Hamming • Hamming-Distanz bei ASCII-Code • D=1 • (D-1) = 0 • (D-1)/2 = 0 • Hamming-Codierung für 0000 - 1111 • D=3 (durch Vergleich der Distanz zwischen allen Codes) • 2-bit Fehler können erkannt werden • 1-bit Fehler können korrigiert werden 0000000 10010110000111 10011000011001 10100100011110 10101010101011 11000010101100 11001100110011 11110000110100 1111111

  6. Lösung 2.3 Hamming • Betrachten Sie den mit der Hamming-Methode codierten Code für „1000“ • 1001011P-Bits falsch => Fehler bei bit1001010 1 11001001 2 21001111 1,2 31000011 4 4 1011011 1,4 51101011 2,4 60001011 1,2,4 7 • Kippen von Bit 1 und Bit 6:1101010 1,2,4 7es wird ein Fehler erkannt (gut !).Allerdings wird der Fehler bei Bit 7 erkannt, wobei der Code bei derKorrektur also fälschlicherweise zu 0101010 korrigiert wird, statt zu 1001011

More Related