2-opt 2026-10-14
A 2-opt tour move removes two boundary arcs and reverses the intervening block to reconnect one tour. Such moves define a local-search neighbourhood; block reversals of length two include adjacent swaps and hence connect permutation schedules. For directed costs the asymmetric 2-opt reversal cost must include every reversed internal arc, not just the boundary changes.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 33 5 b Solution Created 2026-10-03 Updated 2026-10-14
Represent a schedule by a permutation , with . Choose and reverse the block . This is a 2-opt move on the dummy tour. Its exact setup-cost change is the asymmetric 2-opt reversal costThe internal sum matters because the specified changeovers need not be symmetric. When the block begins at the first job, the boundary terms correctly update the initial setup; the dummy return costs are zero. Processing times cancel.
At temperature , simulated annealing accepts a move with probabilityWith uniformly sampled reversal pairs the proposal is symmetric, so this is the appropriate Metropolis–Hastings acceptance probability. Improvements and ties are always accepted; occasional uphill moves escape local minima. Repeatedly sample moves, gradually lower , and retain the best schedule seen even if the current schedule worsens. Reversing a block of length two swaps adjacent jobs, so these moves connect the whole permutation space. A cooling schedule, iteration budget and restarts control practical performance. This is a heuristic at a finite budget; it does not certify global optimality unless paired with an exact bound or an appropriate limiting convergence argument.