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

Added canon_label for finding canonical labelings #16

Merged
merged 5 commits into from
Jul 14, 2021

Conversation

sammorley-short
Copy link
Contributor

@pdobsan: There's probably some extra stuff I should add here, but I was having trouble getting the testsuite to run as expected. While I debug that, here's the (WIP) PR.

@sammorley-short
Copy link
Contributor Author

sammorley-short commented Jun 19, 2021

@pdobsan: Local install now working, so can run tests now. Current version is passing, although test suite for isomorphic looks like it's just testing isomorphism between copied graphs, rather than two isomorphic graphs with different vertex labels.

The easiest way to properly test isomorphic and canon_label would be to implement the Graph.relabel method that would take a relabelling list and apply it to the graph in-place. Is this something that you would interested in adding? Once that is applied then testing for isomorphism is as simple as supplying a series of random relabelings and checking for isomorphism. Similarly, for canon_label, if you take two identical graphs, relabel one, find both graphs' canonical relabelings, and then apply those relabelings, both should yield the same graph.

Let me know if this would be something you're interested in. Thanks!

@sammorley-short
Copy link
Contributor Author

Also, I don't seem to have the access to link them, but this PR would close #15.

@pdobsan pdobsan merged commit e2ac7dd into pdobsan:main Jul 14, 2021
@pdobsan
Copy link
Owner

pdobsan commented Jul 14, 2021

@sammorley-short: Thanks for this, I have just merged it into main and loading the new version up to PyPi.

The easiest way to properly test isomorphic and canon_label would be to implement the Graph.relabel method that would take a relabelling list and apply it to the graph in-place.
...
Let me know if this would be something you're interested in

Yes you are right, that would be a nice improvement.

@pdobsan
Copy link
Owner

pdobsan commented Jul 17, 2021

Opened issue #17 on relabeling, created a branch relabeling and pushed an initial implementation of the relabel(g,xs) procedure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants