Help with adaptive Huffman theory question
The question from my homework is this:
In the adaptive Huffman algorithm, first the codeword for an encountered symbol is issued and then the conversion table is updated. Could the table be updated first and then the new codeword for this symbol be issued? Why or why not?
My thought process goes like this:
Well, it seems to me that it can be done, but what would it save? The reason it could be done is because the table is simply a grouping of characters. As long as the rules are maintained how the table is updated will effect the code word.
What I think they are suggesting is if the table looks like this:
and the first letter in the message is a b, then to update the f would be moved to the front, first.
Then the codeword would be 001, and the tree would be made.
My question is verification that my logic is correct or am I way off base here?