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.
- 7 Steps to Take Your Freelance Service from a Gig to a Real Business - April 20, 2021
- How Bitcoin Can Help Your Business Grow Instantly? Eric Dalius Bitcoin Guide - April 19, 2021
- Why IT Support Matters for Your Business - April 14, 2021