Complex sentence: Both forms fail if there is no closer node, which may happen if there are local maxima in the search space which are not solutions.
Split into simpler sentences: Both forms fail if there is no closer node. This may happen if there are local maxima in the search space which are not solutions.