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
Making the bliss canonical form available for edge labelled graphs #24924
Comments
This comment has been minimized.
This comment has been minimized.
comment:4
I have provided a first almost trivial version, I will send some timings later -- comparing the hash I posted on sage-support with its new counterpart using this new bliss canonical form (yielding the very same hash without ever constructing a sage
New commits:
|
Commit: |
comment:5
So far it looks good. But if I understand correctly, your actual aim is to get a canonical from associated with a matrix. Hence, you shouldn't need canonical_form_from_edge_list. I guess you want to create the bliss graph directly from the matrix (also using |
comment:6
I have also the following:
But since it is not far from that, I now plan to implement what Dima pointed out from Sect 14 in http://pallini.di.uniroma1.it/Guide.html. My impression is that, given that I need to know the number of vertices of the graph a priori, I need to first read the complete matrix before I can start creating the |
comment:7
Replying to @stumpc5:
Hm. That would be unfortunate. In that case, I suppose it will be impossible to avoid the creation of an intermediate edge list --- but you could create it by means of two |
comment:8
Independent of the matrix version, I think it would be overall nice to have
|
comment:9
what I could actually do is to overestimate the number of vertices in the first place (given the matrix is size nxm, there are at most nm/2 edges, so even if all had the different labellings, I could go with log(mn/2)+max(n,m) many vertices, which is for m,n <= 20 still very small) and then possibly have chosen a few ununsed vertices floating around... |
comment:10
Could I ask you to provide a pxd file for the headers so that I can cimport the bliss Digraph? I don't know how to do that correctly (I guess the pxd file looks like |
comment:11
I first have to do some cython timings (which I haven't done before) to see where the bottleneck is -- maybe the list construction is not actually that time consuming, I don't know |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:14
I pushed a first hopefully working version of the edge labelled bliss graph as described in Dima's reference. Example:
Once that is settled, I would also need help in improving (speeding) the code as much as easily possible, I already use three lists New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:59
I hope everything is there now and the bot doesn't seem to show any bliss related doctest failures... |
Reviewer: Dima Pasechnik |
comment:60
looks good to me, thanks! |
comment:61
Merge conflict |
Dependencies: #20382 |
comment:62
needs to be rebased over #20382 (commit 8e4c504), as it got into the 1st alpha |
comment:64
it looks like a trivial rebase, so... |
comment:65
Thanks for getting back to it, the recheck somehow got lost on my todo list... |
Changed branch from public/graphs/making_the_bliss_canonical_form_available_for_edge_labelled_graphs to |
This is a discussion ticket for improving the bliss canonical form input, based on https://groups.google.com/d/topic/sage-support/oZ7Uu5jTR9k/discussion.
Christian's aim: make the canonical form of a graph given by an integer matrix much faster.
This basic idea is to provide an alternative version of
sage.graphs.bliss.canonical_form
using a list of labelled edges as input rather than a graph. Maybewhere we assume that (i,j,color) in edges has the property
0 <= i,j < Vnr
and colors0 <= color < k
where the color0
means "uncolored" and is assumed to be the most common color.Since this is an internal speed-critial functionality, Christian believes that it would then be the user's responsibility to turn any input format of graph, if needed, into this format.
As Dima pointed out, we can turn this edge labelled graph into an unlabelled graph with O(Vnr log k) vertices as described in Sect 14 in http://pallini.di.uniroma1.it/Guide.html.
For now, this is only for discussion design and code snippets.
Depends on #20382
CC: @simon-king-jena @dimpase @dimpase @Etn40ff
Component: graph theory
Keywords: bliss, graph automorphism, canonical form
Author: Christian Stump
Branch/Commit:
0830efc
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/24924
The text was updated successfully, but these errors were encountered: