Efficiently Finding Cycles in a Graph: A Scientific Exploration

Click For Summary
SUMMARY

This discussion focuses on efficiently finding cycles in a graph using Depth First Search (DFS) and explores the limitations of current algorithms. The user attempts to implement a modified DFS method to identify cycles but encounters performance issues with a graph containing 8 nodes and 14 edges. The conversation also considers the applicability of Boruvka's algorithm for constructing a minimum spanning tree as a potential solution for cycle detection and edge selection.

PREREQUISITES
  • Understanding of graph theory concepts, specifically cycles in graphs.
  • Familiarity with Depth First Search (DFS) algorithm.
  • Knowledge of Boruvka's algorithm for minimum spanning trees.
  • Basic recursion techniques in algorithm design.
NEXT STEPS
  • Research efficient cycle detection algorithms in graphs, such as Johnson's algorithm.
  • Explore optimizations for Depth First Search to improve performance in cycle detection.
  • Learn about graph representation techniques to enhance algorithm efficiency.
  • Investigate the relationship between minimum spanning trees and cycle detection in graph theory.
USEFUL FOR

Students and researchers in computer science, algorithm developers, and anyone interested in graph theory and cycle detection methodologies.

wololo
Messages
27
Reaction score
0

Homework Statement


Capture.PNG


Homework Equations


Recursion, graphs, DFS

The Attempt at a Solution


To try to solve this algorithm, I first need to find all the basic cycles in the Graph G. When I have these cycles, I can simply pick the smallest edge in each of them and add them to the set F, while removing duplicates, which is trivial. However, I can't figure out an algorithm that would give me all the cycles in polynomial time.

I tried using a modified Depth First Search recursive method that, when it reaches a node that has already been visited, backtracks until it reaches again to find the cycle. However, for a simple graph with 8 nodes and 14 links my method gets called more than 500 times... I tried using what is described here: http://stackoverflow.com/questions/546655/finding-all-cycles-in-graph/549312#549312

Am I thinking about this problem correctly? What approach other than finding the cycles could I use? Thanks
 
Physics news on Phys.org
Could I simply use Boruvka's algorithm to get a minimum spanning tree and add these edges to F?
 
I think all the edges that are not in a maximum spanning tree wil give me the minimum hitting set.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
4
Views
3K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K