Top "Graph-theory" questions

A graph is a mathematical structure that contains a collection of vertices or 'nodes' and a collection of edges that connect pairs of vertices.

Drawing a network of nodes in circular formation with links between nodes

I would like to draw a circular graph of nodes where certain nodes have a link between them. Here are …

matlab graph plot graph-theory graph-visualization
Question from Interview, Retrieve alphabetic order from dictionary

My girlfriend got this question in an interview, and I liked it so much I thought I'd share it... Write …

algorithm puzzle graph-theory topological-sort
What is a good network graph library for language X?

I have noticed that a recurring question is: “What is a good network graph library for language X”. I have …

language-agnostic graph graph-theory
What is the difference between breadth first searching and level order traversal?

I don't need code, just an explanation. My textbook says level order: each node at level i is processed before …

algorithm binary-search-tree graph-theory breadth-first-search
Find all cycles in graph, redux

I know there are a quite some answers existing on this question. However, I found none of them really bringing …

graph graph-theory depth-first-search triangle-count
How do weighted edges affect PageRank in networkx?

I'm playing around with networkx (graph library in python) and I found documentation saying the PageRank algorithm takes edge weights …

python graph-theory pagerank networkx
How to remove cycles in an unweighted directed graph, such that the number of edges is maximised?

Let G be an unweighted directed graph containing cycles. I'm looking for an algorithm which finds/creates all acyclic graphs …

algorithm graph graph-theory directed-graph cyclic
Multigraphs with javascript

First of all look at this question. None of those libraries support Multigraphs (or Pseudographs ). I mean I can't generate …

javascript jquery html graph-theory
How to detect if adding an edge to a directed graph results in a cycle?

I came upon wait-for graphs and I wonder, are there any efficient algorithms for detecting if adding an edge to …

graph-theory directed-graph cyclic-graph
deceptively simple implementation of topological sorting in python

Extracted from here we got a minimal iterative dfs routine, i call it minimal because you can hardly simplify the …

python algorithm graph-theory depth-first-search topological-sort