Which of the following BEST describes the condition under which the Hill…

2025

Which of the following BEST describes the condition under which the Hill Climbing algorithm terminates?

Answer: C. No neighbor has higher valueHill Climbing is a local search / optimization technique: from the current state it always moves to whichever neighboring state has the best value, and it…

  1. A.

    Stopping Criterion met

  2. B.

    Global Min/Max is achieved

  3. C.

    No neighbor has higher value

  4. D.

    All of the above

Attempted by 38 students.

Show answer & explanation

Correct answer: C

Hill Climbing is a local search / optimization technique: from the current state it always moves to whichever neighboring state has the best value, and it never backtracks. Because every move is chosen only by comparing the current state to its immediate neighbors, the algorithm's halting rule is inherently local — it has no built-in way to look beyond that neighborhood.

  1. At the current state, evaluate the value of every neighboring state.

  2. Pick the neighbor with the best (highest) value among them.

  3. If that best neighbor's value is higher than the current state's value, move to it and repeat from step 1.

  4. If none of the neighbors has a higher value than the current state, no move is made — the algorithm stops right there.

So the algorithm terminates exactly at the point where no neighboring state offers a higher value than the current one — this is the state a hill-climbing search settles into.

  • Because this search only ever compares the current state to its own neighborhood and never compares against the entire search space, it has no mechanism to confirm it has found the overall best value across every possible state — so treating the halting point as a guaranteed global extremum overstates what this method can promise.

  • A phrase like "some stopping criterion is met" is a tautology — it is true of essentially every iterative search algorithm the moment it halts, and it doesn't specify what that criterion actually checks. Since it makes no substantive claim about this algorithm's specific rule, it cannot stand as a genuine alternative to the concrete neighbor-comparison condition.

  • An option asserting that every one of the other proposed descriptions holds true at once cannot be correct either, since the global-optimum claim does not hold in general for a search that only ever compares against its immediate neighborhood.

Explore the full course: Bihar Stet Paper Ii Computer Science

Loading lesson…