← Back to Branch & Bound docs

teeline · algorithms/branch_bound

Branch & Bound — exact search with pruning

B&B explores the tree of partial tours. At every node the lower bound(partial cost + MST(start ∪ remaining)) is compared with the best complete tour found so far — any branch whose bound cannot beat it is pruned. The bound is valid, so the surviving leaf is the exact optimum.

0540path 0 · bound 540 · open
012345
path0
bound540.0
statusopen
bound = partial 0.0 + MST(start ∪ 1,2,3,4,5)
— (none yet)
nodes
1
explored
1
pruned
0
leaves
0
best
step
0
open active path pruned leaf new best
Branch & Bound — the search tree grows as we step
Speed
cities: 6bound = partial + MST(start ∪ remaining) · prune when bound ≥ best