Ask a Question
Advertise on boostr.in
how to find the minimum weighted cycle containing two given nodes in a weighted using -'algorithm,graph,cycle,shortest-path'
how to find the minimum weighted cycle containing two given nodes in a weighted ¬†using -'algorithm,graph,cycle,shortest-path'
Given a weighted undirected graph G = (V, E) and a set of nodes P.
Given two nodes, n1 and n2.
I want to find two separate (non-overlapping) paths from n1 to n2, so that the sum of the weights of the two paths is minimum. And I paraphrase the problem to what the title describes, that is the minimum weighted cycle containing n1 and n2.
Obviously it's not correct to find a first minimum weighted path p1 from n1 to n2 and then remove the edges in p1 from the graph and then find a second minimum weighted path p2.
How can I find such a cycle?
Sep 7, 2015
to add a comment.
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please