feat : Add Iterative Deepening DFS) #262
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Iterative Deepening Depth-First Search (IDDFS) in R
This PR introduces a fully documented, optimized, and production-ready implementation of the Iterative Deepening Depth-First Search (IDDFS) algorithm in R.
IDDFS combines the completeness of Breadth-First Search (BFS) with the space efficiency of Depth-First Search (DFS), making it suitable for exploring large or infinite state spaces where depth is unknown.
🔍 Overview
The
iddfs()function repeatedly performs Depth-Limited Search (DLS) from depth0up to a user-definedmax_depth.It halts once the target vertex is found, ensuring the shallowest (shortest depth) solution is discovered efficiently.
✨ Key Features
normalize_graph()ensures robust adjacency handlingexample_iddfs()demonstrating typical graph search cases⚙️ Algorithm Details
🧮 Applications
🧱 Example Usage