Comparative Analysis between BFS and DFS-Shortest Path Algorithms
Renad AlKahtani, Amjad Alhabdan, Miad Alosami, Waad Alshammari, Azza A. Abdo, Lama Hamdi
- Year
- 2025
- Citations
- 6
Abstract
Graph theory is a critical field in computer science and mathematics, particularly in solving shortest path problems. In this paper, a comparative analysis of Breadth-First Search (BFS) and Depth-First Search (DFS) algorithms for unweighted graphs, is presented. The algorithms efficiency analysis is measured, including execution time, and efficiency across varying graph structures such as level-order traversal (number of nodes through the path). The results indicate that BFS is more optimal than DFS for shortest path discovery due to its level-order traversal, despite its potential speed advantage, BFS does not always guarantee optimality in practice. The insights derived from this study contribute to algorithm selection strategies in applications such as network routing, robotics, and artificial intelligence.
Keywords
Related papers
Statistical Learning Theory
Yuhai Wu, Vladimir Vapnik
1999
Artificial intelligence: a modern approach
1995
Fractional Differential Equations
Igor Podlubný
2025
Applied Nonlinear Control
Jean-Jacques Slotine, Weiping Li
1991