Unique decodeability

129 Views Asked by At

I am stuck on the question: " Prove that any uniquely decodable code from {0,1}* to {0,1}* necessarily makes some strings longer if it makes some strings shorter. " If we can show that the Kraft-McMillan inequality becomes equality, we are done. This is because if a word gets shorter, we add a larger contribution, which implies that another word should get shorter. But I can not figure out how to show this. Is there another way of proving this?