X is a prefix of a string y if there exists xz = y and x is a proper prefix if x is not equal to y.
Just wanted to make sure I understand the concept correctly.
For example, if there is a string y = "abracadabra" does it mean that there are loads of possible prefixes? So, if x is a prefix then x can be equal to "a", "ab", "abr" or even to "abracadabra" but in this case, when x=y, it is now called a not proper prefix as far as I understand. However, I am not really sure about the last part where x=y can it still be considered to be a prefix?
A language is prefix-free if no member is a proper-prefix of another member.
Again, not sure whether I understand it correctly. If, for example, there is a language = "Hello, World! My name is Andrew" , I think, it is prefix-free since the beginnings of each member are different from each other. However, in case if we have "Hello, World! How are you?" this language is not prefix-free anymore because "H" is a prefix of both "Hello" and "How". Is my way of thinking correct or have I misunderstood something?
No examples given in the book I am reading and it seems to be an easy topic so I guess that might be the reason why I can't find more detailed explanations. But I just, anyway, want to make sure I do not misunderstand anything.
I would be grateful for all the answers. Thank you.