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.

How to find all vertex-disjoint paths in a graph?

Suppose there are 3 target nodes in a graph. A vertex-disjoint path means there is not any same node except the …

algorithm matlab graph-theory shortest-path
Python Implement Breadth-First Search

I found an example online, however, returning only the sequence of the BFS elements is not enough for calculation. Let's …

python graph-theory breadth-first-search
Compute the minimal number of swaps to order a sequence

I'm working on sorting an integer sequence with no identical numbers (without loss of generality, let's assume the sequence is …

algorithm sorting sequence graph-theory
Are there implementations of algorithms for community detection in graphs?

I am looking for implementations of community detection algorithms, such as the Girvan-Newman algorithm (2002). I have visited the websites of …

graph graph-theory
Finding the longest cycle in a directed graph using DFS

I need to find the longest cycle in a directed graph using DFS. I once saw this Wikipedia article describing …

algorithm graph-theory depth-first-search
Am I right about the differences between Floyd-Warshall, Dijkstra's and Bellman-Ford algorithms?

I've been studying the three and I'm stating my inferences from them below. Could someone tell me if I have …

algorithm graph-theory dijkstra floyd-warshall bellman-ford
What is an efficient algorithm for counting the number of triangles in a graph?

What is an efficient algorithm for counting the number of triangles in an undirected graph )(where a graph is a …

algorithm graph-theory
How can Modularity help in Network Analysis

I have a large network of routers all interconnected in a community network. I am trying to see different ways …

graph graph-theory modularity gephi
How to find Strongly Connected Components in a Graph?

I am trying self-study Graph Theory, and now trying to understand how to find SCC in a graph. I have …

algorithm graph-theory strongly-connected-graph
What is breadth-first search useful for?

Usually when I've had to walk a graph, I've always used depth-first search because of the lower space complexity. I've …

algorithm search graph-theory breadth-first-search depth-first-search