-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Implement longest_increasing_subsequence_number #34218
Comments
Commit: |
comment:2
I tried implementing it, but I'm not convinced by the result. The method with the adjacency matrix of the digraph seems to be slower. Mainly, I think that a lot of the problem comes from taking the exponential of the adjacency matrix of the digraph (an (n+2)-by-(n+2) matrix raised to a power that is in θ(√n) in average), and this seems to slow the process down much more than listing the longest increasing subsequences. After coding it, I got the following times:
Even though I'm uploading my code to the trac, I think we might want to give up on the project. Or, if you know of a way to make it efficient, I would love to see it. Last 10 new commits:
|
comment:3
Indeed, matrix powering is not clever enough. Though one can avoid the creation of the digraph which is time consuming. New commits:
|
Changed branch from u/nadialafreniere/implement_longest_increasing_subsequence_number to public/34218 |
Author: Nadia Lafrenière, Vincent Delecroix |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:5
At commit
|
comment:6
And same test as your comment:2 gives on my machine
|
This comment has been minimized.
This comment has been minimized.
comment:9
I was about to explain how to count the number of paths on a DAG when all arcs go from level You could add a little explanation of the algorithm, at least for Nadia. For the documentation, you could use Otherwise, LGTM. |
comment:10
For Nadia: roughly, in the DAG, the number of paths to reach vertex The method of Vincent do the same computation but avoids to build the DAG. |
comment:12
LGTM. |
Reviewer: David Coudert |
comment:13
Replying to @dcoudert:
Nice job! This looks very good! |
Changed branch from public/34218 to |
Following the method of #31451, we implement a method that returns the number of maximal increasing subsequences of a permutation. This method is much faster than listing them all
Depends on #31451
Depends on #34214
CC: @nadialafreniere @dcoudert
Component: combinatorics
Author: Nadia Lafrenière, Vincent Delecroix
Branch/Commit:
11e2592
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/34218
The text was updated successfully, but these errors were encountered: