Mirror
The left-right symmetry of a binary tree: every node's two subtrees swapped.
Mirror(BinaryTree)The left-right symmetry of a binary tree: every node's two subtrees swapped.Typed signatures
| Type | Package | Applies |
|---|---|---|
((binary_tree) -> binary_tree) & ((ordered_tree) -> ordered_tree) | combinatorics | always |
Details
- Takes a
BinaryTreeand returns aBinaryTree— a typed map, so a wrong carrier is a type error rather than a wrong answer. - FindStat's Mp00016, an involution. Conjugated by the Dyck-path bijection it is DecompositionReverse.
- Also takes a
OrderedTree, returning aOrderedTree: The left-right symmetry of an ordered tree: every node's children in the opposite order. - FindStat's Mp00048, an involution.
Examples
About
| Examples | 2 |
|---|---|
| Crosswalk | FindStat ×2 |