#19446: Hook statistics in binary Trees
-------------------------------------+-------------------------------------
       Reporter:  boussica           |        Owner:  boussica
           Type:  enhancement        |       Status:  new
       Priority:  minor              |    Milestone:  sage-7.0
      Component:  combinatorics      |   Resolution:
       Keywords:  binary trees,      |    Merged in:
  hook                               |    Reviewers:
        Authors:  Adrien             |  Work issues:
  Boussicault, Bérénice Delcroix-    |       Commit:
  Oger, Patxi Laborde-Zubieta        |  238b35298dae93ef5e2fb7365c65b9c9b25662a0
Report Upstream:  N/A                |     Stopgaps:
         Branch:                     |
  u/oger/hook_statistics_in_binary_trees|
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by mantepse):

 I did not get the definition of hook upon first reading.  Thus, here are
 some suggestions for the docstrings.  A reference where one can find a
 definition would be good, too.

 I'd like to submit this statistic to http://FindStat.org - would this be
 OK?


 {{{
     Return the comb of a tree.

     There are two combs in a binary tree: a left comb and a right comb.
     Consider the vertices of the leftmost (resp. rightmost) branch of
     the root, excluding the root itself.  The left (resp. right) comb
     is the list of right (resp. left) subtree of each of these vertices.

     INPUT:

     - ``side`` -- (default: 'left') set to 'left' to obtain the left
       comb, and to 'right' to obtain the right comb.

     OUTPUT:

     A list of binary trees.
 }}}

 {{{
     Return the number of hooks.

     The hook of a vertex v is the subtree that consists of {v}, the
     leftmost branch and the rightmost branch of v.

     The set of hooks partitions the binary tree.  The number of hooks
     in such a partition is the hook number of the tree.

     We can obtain this partition recursively by extracting the root's
     hook and repeating the process on each tree of the remaining
     forest.
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/19446#comment:13>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to