Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimum cost strongly connected digraph

I have a digraph which is strongly connected (i.e. there is a path from i to j and j to i for each pair of nodes (i, j) in the graph G). I wish to find a strongly connected graph out of this graph such that the sum of all edges is the least.

To put it differently, I need to get rid of edges in such a way that after removing them, the graph will still be strongly connected and of least cost for the sum of edges.

I think it's an NP hard problem. I'm looking for an optimal solution, not approximation, for a small set of data like 20 nodes.

Edit

A more general description: Given a grap G(V,E) find a graph G'(V,E') such that if there exists a path from v1 to v2 in G than there also exists a path between v1 and v2 in G' and sum of each ei in E' is the least possible. so its similar to finding a minimum equivalent graph, only here we want to minimize the sum of edge weights rather than sum of edges.

Edit:

My approach so far: I thought of solving it using TSP with multiple visits, but it is not correct. My goal here is to cover each city but using a minimum cost path. So, it's more like the cover set problem, I guess, but I'm not exactly sure. I'm required to cover each and every city using paths whose total cost is minimum, so visiting already visited paths multiple times does not add to the cost.

like image 306
Kazoom Avatar asked Oct 08 '09 07:10

Kazoom


People also ask

What is the minimum number of edges on a strongly connected digraph on vertices?

Explanation: Adding a directed edge joining the pair of vertices {3, 1} makes the graph strongly connected. Hence, the minimum number of edges required is 1.

What is a strongly connected digraph?

A strongly connected digraph is a directed graph in which it is possible to reach any node starting from any other node by traversing edges in the direction(s) in which they point. The nodes in a strongly connected digraph therefore must all have indegree of at least 1.

What is the minimum number of edges you must add to G to make it strongly connected?

(d) What is the minimum number of edges you must add to this graph to make it strongly connected? Ans: Two directed edges (one directed from E to B, and the other from C to E), when added, will make the graph G with no source or sink node.

How much time is required to test if a graph is strongly connected?

This algorithm takes O(V*(V+E)) time which can be same as transitive closure for a dense graph. A better idea can be Strongly Connected Components (SCC) algorithm. We can find all SCCs in O(V+E) time. If number of SCCs is one, then graph is strongly connected.


1 Answers

Your problem is known as minimum spanning strong sub(di)graph (MSSS) or, more generally, minimum cost spanning sub(di)graph and is NP-hard indeed. See also another book: page 501 and page 480.

I'd start with removing all edges that don't satisfy the triangle inequality - you can remove edge a -> c if going a -> b -> c is cheaper. This reminds me of TSP, but don't know if that leads anywhere.

My previous answer was to use the Chu-Liu/Edmonds algorithm which solves Arborescence problem; as Kazoom and ShreevatsaR pointed out, this doesn't help.

like image 66
sdcvvc Avatar answered Sep 29 '22 21:09

sdcvvc