quiz6_solution

quiz6_solution - Quiz 6 solution Math 187, Prof. Garsia...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Quiz 6 solution Math 187, Prof. Garsia Alex Brik UC San Diego May 21, 2010 1. a) H = 16 60 log 2 60 16 + 3 & 4 60 log 2 60 4 + 8 60 log 2 60 8 + 24 60 log 2 60 24 = 2 : 2 Minimum number of binary registers 60 & H = 60 & 2 : 2 = 132 b) Hu/man tree: 1 letter code length A 10 2 B 11110 5 C 11111 5 D 110 3 E 1 F 1110 4 bit= 2 & 16 + 5 & 4 + 5 & 4 + 3 & 8 + 24 + 4 & 4 = 136 2. Heights h 1 , h 2 , ... , h n are a tree if S = n X i =1 1 2 h i ¡ 1 with equality i/ the tree is complete. Sequence 1: S = 1 4 + 1 4 + 1 8 + 1 8 + 1 16 + 1 16 + 1 32 = 29 32 incomplete tree Sequence 2: S = 1 2 + 1 8 + 1 8 + 1 8 + 1 16 + 1 32 + 1 32 = 1 complete tree. Sequence 3: S = 1 4 + 1 8 + 1 8 + 1 8 + 1 8 + 1 8 + 1 16 = 15 18 incomplete tree. 3. a). 2 i + 2 = 2 mod 4 i = 0 Plaintext: m b) all keys are equally likely. Fix c s , m i s = 2 i + j mod 4 if i = 0 s = j- unique if i = 1 j = s ¢ 2 mod 4 unique Thus for every pair ( m;c ) there is a unique key k s.t. E k ( m ) = c ....
View Full Document

This note was uploaded on 09/22/2010 for the course MATH MATH187 taught by Professor Math187 during the Spring '10 term at UCSD.

Page1 / 4

quiz6_solution - Quiz 6 solution Math 187, Prof. Garsia...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online