Beam search In each iteration (lines 3-16) the algorithm outputs its |B| best solutions to be subsequently considered in the next iteration.
lines 4-10 are performed |B| times for each edge e ∈ E, one for each of the |B| partial solutions in the beam, b j ∈ B.