Question 2 - Lempel-Ziv - when the string ends =============================================== What to do if the file ends with an "already seen" string? Example: aabab This would be broken into pieces as: a|ab|ab| and represented as: 0a|1b|?? (what should ?? be?) Now, there is no doubt about index 1 and 2, but what about index 3? 0 /a 1 |b 2 Where should "ab" be hanging from, how to represent it? There are two possible ways, and both are acceptable in this assignment: 0a|1b|1b or 0a|1b|2_ (where "_" represents the null character) If you choose the second way, the corresponding tree is obvious. If you choose the first way, it's not so obvious how to draw the tree, but we will be flexible in what we will accept when marking. Lucia Moura