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
permanental_minor_vector, matching polynomial #16603
Comments
Author: Mario Pernici |
Branch: u/pernici/ticket/16603 |
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
Attachment: grid.py.gz |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Changed branch from u/pernici/ticket/16603 to public/ticket/16603 |
Changed branch from public/ticket/16603 to u/pernici/ticket/16603 |
comment:10
I made a commit in which I documented the auxiliary function, but by mistake I committed it New commits:
|
comment:11
Do you want this to be reviewed ? If yes, please turn it into "needs review". |
comment:12
Replying to @fchapoton:
How do I turn it into "needs review" ? |
comment:13
Click on "Modify ticket", then on the button "needs review". I did it for you. |
comment:14
Hello, This code is very cool! You can have a look at my branch
Vincent |
comment:15
Hello, |
comment:16
Replying to @sagetrac-pernici:
How do you do with your branch
The first command download my two commits. The special temporary branch You can then merge these commits (if you like them) in your branch with
Is that clear enough? Vincent |
Changed branch from u/pernici/ticket/16603 to u/vdelecroix/16603 |
Reviewer: Vincent Delecroix |
comment:29
Hello, I really think that the documentation is half of a software: it provides specification of functions and help the user to orient himself/herself. Next time you implement a function in Sage pay attention that your new functionality is referenced from other part of the code and that it also make references to relevant functions. There is a lot of possibilities for organization of the documentation (see the section "Docstring" of the developer guide). I was not happy with the current behavior and documentation of Next step would be optimisation of Ryser algorithm: #17457. Vincent New commits:
|
Changed branch from u/vdelecroix/16603 to u/pernici/ticket/16603 |
comment:31
Hello, A simple optimization I did not include here is the one in case of matrices which can be put in block form Sooner or later I will open a ticket for a faster algorithm for the matching polynomial of graphs (non bipartite). New commits:
|
comment:32
Hello, First of all, there is already a lot of material on this ticket. It would be good to stop here and open tickets for new features (please put me on cc on them). I push a commit as I do not like the
Nevertheless, I kept the keyword
Vincent New commits:
|
Changed branch from u/pernici/ticket/16603 to u/vdelecroix/16603 |
Changed branch from u/vdelecroix/16603 to u/pernici/ticket/16603 |
comment:34
Hello, New commits:
|
comment:35
Hello, Let us stop there with positive review! If you want to go any further open a new ticket (and please put me in cc). Vincent |
comment:36
Doctest failure in src/sage/misc/sagedoc.py |
comment:37
Funny! Done... New commits:
|
Changed branch from u/pernici/ticket/16603 to u/vdelecroix/16603 |
Changed branch from u/vdelecroix/16603 to |
Added function
permanental_minor_polynomial
, which computes the polynomial of the sums of the permanental minors in an efficient way, see arXiv:1406.5337.As a benchmark, consider dancing.sage. On my computer
dance(10)
took 3 hours using sage-6.2; it takes 0.08 seconds with this patch, using theButera-Pernici algorithm, 13 seconds using the Godsil algorithm.
In the case of banded matrices, the speedup is greater, since for fixed bandwidth the new algorithm is polynomial; here is a permanent which cannot be computed with sage-6.2
This can be used to compute the matching polynomial of bipartite graphs much faster than matching_polynomial for certain graphs. For example, using the attached file to compute the reduced adjacency matrix of a 2d grid (n1, n2):
For n1,n2=10,10 permanental_minor_vector(m) takes 0.3s
For n1,n2=50,6 it takes 0.5s
CC: @nathanncohen @jaapspies
Component: linear algebra
Author: Mario Pernici
Branch/Commit:
901d36c
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/16603
The text was updated successfully, but these errors were encountered: