It starts from the root node, explores the neighboring nodes first and moves towards the next level neighbors. It generates one tree at a time until the solution is found. It can be implemented using FIFO queue data structure. This method provides shortest path to the solution.
If branching factor (average number of child nodes for a given node) = b and depth = d, then number of nodes at level d = bd.
The total no of nodes created in worst case is b + b2 + b3 + … + bd.
Disadvantage: Since each level of nodes is saved for creating next one, it consumes a lot of memory space. Space requirement to store nodes is exponential.
Its complexity depends on the number of nodes. It can check duplicate nodes.
Latest posts by FreelancingGig (see all)
- Freelancers, Crypto Payments, and Taxes: An Ultimate Guide - March 17, 2023
- Freelance Environmental Consultant for Corporations: 4 FAQs About the Role Answered - February 11, 2023
- The Benefits of Taking Your Business Online With Print on Demand - January 20, 2023