Added more "b" node samples (3 b nodes),
and some optimizations in case the BFS path is too small.