In: Computer Science
For each of the following situations: ! Pick the search that is most appropriate, be specific about visited and expanded list ! Give a one sentence reason why you picked it. (advantage and disadvantages). 1. We need to find the least cost path to find the goal. Best search algorithm chosen: _______________________________________________ reason:__________________________________________________________________ ________________________________________________________________________ 2. We need a search algorithm that is fast and memory efficient, repeating the work is not an issue. Best search algorithm chosen: _______________________________________________ reason:__________________________________________________________________ ________________________________________________________________________ 3. We have a space and we search the tree from both the start and the goal at the same time. Best search algorithm chosen: _______________________________________________ reason:__________________________________________________________________ ________________________________________________________________________ 4. We need a search algorithm that is complete and optimal without considering the number of steps involved. Best search algorithm chosen: _______________________________________________ reason:__________________________________________________________________ ________________________________________________________________________
1. Dijkstra's Algorithm
Reason: It consideres a set containing only the nodes of which the least cost path to n1 is already known. The idea is to consider a set containing only nodes of which the least cost path to n1 is already known. This set is enlarged successively, considering nodes which can be accessed directly by an edge from one of the nodes already contained in the set. From these candidates, the one with the best cost path to the source node is added to the set.It iterates the previous process to reduce the time complexity and to find the shortest path.
2. Binary Search:
Reason: is a more efficient search algorithm which relies on the elements in the list being sorted. We apply the same search process to progressively smaller sub-lists of the original list, starting with the whole list and approximately halving the search area every time.
3. A* Algorithm:
This algorithm is said to have brains, which can work from both start and end position effectively. It is a really smart algorithm which seperated it from the other conventional algorithms.
4. Best First Search:
It can easily switch between BFS and DFS, therefore gaining the advantages of both the sides.
It is more efficient when compared to DFS
Let me know if you have any doubts or if you need anything to change. If you are satisfied with the solution, please leave a +ve feedback : ) Let me know for any help with any other questions. Thank You! ===========================================================================