I have an edge weighted connected graph. It is not a directed one. My task is to remove a few edges so that the graph become divided into at least two half and the sum of weights of the removed edges has to be the least possible.
I know how to find the minimum path between any vertices, I think it has to help somehow, but still I cannot come up with any good idea. If anyone knows advise me plese the algorithm of solving the problem.
Related
I have a complete, weighted, undirected graph. The edge weights are the cost of a connection between two nodes, so the minimum spanning tree is the subset of the edges with the lowest total cost such that the graph remains connected.
The MST must be connected at all times, but unfortunately the connections aren't very reliable, so I would like to add redundancy to this graph/network.
Is it possible to compute a subset of edges such that the total edge cost is minimised and edge-connectivity is over a certain minimum?
I can see how it would be possible by bruteforcing, but I was looking for something more practical. I haven't been able to find much about this problem, I think mainly because I don't posses the vocabulary necessary to search.
My current idea is:
Compute the MST
While the it is still below a certain connectivity
Find a node most below that connectivity
Activate that node's edge with the lowest weight
The reason I don't find all the nodes below a certain connectivity all at once is because activating an edge may give another one enough connectivity.
I'm pretty sure this does not yield 100% provably optimal networks, because with this method, it is possible to over-connect nodes (e.g. you activate k edges for a node, then another node activates more shared edges, making some of those k redundant). I hope that makes sense.
Any tips would be much appreciated!
The Wikipedia article on edge connected graphs ends with, A related problem: finding the minimum k-edge-connected spanning subgraph of G (that is: select as few as possible edges in G that your selection is k-edge-connected) is NP-hard for k >= 2. They then cite a 1979 paper that shows it.
Therefore I'd suggest taking a greedy approach, and tip-toeing away.
does anyone here know if it's possible to eliminate all cycles in a undirected and unweighted graph (n vertices) removing vertices in a way the number of removed vertices is minimized, in O(n^2) ?
In the worst case, the graph can be a complete one.
If it's possible, how can i do it?
If it's not, why?
Thank you
Take any undirected, unweigthed graph, and double up all the edges so that there's a cycle between each pair of adjacent vertices.
Now the minimum set of vertices that eliminates all cycles is also the minimum vertex cover of both the original and modified graphs. See https://en.wikipedia.org/wiki/Vertex_cover
Finding a minimum vertex cover is an NP-hard problem, so your problem is also NP-hard.
If you don't want to allow double edges, then you can add dummy vertices to hold the new edges and your problem still solves vertex cover.
This problem is called Feedback Vertex Set, and unfortunately it's NP-hard, meaning no one knows a polynomial-time algorithm for solving it.
I have a grid based graph, where nodes and edges occupy cells. Edges can cross, but cannot travel on top of each other in the same direction.
Lets say I want to optimize the graph so that the distance covered by edges is minimized.
I am currently using A* search for each connection, but the algorithm is greedy and does not plan ahead. Consider the diagram below, where the order in which connections are made is changed (note also that there can be multiple shortest paths for any given edge, see green and
purple connections).
My intuition says this is NP-Complete and that an exhaustive search is necessary, which will be extremely expensive as the size of the graph grows. However, I have no way of showing this, and it is not quite the same as other graph embedding problems which usually concern minimization of crossing.
You didn't really describe your problem and your image is gone, but your problem sounds like the minimum T-join problem.
The minimum T-join problem is defined on a graph G. You're given a set T of even size, and you're trying to find a subgraph of the graph where the vertices of T have odd degree and the other vertices have even degree. You've got weights on the edges and you're trying to minimise the sum of the weights of edges in the subgraph.
Surprisingly, the minimum T-join problem can be solved in polynomial time thanks to a very close connection with the nonbipartite matching problem. Namely, if you find all-pairs shortest paths between vertices of T, the minimum T-join is attained by the minimum-weight perfect matching of vertices in T, where there's an edge between two vertices whose length is the length of the shortest path in G.
The minimum T-join will be a collection of paths. If two distinct paths, say a->b and c->d, use the same edge uv, then they can be replaced by a->u->c and b->v->d and reduce the cost of the T-join. So it won't use the same edge twice.
Assume that we have a random graph. How do you remove or add edges in the minimum number of steps such that every edge in the resulting graph would be in a Hamilton path?
I would really appreciate if someone can share any ideas.
There's an algorithm to find Hamilton paths quickly in certain random graphs due to Angluin–Valiant. Perhaps you could run it repeatedly for each edge in the graph to extend that edge to a Hamilton path, adding edges when that fails.
I have reduced my problem to finding the minimal spanning tree in the graph. But I want to have one more constraint which is that the total degree for each vertex shouldnt exceed a certain constant factor. How do I model my problem? Is MST the wrong path? Do you know any algorithms that will help me?
One more problem: My graph has duplicate edge weights so is there a way to count the number of unique MSTs? Are there algorithms that do this?
Thank You.
Edit: By degree, I mean the total number of edges connecting the vertex. By duplicate edge weight I mean that two edges have the same weight.
Well, it's easy to prove that there may not be a solution: just make your input graph a tree that has a vertex with degree higher than your limit..
Garey Johnson had this problem reduce to hamilton :( So this one helped. Approximating the first one: http://caislab.icu.ac.kr/Lecture/data/2003/spring/ice514/project/m03.ppt
However, better working models are appreciated...
Counting: http://mathworld.wolfram.com/SpanningTree.html . According to this, mathematica has a function. Any suggestions in this one?
This paper shows how to find, in polynomial time, a spanning tree of maximum degree d + 1 that is at least as good as any spanning tree of maximum degree d: http://www.andrew.cmu.edu/user/mohits/mbdst.pdf
//Edit The original link is currently inactive, try http://research.microsoft.com/pubs/80193/mbdst.pdf instead.