dag

How to judge the strength of a directed acyclic graph?

Curious what is recognized as a solid algorithm/approach for judging the strength of a directed acyclic graph - particularly the strength of certain nodes. The main question I have about this can be boiled down to the following two graphs: (if graph doesn't show up, click here or visit this link: http://www.flickr.com/photos/86396568@...

How do I check if a directed graph is acyclic?

How do I check if a directed graph is acyclic? And how is the algorithm called? I would appreciate a reference. Niko ...

Seeking algorithm to invert (reverse? mirror? turn inside-out) a DAG

I'm looking for an algorithm to "invert" (reverse? turn inside-out?) a DAG: A* # I can't ascii-art the arrows, so just / \ # pretend the slashes are all pointing B C # "down" (south-east or south-west) / / \ # e.g. G E D # A -> (B -> G, C -> (E -> F, D -> F)) \ / F ...

Longest path between from a source to certain nodes in a DAG

Hi Experts, How do i find the longest path from single source to all final destinations i.e. For source i1, Give longest path between i1 -> o1 and i1 -> o2. The legends described in the above graph are as follows: (i1, i2) are start nodes (o1, o2) are end nodes (1-8) are sub graphs The edges may have +ive/-ive weights The lon...

How to convert Directed Acyclic Graph (DAG) to Tree

Hi there, I have been looking for C# examples to transform a DAG into a Tree. Does anyone have an examples or pointers in the right direction? Clarification Update I have a graph that contains a list of modules that my application is required to load. Each module has a list of modules it depends on. For example here are my modules, ...

How can one implement a Compact Directed Acyclic Word Graph (CDAWG) in C?

How would one implement this data structure in C. It is a structure similar to the DAWG, that is more efficient than the trie which only compresses prefixes. The CDAWG is a data structure twice as space efficient as the DAWG. ...

Incremental linearizing of git DAG

I'm the author of GitX. One of the features GitX has is the visualization of branches, as can be seen here. This visualization is currently done by reading commits which are emitted from git in the correct order. For each commit the parents are known, so it's fairly easy to build up the lanes in the correct way. I'd like to speed up th...

Is there an effient way of determining whether a leaf node is reachable from another arbitrary node in a Directed Acyclic Graph?

Wikipedia: Directed Acyclic Graph Not sure if leaf node is still proper terminology since it's not really a tree (each node can have multiple children and also multiple parents) and also I'm actually trying to find all the root nodes (which is really just a matter of semantics, if you reverse the direction of all the edges it'd they'd b...

What algorithm can I apply to this DAG?

I have a DAG representing a list of properties. These properties are such that if a>b, then a has a directed edge to b. It is transitive as well, so that if a>b and b>c, then a has a directed edge to c. However, the directed edge from a to c is superfluous because a has a directed edge to b and b has a directed edge to c. How can I prun...

Problems with a simple dependency algorithm

In my webapp, we have many fields that sum up other fields, and those fields sum up more fields. I know that this is a directed acyclic graph. When the page loads, I calculate values for all of the fields. What I'm really trying to do is to convert my DAG into a one-dimensional list which would contain an efficient order to calculate th...

Add a edge to direct acyclic graph with other restrictions

I have a DAG. I have this operation to add a edge between two nodes. If A is reachable from B, then B is A's parent. If A is reachable from B without going though another node, then B is A's direct parent. Requirements for this graph are: No cycles. For any node, there is a list of direct parents P[1],P[2],P[3]... P[i] is not a paren...

Shortest Path For A Dag

I have a graph with an s and t vertex that I need to find the shortest path between. The graph has a lot of special properties that I would like to capitalize on: *The graph is a DAG (directed acyclic graph). *I can create a topological sort in O(V) time, faster than the traditional O(V + E). *Within the topological sort, s is the first ...

Algorithms to create a tabular representation of a DAG?

Given a DAG, in which each node belongs to a category, how can this graph be transformed into a table with a column for each category? The transformation doesn't have to be reversible, but should preserve useful information about the structure of the graph; and should be a 'natural' transformation, in the sense that a person looking at t...

DAG based application

Hi the other day I could not exprese myself correctly and get closed my answer, so here's my second shot: I need to create a basic DAG (Directed Acyclic Graph) application, put on common words, a node based application. I don't need a GUI for nw, just a console example, that excecute the whole tree. here's what I have so far : type...

Can someone explain in simple terms to me what a Directed acyclic graph is?

Can someone explain in simple terms to me what a Directed acyclic graph is? I have looked on Wikipedia but it doesn't really make me see its use in programming. ...

Easy way to determine whether a given graph is subgraph of some other graph?

Hello, I'm looking for an algorithm to check whether a given graph is subgraph of another given graph. I have few conditions to make this NP complete problem bit more feasible.. The graphs have approx <20 vertices. The graphs are DAG. All vertices are non-uniquely labeled, and the corresponding vertices in the main graph and the subg...

Search a DAG with boolean constraints on reachability

The queries are something like Return all vertices such that (reachable from (A and (B or C))) and (not reachable from (D and E)). The query can be formed with any kind of boolean constraints on reachability. Are there efficient methods to do this query fast? Other than actually find the set of all item reachable vertex of concern, t...

How is this algorithm, for finding maximum path on a Directed Acyclical Graph, called?

Since some time, I'm using an algorithm that runs in complexity O(V + E) for finding maximum path on a Directed Acyclical Graph from point A to point B, that consists on doing a flood fill to find what nodes are accessible from note A, and how many "parents" (edges that come from other nodes) each node has. Then, I do a BFS but only "act...

Graphing the DAG generated by make?

My understanding is that when make executes, it generates a DAG internally to represent all the dependencies in the project. Is there a way to get at that DAG and graph it, say using something like graphviz? I'm using gnu make on Ubuntu 8.04. EDIT I just ran across these tools called mamdag and mamdot. They're supposed to work wit...

Finding Shortest path in DAG (unweighed), between 2 vertices

Before the Floyd–Warshall/Dijkstra replies flood comes in please let me explain the situation as i'm sure either algorithm can be tuned for this case, and it has to be as this is not a toy example program (mind you, in java so have to keep it manageable memory-wise) What i have is a web graph generated from node 0 to node n, node 3 cann...