#19457: Generator for full binary trees
-------------------------------------------------+-------------------------
Reporter: patxiku | Owner: patxiku
Type: enhancement | Status: new
Priority: minor | Milestone: sage-6.10
Component: combinatorics | Resolution:
Keywords: binary trees, full | Merged in:
Authors: Adrien Boussicault, Bérénice | Reviewers:
Delcroix-Oger, Patxi Laborde-Zubieta | Work issues:
Report Upstream: N/A | Commit:
Branch: | Stopgaps:
Dependencies: |
-------------------------------------------------+-------------------------
Comment (by patxiku):
Yes.
I use the terminology given by the definition used in the implementation
of binary trees : (see the documentation of the class BinaryTree from
sage.combinat.binary_tree)
Binary trees here mean ordered (a.k.a. plane) finite binary
trees, where "ordered" means that the children of each node are
ordered.
Binary trees contain nodes and leaves, where each node has two
children while each leaf has no children. The number of leaves
of a binary tree always equals the number of nodes plus `1`.
Replying to [comment:3 tscrim]:
> I would very much like this as I want to implement free magmatic
algebras generated by a set `X` (which are indexed by complete binary
trees and a word in the alphabet `X`). However the `to_full` will also add
a leaf to internal nodes which do not have 2 children, and the other
method will remove all leaves, correct?
--
Ticket URL: <http://trac.sagemath.org/ticket/19457#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.