Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How to compare two undirected graphs?

by locked_user sundialsvc4 (Abbot)
on Oct 18, 2010 at 14:16 UTC ( [id://865944]=note: print w/replies, xml ) Need Help??


in reply to How to compare two undirected graphs?

As others have said, you need to ponder what “shape” means to you.   Then, I suggest that you consider generating a simple list of (start_node, end_node) tuples.   Sort this list, thus placing the identical node-names conveniently next to one another, and count them.   Or, stuff the data into an SQLite database (file...) and let it do the dirty work for you.   (They are fast, they are “just files,” and yet you can query them.)

You might decide, for instance, that the “shape” of a node is defined by the number of nodes that connect to or from it.   You might calculate the “depth” of each node and then count the number of connections at the same depth.   Or, whatever you decide is right for you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://865944]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2026-04-18 19:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.