Explore Library
Code QuizAdvanced

BFS Node-Count Estimate

Find the wrong formula for BFS worst-case node expansion.

Codejavascript
// Estimate worst-case number of nodes BFS may generate
// b = branching factor, d = depth of shallowest goal
function bfsWorstCaseNodes(b, d) {
  return b * d;
}

This complexity estimate is wildly off for large depths. What is the bug?