Let's use the Lempel-Ziv-Welch algorithm to encode the character sequence:
IF A WOODCHUCK COULD CHUCK WOOD
We will build a dictionary starting from the assumption that we are using only capital letter characters in the data, so the first 26 dictionary entries will be for A, 2 for B, etc., up to 26 for I. I've started the table below. Fill out the rest of the table to the end of the character sequence using the process shown in the lecture.
Currently recognized sequence
Dictionary Entry being Encoded Location Dictionary processed output (code word) Entry