On Friday, 6 January 2012 22:57:24 UTC+8, David Joyner wrote:
>
> On Fri, Jan 6, 2012 at 9:43 AM, Jason Grout
> wrote:
> > Hi all,
> >
> > Is there an easy way to ask if two graphs are isomorphic, respecting some
> > coloring or labeling of the vertices? I see the is_isomorphic function
> let
Jason,
I've been working with nonisomorphic colorings recently. I use the following:
def canonical_coloring_label(G,c):
"""
Given a coloring dictionary,
{color1 : [u1, u2, ...], color2 : [v1, v2, ... ], ... }
return a string which uniquely identifies the isomorph
And if you accept to sligthly change the graph, you can add a universal
vertex v to it. If u is of color red, color edge uv with red, and the same
for all vertices. Do this in both graph and all will be fine :-)
Nathann
--
To post to this group, send an email to sage-devel@googlegroups.com
To
On Fri, Jan 6, 2012 at 9:43 AM, Jason Grout wrote:
> Hi all,
>
> Is there an easy way to ask if two graphs are isomorphic, respecting some
> coloring or labeling of the vertices? I see the is_isomorphic function lets
I don't know if this is easy or not but here is an idea:
First, suppose you ha
Hi all,
Is there an easy way to ask if two graphs are isomorphic, respecting
some coloring or labeling of the vertices? I see the is_isomorphic
function lets you respect edge labels, so I guess I could attach a new
vertex to, say, all "blue" vertices, and label each of the edges to this
new