Questions tagged [directed-graph]

A directed graph is a set of objects (called vertices or nodes) that are connected together, where all the edges are directed from one vertex to another. A directed graph is sometimes called a digraph or a directed network.

A directed graph (or digraph) is a , or set of nodes connected by edges, where the edges have a direction associated with them

686 questions
0
votes
1 answer

Error looking through a directed graph c++ Segmentation fault

The user will input the number of nodes in a graph followed by an overall "planet" name. then they will input where is the name of the planet and is the number of locations in this planet. Afterwards, lines follow, each of the form: …
ViscousRandom
  • 179
  • 1
  • 9
0
votes
1 answer

readfile and map to directed graph

i have read file function which will read a txt file. after i read it, i put the value to a list. below is sample data: public void readDisplayClient() { DisplayClient dc = null; try { // Open the file that is the first // command line…
Eric
  • 401
  • 4
  • 13
  • 21
0
votes
1 answer

SSRS 2008 - Create a chart of a directed graph to visualise ETL jobs

I can't find anything that hints towards native support for charting graph data structures (otherwise known as "network maps" by some), and in my case, a directed graph. I'm wanting to create a visualisation of our ETL dependency chain at work to…
Adrian Torrie
  • 2,795
  • 3
  • 40
  • 61
0
votes
2 answers

Prune leaf components of a directed graph

Given a directed graph and some of its nodes, how to prune the nodes that cannot reach any of the given nodes. (I term it leaf components, which I am not sure is a correct term) Are there any known algorithms solving this efficiently? It would be…
Infinite
  • 3,198
  • 4
  • 27
  • 36
0
votes
0 answers

Why are new nodes in a D3 force directed graph not showing up consistently?

I've been working with d3 for a while now in an attempt to create an interactive ecosystem explorer tool that maps out relationships between species. Recently I've tried adding a feature that lets users show or hide species (nodes) in the force…
JHolmes
  • 183
  • 2
  • 15
0
votes
1 answer

Sides Elimination in directed cyclic graph or Tournament (graph)

I wanted an algorithm to eliminate the sides of a cyclic directed graph or mostly a Tournament and output a tree kind of structure with minimum number of sides. The elimination should be based on the weight of the sides, as described below in as a…
Sudhaker
  • 785
  • 1
  • 6
  • 13
0
votes
1 answer

Shortest paths for directed acyclic graphs

So basically, I have an n by m array of float values and I'm trying to find the shortest path between the any of the 1st row of values, and any of the mth row of values. Node (i, j) in the graph has children {(i, j+1), (i-1, j+1), i+1, j+1)} for any…
0
votes
1 answer

Weighted directed graph

I am trying to implement a recursive depth first traversal on a weighted digraph(, but it seems as if my output is always off. As in, I am getting extra visits to nodes. This is what I am currently working with: void Dfs( int u, vector
Mongo
  • 5
  • 4
0
votes
2 answers

sharir kosaraju algorithm and vertices

Let's say we run sharir kosaraju algorithm on a Directed graph. And we have an arc (u,v) on this graph. In this algorithm we have two DFS passes. Now suppose we insert vertex u into the first depth tree T. Where can v appear? Is it in another tree…
Anna
  • 59
  • 1
  • 2
  • 8
-1
votes
1 answer

A graph with maximum number of strongly connected components

Create a directed graph with 6 nodes (say) such that it has maximum number of strongly connected components. For example, take complete graph with 4 nodes with all edges connected. This is graph has only 1 strongly connected component, i.e entire…
-1
votes
1 answer

How to find shortest path between every node within K moves?

Lets say I have following graph: Now what I want is to get shortest path between every node in graph(or have -1 at that place in matrix if it is not possible to get from 1 node to other) , but that path need to have lenght less or same as K. Now I…
-1
votes
1 answer

Is this implementation of a graph effectively linear in the number of edges?

I have a class which resembles an adjacency matrix representation of a weighted, directed graph. Let's suppose the graph has n vertices. Here is how it works: At first, allocate n2 slots to hold integers (stored in a variable named graph), in the…
Wais Kamal
  • 5,858
  • 2
  • 17
  • 36
-1
votes
5 answers

How to convert a dataframe into a list of 3-tuples

I would like to create a directed graph with use of the networkx library in python. I have a pandas dataframe that looks like this: Head Mounted Display Marker Smartphone 2D data extrusion …
Luc
  • 35
  • 5
-1
votes
2 answers

JavaScript: Detect a Loop in a Hierarchical Graph

Note that I've already gone through How to detect a loop in a hierarchy of javascript elements In our case, we're not dealing with a linked-list, but a hierarchical graph where each node may have multiple children linked to it. For example, const…
1man
  • 5,216
  • 7
  • 42
  • 56
-1
votes
1 answer

Determine if the graph is directed or undirected

Can anyone offer some suggestions on how to write a method that returns if a graph is directed or undirected in python? Thanks. class DiGraph : def __init__ ( self ) : self._adj = {} def add_node ( self , u ) : if u…
1 2 3
45
46