Module Question 2
Explain the primary difference between an uninformed and an informed search algorithm.
Answers:
Uninformed search refers to search algorithms that lack specific information regarding how close a particular choice is to the goal. These algorithms search solely based on predefined rules; examples include Breadth-First Search (BFS) and Depth-First Search (DFS). In contrast, informed search utilizes additional information or estimates to help reach the goal more quickly. This information is typically referred to as a heuristic. An example of this is the A* search algorithm.
In what scenario would Depth-First Search be more efficient than Breadth-First Search?
Answers:
DFS can be more efficient when the solution is located quite far from the starting point and the number of chosen paths is limited. DFS follows a single path until it finds the goal or hits a dead end, eliminating the need to examine every option at each level, as BFS does. For instance, if searching for an exit in a maze with many branches where the exit lies deep along one specific path, DFS can find the solution without having to check all the other paths first.
What is a heuristic function, and what role does it play in the A* algorithm?
Answers:
A heuristic function is an estimate of how far the current position is from the goal. In the A algorithm, heuristics are used to help determine which path is likely the best choice. By using heuristics, the A algorithm considers not only the distance already traveled but also estimates the remaining distance to the goal. Consequently, the search becomes more directed, avoiding wasted time on paths that are unlikely to be optimal.
Describe a real-world problem (e.g., GPS navigation) that can be solved using a search algorithm.
Answers:
One example is using GPS to find travel routes. When we enter a destination into Google Maps, the system searches for various possible routes from the starting point to the destination. It then considers factors such as distance, travel time, and road conditions to determine a suitable route. The process of searching for and comparing these various possible routes is an example of using a search algorithm in everyday life.
Status:100%
Keterangan: sudah mengerjakan tugas dengan baik dan benar.
