You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code at the bottom constructs a trie and graphs the resulting trie. As also verified by inspection in the debugger, the resulting trie does not seem to satisfy the requirement that descendants of a node share a common prefix.
Consider 162.247.74.0 and descendants. That node is RLL from the root: go right, then left, then left. Its L descendant is 171.25.193.0. That's a bigger value, but it's on the left. It and the parent differ in bit 4, even though the parent's decision bit is 22.
The R child of 171.25.193.0 is 158.69.217.248, a lower value even though it is to the right. 158.69 differs from parent at bit 2, even though the parent decision bit is 23.
I assume the left and right branching is being dictated by the decision bit, though I haven't verified it. The problem is that the most significant difference is not at the decision bit.
The inorder traversal is correspondingly unsorted:
The code at the bottom constructs a trie and graphs the resulting trie. As also verified by inspection in the debugger, the resulting trie does not seem to satisfy the requirement that descendants of a node share a common prefix.
Consider 162.247.74.0 and descendants. That node is RLL from the root: go right, then left, then left. Its L descendant is 171.25.193.0. That's a bigger value, but it's on the left. It and the parent differ in bit 4, even though the parent's decision bit is 22.
The R child of 171.25.193.0 is 158.69.217.248, a lower value even though it is to the right. 158.69 differs from parent at bit 2, even though the parent decision bit is 23.
I assume the left and right branching is being dictated by the decision bit, though I haven't verified it. The problem is that the most significant difference is not at the decision bit.
The inorder traversal is correspondingly unsorted:
pt-test.gv.pdf
The text was updated successfully, but these errors were encountered: