Question: [10] (a) Show that E(x)=x is a prefix-code. (b) Consider a variant of the x code such that x = x1x2 ...xn is encoded as
[10]
(a) Show that E(x)=¯x is a prefix-code.
(b) Consider a variant of the ¯x code such that x = x1x2 ...xn is encoded as x11x21 ... 1xn−11xn0. Show that this is a prefix-code for the binary nonempty strings with l(¯x)=2l(x).
(c) Consider x = x1x2 ...xn encoded as x1x1x2x2 ... xn−1xn−1xn¬xn.
Show that this is a prefix-code for the nonempty binary strings.
(d) Give a prefix-code ˜x for the set of all binary strings x including , such that l(˜x)=2l(x) + 2.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
