24 Apr 14:02 2013

## Operations on functional graphs

Francesco Mazzoli <f <at> mazzo.li>

2013-04-24 12:02:39 GMT

2013-04-24 12:02:39 GMT

Hi list, I’ve been lately thinking about how to implement an algorithm efficiently, and I need a directed graph that can perform the following tasks: 1. Finding the strongly connected components 2. Condensing strongly connected components 3. Contract single edges The condensing shouldn’t prevent successive operations to work with the condensed vertices (treating them all as the same), but should get rid of the edges. Point one is easy, for example as described in [1]. I’m wondering if a nice way to implement the other two with functional structures has been described. I’d guess it would be a mix of a graph and disjoint sets data structure... Thanks, Francesco [1]: Structuring Depth-First Search Algorithms in Haskell, by David King and John Launchbury. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe <at> haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe