On enumerating tree permutations in natural order

From MaRDI portal





An efficient algorithm for enumerating all tree permutations of n integers in the natural order is presented. The enumeration problem is solved by considering that a tree permutation hLR is simply a linearized representation of the corresponding binary tree, such that h is the node value and L and R are its left and right subtrees, respectively. The best-case, average-case and worst-case time-complexities of the enumeration algorithm are O(1), O(3) and O(n), respectively, whereas its space-complexity is O(n). Furthermore, it is shown that the conversion from a tree permutation to the conventional representation of a binary tree using records (nodes) and pointers can be accomplished in O(n) units of time.











This page was built for publication: On enumerating tree permutations in natural order

Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q3804211)