Indira Gandhi Delhi Technical University For Women (Igdtuw) : Mechanical and Automation Engineering (MAE) 2019-2023
Indira Gandhi Delhi Technical University For Women (Igdtuw) : Mechanical and Automation Engineering (MAE) 2019-2023
5th SEMESTER
Advantages of BFS:
• A BFS will find the shortest path between the starting point and any other
reachable node.
• BFS will never get trapped in a blind alley.
• If multiple solutions exist, it finds the one with minimal steps.
Disadvantages Of BFS:
• Takes up a lot of memory space as it stores all the nodes of the present level
to go for the next level.
• It is a ‘blind’ search, when the search space is large performance will be poor.
INPUT-
OUPUT-
Advantages Of DFS:
INPUT-
OUTPUT –
repeatedly with increasing depth limits until the goal is found. At each
iteration, it visits the nodes in the search tree in the same order as depth-first
search, but the cumulative order in which nodes are first visited is effectively
breadth- first.
Advantages of IDDFS
• IDDFS gives us the hope to find the solution if it exists in the tree.
• When the solutions are found at the lower depths say n, then the
algorithm proves to be efficient and in time.
• The great advantage of IDDFS is found in-game tree searching where
the IDDFS search operation tries to improve the depth definition,
heuristics, and scores of searching nodes so as to enable efficiency in the
search algorithm.
Disadvantages of IDDFS
• The time taken is exponential to reach the goal node.
• The main problem with IDDFS is the time and wasted calculations that
take place at each depth.
• The IDDFS might fail when the BFS fails. When we are to find multiple
answers from the IDDFS, it gives back the success nodes and its path once
even if it needs to be found again after multiple iterations. To stop the
depth bound is not increased further.
Input:
Output: