0% found this document useful (0 votes)
151 views5 pages

Bidirectional Search

This document discusses bidirectional search, which is a graph search algorithm where search begins simultaneously from the source and goal vertices. It ends when the two searches meet, finding the shortest path. Bidirectional search reduces time by having simultaneous forward and backward searches from the start and end nodes, intersecting somewhere in the middle. It is complete if breadth-first search is used in both directions.

Uploaded by

anjalidn2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views5 pages

Bidirectional Search

This document discusses bidirectional search, which is a graph search algorithm where search begins simultaneously from the source and goal vertices. It ends when the two searches meet, finding the shortest path. Bidirectional search reduces time by having simultaneous forward and backward searches from the start and end nodes, intersecting somewhere in the middle. It is complete if breadth-first search is used in both directions.

Uploaded by

anjalidn2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Bidirectional

Search
B Y: S A I G E E TA
Introduction to Bidirectional Search
Bidirectional search is a graph search where unlike Breadth First search and Depth First Search, the
search begins simultaneously from Source vertex and Goal vertex and ends when the two searches
meet somewhere in between in the graph.
 The search from the initial node is forward search while that from the goal node is backwards.

It is also based on heuristic search meaning finding the shortest path to goal optimally.
Bidirectional Search Algorithm
Heuristic refers to the concept of finding the shortest path from the current node in the graph to the goal node.

The search always takes the shortest path to the goal node.

This principle is used in a bidirectional heuristic search.

The main idea behind bidirectional searches is to reduce the time taken for search drastically.

This happens when both searches happen simultaneously from the initial node depth or breadth-first and
backwards from goal nodes intersecting somewhere in between of the graph.
Now the path traverses through the initial node through the intersecting point to goal vertex is the shortest path
found because of this search.
This is the shortest path and found in a fraction of time taken by other search algorithms.
Example:
Step 1: Say, A is the initial node and O is the goal node, and H is the intersection node.

Step 2: We will start searching simultaneously from start to goal node and backward
from goal to start node.

Step 3: Whenever the forward search and backward search intersect at one node, then
the searching stops.

• It is possible when both the Start node and goal node are known and unique,
separate from each other.

• Also, the branching factor is the same for both traversals in the graph.

• Also, other points to be noted are that bidirectional searches are complete if a
breadth-first search is used for both traversals, i.e. for both paths from start node till
intersection and from goal node till intersection.
• Time and Space complexity of the bidirectional search is represented by
O(b^{d/2})
Advantages
One of the main advantages of bidirectional searches is the speed at which we get the desired results.

It drastically reduces the time taken by the search by having simultaneous searches.

It also saves resources for users as it requires less memory capacity to store all the searches.

Disadvantages
 The fundamental issue with bidirectional search is that the user should be aware of the goal state to
use bidirectional search and thereby to decrease its use cases drastically.
 The implementation is another challenge as additional code and instructions are needed to
implement this algorithm, and also care has to be taken as each node and step to implement such
searches.
 The algorithm must be robust enough to understand the intersection when the search should come to
an end or else there’s a possibility of an infinite loop.
 It is also not possible to search backwards through all states.

You might also like