Implementation of shortest path algorithm in a givenPresentation Transcript
IMPLEMENTATION OF SHORTEST PATHALGORITHM IN A GIVEN MAZE AND STUDYINGTHE ALGORITHM’S TIME AND SPACECOMPLEXITY By- Abhas Vyas Guide- Prof. G.R Brindha
THE SEARCH SPACE We have implemented an algorithm for finding the shortest path avoiding obstacles and dis- continuity in a search space which is a single source single destination type. The initial point is in red and the final point is in green.
THE APPROACH The approach includes feature extraction from an image of the search space i.e. lines, nodes and obstacles. Thereafter, finding the adjacency matrix of each node based on Euclidean distance and pixel information of the path between the nodes. The graph created for the implementation is labeled and is of variable branching factor and for which an average branching factor is calculated.
An optimum path is produced by minimizing the cost function taking into account the catenated matrix of the nodes and path connecting them. The optimum path is obtained by applying Breadth-first Search, Depth-first Search and A* algorithm and their time and space complexity are compared.
A FLOWCHART FOR MAKING A CATENATED MATRIXOF NODES
A FLOWCHART FOR MAKING THE ADJACENCYMATRIX
SAMPLE SEARCH SPACES WITH ASSOCIATEDOPTIMUM PATH FROM SOURCE Figure 1
Figure 2 Figure 3
GRAPH DEPICTING VARIATION OF COMPUTATIONTIME FOR BFS SEARCH WITH DEPTH OF GOAL NODE
GRAPH DEPICTING VARIATION OF COMPUTATIONTIME FOR DFS SEARCH WITH DEPTH OF GOAL NODE