Re: How to design a linear algorithm to determine whether two uncyclic graphs are ismophic

From: Richard Harter (cri_at_tiac.net)
Date: 01/21/05


Date: Fri, 21 Jan 2005 22:46:22 GMT

On 21 Jan 2005 08:42:29 -0800, Joe.ntang@gmail.com (Joe) wrote:

>Hi,
>
>Who can give me some advice on how to efficiently design an algorithm
>to judge whether two unicyclic graphs are ismophic.

If you are talking about graphs with undirected edges then a unicyclic
graph has to have a cycle with trees rooted in the cycle. So, prune
the leaves in each graph to get the cycle. This is O(n). Check that
the cycle lengths match. This is O(n). The tricky part is to
determine whether the trees are isomorphic. My impression is that the
obvious is O(n) but I haven't proved it to myself. An efficient
procedure is to create a signature for each tree such that two trees
are isomorphic if they have the same signature. The method for doing
this is left as an exercise for the student.

Richard Harter, cri@tiac.net
http://home.tiac.net/~cri, http://www.varinoma.com
All my life I wanted to be someone;
I guess I should have been more specific.



Relevant Pages

  • Re: How to design a linear algorithm to determine whether two uncyclic graphs are ismophic
    ... >to judge whether two unicyclic graphs are ismophic. ... If you are talking about graphs with undirected edges then a unicyclic ... graph has to have a cycle with trees rooted in the cycle. ...
    (comp.theory)
  • Re: Unified Ada Library
    ... Mneson implements graphs (and therefore trees) with standard containers, ... Files are used simply for long term persistence. ... Formerly on thread "No call for Ada". ...
    (comp.lang.ada)
  • Re: A letter want to disprove my paper which submitted recently
    ... Determining Existence a Hamiltonian Cycle is O". ... one's mileage may differ for 0-node and 1-node graphs.) ... as it deals with digraphs with up to 2 incoming edges and up to 2 ... outgoing edges - not a total of at most 2 incoming + outgoing, ...
    (comp.theory)
  • A letter want to disprove my paper which submitted recently
    ... Determining Existence a Hamiltonian Cycle is O". ... outdegree 2 you're dead, and otherwise if all have in and out degree ... one's mileage may differ for 0-node and 1-node graphs.) ... i see another paper that describes plesnik... ...
    (comp.theory)
  • Re: implementing hierarchy
    ... book has probably killed the market, ... Do you think anyone would buy a GRAPHS IN SQL and not think that I ... Graphs and Trees and breadth-first tree processing. ...
    (microsoft.public.sqlserver.programming)