#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, | Merged in:
full | Reviewers:
Authors: Adrien | Work issues:
Boussicault, Bérénice Delcroix- | Commit:
Oger, Patxi Laborde-Zubieta | dcd497e3d2f4a0956f9e04cc169ba4d62f5438bb
Report Upstream: N/A | Stopgaps:
Branch: |
u/patxiku/generator_for_full_binary_trees|
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by tscrim):
* commit: => dcd497e3d2f4a0956f9e04cc169ba4d62f5438bb
Comment:
The definition in `BinaryTree` is not correct as it does not allow for the
"nodes" with one element. IMO, a leaf is a node too.
From a quick lookover, the reason why binary trees don't compare to full
binary trees is that they have different parents. There is an abuse that
`BinaryTrees_size` does not know it is a facade parent for
`BinaryTrees_all`, but it is why the equality works. To make the equality
work by continuing this abuse, you should make `FullBinaryTrees_all` act
as a facade for `BinaryTrees_all`.
Let me know when you're ready for me to do a formal review.
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=24f6f7b4081cc2f474e57f586b35e4b83977a094
24f6f7b]||{{{Generator implementation of full binary trees.}}}||
||[http://git.sagemath.org/sage.git/commit/?id=dcd497e3d2f4a0956f9e04cc169ba4d62f5438bb
dcd497e]||{{{Documentation : remove_nodes_with_two_child_leaves}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/19457#comment:7>
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.