Tried a bunch of resources to read about it, still don't really get it.
This is what Wikipedia says
A prefix code is a type of code system (typically a variable-length code) distinguished by its possession of the "prefix property", which requires that there is no whole code word in the system that is a prefix (initial segment) of any other code word in the system.
This is my understanding so far:
I have a language L that has all these words L = {"a", "b"}
. From my understanding, right now my language L is prefix free, but if I add a new word to it like "ac", so that my language becomes L = {"a", "b", "ac"}
, its not prefix-free anymore?
Is my thinking correct? or am I missing anything?
{"aa", "ab", "ac"}
would be a valid prefix code even though they all begin with"a"
. But we cannot add the code"a"
to our system and maintain the prefix property. – Justin Heath Dec 01 '17 at 18:34