Skip to content

RightBranchBinaryTree ​

An ordered tree as a binary tree with one fewer node: a vertex's right brother becomes its right child, its first child its left child, and the root goes.

RightBranchBinaryTree(OrderedTree)An ordered tree as a binary tree with one fewer node: a vertex's right brother becomes its right child, its first child its left child, and the root goes.
Typed signatures
TypePackageApplies
(ordered_tree) -> binary_treecombinatoricsalways

Domain: Combinatorial maps

Details
  • Takes a OrderedTree and returns a BinaryTree — a typed map, so a wrong carrier is a type error rather than a wrong answer.
  • FindStat's Mp00050, Sage's to_binary_tree_right_branch, the inverse of RightBranchOrderedTree. BinaryTree(OrderedTree) is the left-branch bijection, which is the constructor.

Examples

Basic #

an ordered tree with four edges

live ↗
InRightBranchBinaryTree(OrderedTree⁡([[[],[]],[]]))\mathrm{RightBranchBinaryTree}({\operatorname{OrderedTree}}(\bigl\lbrack\bigl\lbrack\bigl\lbrack\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack, \bigl\lbrack\bigr\rbrack\bigr\rbrack))OutBinaryTree⁡([[0,[0,0]],[0,0]]){\operatorname{BinaryTree}}(\bigl\lbrack\bigl\lbrack0, \bigl\lbrack0, 0\bigr\rbrack\bigr\rbrack, \bigl\lbrack0, 0\bigr\rbrack\bigr\rbrack)
About
Examples1
CrosswalkFindStat