Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combinatorial m-ary trees #13987

Open
VivianePons opened this issue Jan 22, 2013 · 68 comments
Open

Combinatorial m-ary trees #13987

VivianePons opened this issue Jan 22, 2013 · 68 comments

Comments

@VivianePons
Copy link

In the same manner as #8703 we want to implement trees with a fixed number of subtrees (equivalent of binary trees but with m subtrees). Especially to use them in the context of the m-Tamari lattices.

This ticket depends on #8703 as we use the implementation of OrderedTrees.

Related:

CC: @hivert @sagetrac-sage-combinat @tscrim @darijgr

Component: combinatorics

Keywords: trees

Author: Viviane Pons

Branch/Commit: public/new-13987 @ a2d92f4

Reviewer: Darij Grinberg

Issue created by migration from https://trac.sagemath.org/ticket/13987

@VivianePons
Copy link
Author

Dependencies: #8703

@VivianePons

This comment has been minimized.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@VivianePons
Copy link
Author

Commit: e772581

@VivianePons
Copy link
Author

New commits:

[changeset:e772581]#N: a patch to implement m-ary trees

@VivianePons
Copy link
Author

Branch: public/combinat/13987-mary-trees

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2014

Branch pushed to git repo; I updated commit sha1. New commits:

34daa2fMerge branch 'develop' into mary-trees

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2014

Changed commit from e772581 to 34daa2f

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 9, 2016

Changed commit from 34daa2f to 0334ad2

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 9, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

0334ad2Merge branch 'public/combinat/13987-mary-trees' into 7.3.b3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 8, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

21ea566Merge branch 'public/combinat/13987-mary-trees' in 7.3.b6
aac90aatrac 13987 refreshed branch

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 8, 2016

Changed commit from 0334ad2 to aac90aa

@fchapoton fchapoton modified the milestones: sage-6.4, sage-7.3 Jul 8, 2016
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 25, 2016

Changed commit from aac90aa to 847d49a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 25, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

4cf00a2Merge branch 'public/combinat/13987-mary-trees' in 7.5.b4
847d49atrac 13987 some details, no more xrange

@embray embray added this to the sage-9.1 milestone Dec 30, 2019
@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 14, 2020

comment:47

Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.1, sage-9.2 Apr 14, 2020
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 15, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

2818096Merge branch 'public/new-13987' in 9.2.b5
a2d92f4fixes for python3 and dropped SearchForest

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 15, 2020

Changed commit from eb12c03 to a2d92f4

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 16, 2020

comment:49

What's the status of the review on this ticket?

@darijgr
Copy link
Contributor

darijgr commented Aug 17, 2020

comment:50

I don't remember more than is said in the comments above, and I'm not going to have time for this in the foreseeable time... sorry, not very useful I know.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Sep 5, 2020
@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 15, 2021

comment:52

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Mar 15, 2021
@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 19, 2021

comment:53

Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@kevindilks
Copy link
Mannequin

kevindilks mannequin commented Jul 27, 2021

comment:54

I'd like to try and help get this finished, though I'm not sure I'm qualified to be final judge and jury on the OOP/MRO aspects. At the very least, I can implement Travis's suggestion of removing LabelledMAryTrees.__call__ , and try to reverse the order of inheritance for class MAryTrees_all(DisjointUnionEnumeratedSets, MAryTrees) and remove the ```call`` and make sure nothing breaks.

In terms of m=2, people seem fine with having conversion for now, and having inheritance be part of a later ticket to get this finished.

I can implement Travis's suggestion that the documentation being clearer about these being ordered/plane trees.

In terms of check only checking the outer layer, I'm pretty sure this should be fine, and it will recursively check the entire tree. But I can try and make a test case to be sure.

I'll make a thorough pass in the next day or two to test things out, check doc and examples for clarity to somebody that may not be as familiar with m-ary trees, and make sure the doc compiles properly. One thing that's more a note to self to fix later when I do this is that enumerated m-ary trees of a given size is still labeled as 'enumerated set of binary trees of a given size' in the code.

Also reminder to self to check (1) as part of comment:37.

@kevindilks
Copy link
Mannequin

kevindilks mannequin commented Jul 29, 2021

comment:55

In terms of class MAryTrees_all(DisjointUnionEnumeratedSets, MAryTrees)versus class MAryTrees_all(MAryTrees, DisjointUnionEnumeratedSets) , the way it is now matches what is done in binary trees.

I can't manage to track down exactly what's happening, but as the doc indicates, the __call__ methods are necessary to make sure that empty input is treated as None instead of getting passed as 0. Maybe something inherited from OrderedTrees and their assumption that there are no empty trees (and thus OrderedTrees()() == OrderedTrees()([])? Switching the MRO above did not resolve the issue.

This fix/hack is also implemented in BinaryTrees, though only for BinaryTrees_all. So BinaryTrees()() == BinaryTrees()(None) == ., but in BinaryTrees_size, BinaryTrees(0)() gives an error about the int 0 not being callable, whereas BinaryTrees(0)(None) == .

I would be of the opinion that if the way things done here is the way they've been forever in BinaryTrees, then they shouldn't be holding back this ticket from getting a positive review.

@slel

This comment has been minimized.

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 18, 2021

comment:57

Stalled in needs_review or needs_info; likely won't make it into Sage 9.5.

@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 2, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants