-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Faster iterator for planar set partitions #34579
Comments
comment:1
versus old
So we already see a 10x speedup on The downsides are that it no longer iterates through the set partitions in order of the number of parts and it is limited by the Python recursion depth. A similar change could be done with the Temperley-Lieb diagrams by using the New commits:
|
This comment has been minimized.
This comment has been minimized.
Commit: |
comment:2
Looks good, but the definition of "planar set partition" is not clear to me. How is this different from noncrossing partitions ? |
comment:3
They are not different; just an alternative name. |
comment:4
Could it be interesting to use some cache for recursive calls on the same sets ? |
comment:5
If this is really the same as noncrossing partitions, it only depends on |
comment:6
That is a good idea to increase the speed, but it will significantly increase the memory usage. Right now, I think this only needs to keep roughly the current planar set partition in memory. Your proposal will need to keep all |
comment:7
Just some not-well-cooked ideas:
But a positive review in the current state in also possible, as it is an improvement, of course. |
comment:8
Replying to Frédéric Chapoton:
I am not sure what aspects you want to use. If it is enumerating planar graphs, this is done by
The
Some small tweaks would be made (separating out the core part of the algorithm into Cython to have it return tuples of tuples), which would likely make the speed disparity even greater. |
comment:9
ok, let's move forward. I am setting the branch here to positive |
Reviewer: Frédéric Chapoton |
comment:10
Thank you! |
Changed branch from public/combinat/faster_planar_partition_iter-34579 to |
Right now, we iterate through all planar set partitions in
algebras.PlanarPartition
by filtering out the non-planar diagrams. However, this is very inefficient for large values ofn
. We implement a recursive algorithm that works by simply taking the part{a, b, c, ...}
that contains the largest element and uses the fact that we can form the planar partition by combining the planar set partitions on the remaining sets{1, ..., a-1}
,{a+1, ..., b-1}
,...
, which are all independent.CC: @srdoty @fchapoton @zabrocki @anneschilling @saliola
Component: combinatorics
Keywords: set partition, diagram algebra
Author: Travis Scrimshaw
Branch/Commit:
22d8a70
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/34579
The text was updated successfully, but these errors were encountered: