directed (242)

What is the most efficient graph data structure in Python?
Closed. This question is off-topic.It is not currently accepting answers. Want to improve this question? Update the question so it's…
Graph Algorithm To Find All Connections Between Two Arbitrary Vertices
I am trying to determine the best time efficient algorithm to accomplish the task described below. I have a set of records. For this set of records I have connection data which indicates how pairs of…
Tree(directed acyclic graph) implementation
I require a tree/directed acyclic graph implementation something like this: public class TreeNode<K, V>{private K key;// 'key' for this node, always present private V value;// 'value' f…
algorithm - Efficient way to recursively calculate dominator tree?
I'm using the Lengauer and Tarjan algorithm with path compression to calculate the dominator tree for a graph where there are millions of nodes. The algorithm is quite complex and I have to admit I h…
Best algorithm for detecting cycles in a directed graph
What is the most efficient algorithm for detecting all cycles within a directed graph? I have a directed graph representing a schedule of jobs that need to be executed, a job being a node and a depend…
Convert integers to roman numerals using a syntax-directed translation scheme?
The Dragon Book includes an exercise on converting integers to roman numerals using a syntax-directed translation scheme. How can this be completed?…
UDP broadcast packets across subnets
Is it possible to send a UDP broadcast packet to a different subnet through a router? I'm writing an app to discover certain devices on the network, and the PC might be on a different subnet than the…
Algorithm for Finding Redundant Edges in a Graph or Tree
Is there an established algorithm for finding redundant edges in a graph? For example, I'd like to find that a->d and a->e are redundant, and then get rid of them, like this:=> Edit: Strilanc was…
algorithm - Cycles in an Undirected Graph
Given an undirected graph G=(V, E) with n vertices(|V|=n), how do you find if it contains a cycle in O(n)?…
algorithm - Finding all cycles in a directed graph
How can I find(iterate over) ALL the cycles in a directed graph from/to a given node? For example, I want something like this: A->B->A A->B->C->A but not: B->C->B…