directed-graph

Storing a directed graph in google appengine datastore

I need to store a large and dynamic undirected graph in google appengine, what's the best way to do this? The graph representation must be able to support rapidly pulling out a set of vertices (for rendering on a page) and all the links from a specific vertex, and pathfinding across the graph (although the optimal path isn't really neede...

Checking if removing an edge in a graph will result in the graph splitting

I have a graph structure where I am removing edges one by one until some conditions are met. My brain has totally stopped and i can't find an efficient way to detect if removing an edge will result in my graph splitting in two or more graphs. The bruteforce solution would be to do an bfs until one can reach all the nodes from a random n...

Enumerating All Minimal Directed Cycles Of A Directed Graph

Hello! I have a directed graph and my problem is to enumerate all the minimal (cycles that cannot be constructed as the union of other cycles) directed cycles of this graph. This is different from what the Tarjan algorithm outputs. For instance, for the directed graph at this wikipedia page, I would like to get c <-> d and d <-> h as tw...

need a graph algorithm similar to DFS

Hi, I'm curious if there is a specific graph algorithm that traverses an unweighted acyclic directed graph by choosing a start node and then proceeding via DFS. If a node is encountered that has unsearched predecessors then it should back track the incoming paths until all paths to start have been explored. I found a wikipedia category...

What is the most efficient way to determine if a directed graph is singly connected?

I am working on an assignment where one of the problems asks to derive an algorithm to check if a directed graph G=(V,E) is singly connected (there is at most one simple path from u to v for all distinct vertices u,v of V. Of course you can brute force check it, which is what I'm doing right now, but I want to know if there's a more eff...

directed unweighted graphs C

Hi, I'm planning to write a program in C that builds the adjacency list, performs the depth first search, performs the breadth first search, and performs the topological sort. Where can I get some info about this subject in C? Any help is appreciated ...

c# - what is best persistence approach/tool/library for a Directed Graph

Hi, What is best persistence approach/tool/library for a Directed Graph in C#. That is assuming I have a class model for a directed graph (e.g. Nodes & Relationships, or Vertex's and Edge's if you like), what would you recommend regarding persisting to a SQL Database? (or if you wish a 2nd question would be where I don't specify a SQL...

Force-directed layout implementation in Java

Hello all, I've been looking around for a Java implementation of the force-directed graph layout algorithm but got no fruits so far. Any help will be appreciated :) ...

Data structure and algorithms for a directed cyclic graph (F#)

I'm trying to analyse an application where the assembly references should be a directed-acyclic-graph, but aren't. There is also a related problem of sub-assemblies referencing different versions of one sub-sub-assembly (think Escher...) What I want to do is analyse each assembly-subassembly pair and build up a picture of where things a...

Will DFS from every node give all cycles in a directed graph

Hi, I want to find all the cycles in a directed graph. Starting Depth-first search from one node will find some cycles(finding back-edges). So, i applied dfs to all the nodes in the graph(i.e. each time the root is a different node). I am able to get all the cycles using this(by eliminating duplicate ones). But, i am not sure whether thi...

Traversal of cyclic directed graph

I have a cyclic directed graph. Starting at the leaves, I wish to propagate data attached to each node downstream to all nodes that are reachable from that node. In particular, I need to keep pushing data around any cycles that are reached until the cycles stabilise. I'm completely sure that this is a stock graph traversal problem. Howe...

Find the longest path in a directed cyclic graph from a source s to a destination f. Assume no positive weight cycles exists

Hi, i have to Find the longest path in a directed cyclic graph from a source s to a destination f. Assume no positive weight cycles exists even though no positive weight cycles exist, cycles of 0 or negative weights do exist. Can someone suggest an algorithm for finding the longest path in this case. please cite source if possible. tha...

Tools for XML based Directed Graphs?

Visual Studio 2010 has this feature called Directed Graph Documents (files with a dgml extension). It can be used to show relationships between objects similar to UML. I was able to play with it during the VS2010 beta. The version I now have (VS2010 pro) doesn't have this functionality and I don't have access to the Ultimate or Architect...