I would like to encode a binary tree where every node has either 0 or 2 kids into a binary word.
I was thinking about marking every left edge with a "0" and every right edge with a "1" and then use every path from root to a leaf concatenated to encode the tree, but I'm not sure if this results in a unique code for every tree?
I thought about it for quite some time but I can not figure out... maybe you know?