Is there a convention for generating a Huffman encoding for a certain alphabet? It seems like the resultant encoding depends both on whether you assign '0' to the left child or the right child as well as how you determine which symbol will go to the left tree.
Wikipedia says that:
As a common convention, bit '0' represents following the left child and bit '1' represents following the right child.
So that is an answer to the first half of the variance. However, I couldn't find any convention for the second half. I would assume something like making the node with lower probability go on the left, but several example Huffman trees online don't do this.
For example:
So is there a convention for the assignment of nodes to left and right, or is it up to the implementation?
I apologize if this is a duplicate, but I wasn't able to find an answer.