dag

list of all paths from source to sink in directed acyclic graph

Can anyone point me to some resources on how to do this? I'm using networkx as my python library. Thanks! ...

Sampling random nodes from a DAG

I have a large directed, acylic graph (DAG) from which I would like to efficiently draw a sample node according to the following criteria: I specify a fixed node A that must never be sampled Nodes that directly or indirectly refer to A are never sampled All other nodes are sampled with equal probability Nodes are stored as objects wi...

Visualizing a DAG

I have a large directed acyclic graph that I would like to visualize in a bitmap image. Ideally I'd like to have all the root nodes at the top of the image, and all of the leaf nodes at the bottom, i.e. the graph edges are all pointing in a downwards direction. Is there a good algorithm for working out the coordinates of all the nodes ...

Finding two distinct path in a DAG with Maximum sum of vertices

I want to find the two distinct path with no shared vertices in a Directed Acyclic Graph so that sum of vertices in the two path becomes maximum. I have an O(n^3) answer for it which is pretty obvious, I need a better way. Thanks in advance ...

digraph partitioning to subgraphs

Hello Given a DAG with |V| = n and has s sources we have to present subgraphs such that each subgraph has approximately k1=√|s| sources and approximately k2=√|n| nodes. If we define the height of the DAG to be the maximum path length from some source to some sink. We require that all subgraphs generated will have approximately the sa...

joinedload / eager loading whole (sub)-graphs in sqlalchemy

Let's say I have a Task object which can be dependent on other Tasks. Is there a way to sensibly eager/joinedload all of a given set of task's subtasks? class Task(DeclarativeBase): __tablename__ = 'task' task_id = Column(Integer, primary_key=True) name = Column(String, unique=True) def add_dependencies(self, *tasks): ...

Representing a DAG (directed acyclic graph)

I need to store dependencies in a DAG. (We're mapping a new school curriculum at a very fine grained level) We're using rails 3 Considerations Wider than it is deep Very large I estimate 5-10 links per node. As the system grows this will increase. Many reads, few writes most common are lookups: dependencies of first and secon...

Algorithm to transform a workflow DAG into parallel resource allocation?

Say I have a graph where nodes are workloads of various kinds and edges are dependencies between the workloads. (This is a DAG since cyclical dependencies must not exist.) I also have a set of multiple agents who can perform the work. Some workload varieties may be given to any agent, others must be given to a specific agent, and other...