Reputation: 2912
Is the code C = {00, 11, 0101, 111, 1010, 100100, 0110} uniquely decodeable?
My answer is no, because according to Sardinas–Patterson algorithm:
C1 = {1}
C2 = {1, 11, 010, 00100}
So C2 AND C = {11}, so C is not a uniquely decodable code.
I am wondering am I right about this?
Upvotes: 0
Views: 596
Reputation: 33509
You are correct that this code is not uniquely decodable.
Consider the string 111111, this can be parsed as 11 11 11 or as 111 111.
Upvotes: 3