#How to find negative cycle or the minimum possible weight cycle in an undirected graph

4 messages · Page 1 of 1 (latest)

oblique lodge
#

Ive searched a lot on the Internet but i still dont have an intuitive way of doing this. One way i thought of was to make the graph directed so i can use Bellman-Ford to detect negative cycle. But it causes some problems such as infinitely looping the same negative numbers, or just having some inaccessible cycles. Another idea i thought of was adding some constant K to each of the weight such that there will be no negative numbers, and Ill use some algorithm to find the minimum weight cycle, then subtract that weight by K * length of cycle. But that doesnt work as the longer the cycle, the bigger the weight, and the algorithm might detect a cycle whose weight is smaller after the increment K than said longer cycle. Even though before the increment the longer cycle is smaller.

Can someone please help me? Im at my wits end here. Ty

raven valleyBOT
#
  1. Do not ping the Moderators, unless someone is breaking the rules.
  2. Do not ping the Helper Moderators, unless there is a conflict between helpers.
  3. Do not ping other members randomly for help.
  4. Ask your question and show the work you've done so far. If you've posted a screenshot of a question, specify which part you need help with.
  5. Wait patiently for a helper to come along.
  6. If the Helper has answered your question, remember to thank them with the Mathematics Ranks bot and close the thread with:

+close
Feel free to nominate the person for helper of the week in #helper-nominations
If you're happy with the help you got here, and the server overall, you can contribute financially as well:

desert owlBOT
#

@oblique lodge

<:HelpIcon:1304095958283321385>| Help Reminder

Hello jerowm, this is a friendly reminder that your help request has been inactive for more than 24 hours. If you no longer need assistance, please consider closing the thread using the +close command. This thread will be automatically closed in 3 days if it remains inactive.