Consider f(N) = g(N) + h(N) Where function g is a measure of the cost of…

2014

Consider f(N) = g(N) + h(N) Where function g is a measure of the cost of getting from the start node to the current node N and h is an estimate of additional cost of getting from the current node N to the goal node. Then f(N) = h(N) is used in which one of the following algorithms ?

  1. A.

    A* algorithm

  2. B.

    AO* algorithm

  3. C.

    Greedy best first search algorithm

  4. D.

    Iterative A* algorithm

Attempted by 81 students.

Show answer & explanation

Correct answer: C

Answer: Greedy best-first search algorithm

Why: Greedy best-first search selects the next node to expand based solely on the heuristic estimate h(N). Setting f(N) = h(N) means the search ranks nodes only by their estimated distance to the goal and ignores the accumulated cost g(N).

  • Selection criterion: choose the node with the smallest h(N).

  • Relation to A*: A* uses f(N) = g(N) + h(N), combining the path cost so far with the heuristic. That combination is what gives A* its optimality guarantees when h is admissible.

  • Optimality: Greedy best-first is not guaranteed to find the least-cost path because it ignores g(N); it can be fast when the heuristic is very informative but may return suboptimal solutions.

  • Other algorithms: AO* and iterative variants of A* still rely on combining cost estimates and/or using f = g + h (for example, IDA* iteratively increases an f threshold). They do not simply set f(N) = h(N).

Takeaway: If a search uses f(N) = h(N), it is following a greedy best-first strategy—fast but not guaranteed optimal unless additional conditions hold.

Explore the full course: Mppsc Assistant Professor