Talk:Self-synchronizing code
Synchronizing word examples
The examples under this section were removed [1] with edit summary rm poorly formulated examples ({"ab","ba"} is not a prefix code unless "a" and "b" are not characters but something else). This comment seems wrong because (i) the examples were sourced to page 138 of Berstel, Perrin & Reutenauer (2010) which seems an unimpeachably reliable source (ii) the comment is simply wrong: a prefix code is one for which "there is no valid code word in the system that is a prefix (start) of any other valid code word" and this is clearly true for {"ab","ba"} and for {b∗a}. I have restored the examples in question. Deltahedron (talk) 17:08, 11 April 2013 (UTC)
Overall confusion
I am afraid that this article conflates two different sets of requirements. The first set, specified in the introduction, defines strict self-synchronisation, meaning that you can always detect when a part of transmitted data has been lost, and continue decoding without losing more words than those that were actually lost. The second set, taken from the book, defines statistically converging self-synchronisation, in that a transmission error causes several following parts to be corrupt but the decoder is expected to get back on track relatively quickly in most cases. The introduction says that both notions are equivalent.
In particular, the example {ab, ba} meets the second set but not the first one. Also note that a complete Huffman code, which is expected to meet the second set with almost surely, can never meet the first set.