In Operations Research, we frequently encounter "NP-hard" landscapes where global optima are obscured by a thicket of local minima. When exact methods (like Branch and Bound) become computationally intractable, we turn to Metaheuristics. This article dissects the mathematical machinery of the two most prominent paradigms: Simulated Annealing (SA) and Genetic Algorithms (GA).
Simulated Annealing maps the physical process of cooling a metal to the search for a global minimum of a cost function f(x).
The heart of SA is the Acceptance Probability, which allows the algorithm to escape local traps by occasionally accepting "uphill" moves (moves that increase the cost).
Given a current statexand a candidate neighborx', let\Delta E = f(x') - f(x). The probability of acceptingx'is:
WhereTis the "temperature" parameter. The Math of Exploration: At high temperatures (T \to \infty),P \to 1for all\Delta E, making the search essentially a random walk. AsT \to 0,P \to 0for all\Delta E > 0, and the algorithm behaves like a greedy Hill Climber.
The effectiveness of SA depends on howTis reduced over timek.
Genetic Algorithms (GA) are population-based searches that use operators inspired by molecular biology: Selection, Crossover, and Mutation.
Selection is the mechanism that enforces "survival of the fittest."
The mathematical justification for GAs is John Holland’s Schemata Theorem. It states that "building blocks" (short, high-fitness strings called schemata) increase their presence in the population exponentially over generations. Letm(H, t)be the number of strings matching schemaHat generationt.
| Feature | Simulated Annealing (SA) | Genetic Algorithm (GA) |
|---|---|---|
| Search Mode | Single trajectory (Trajectory-based) | Population-based (Parallel) |
| Global Guarantee | Yes (given infinite time/log-cooling) | No (prone to premature convergence) |
| Key Math | Boltzmann/Metropolis Distribution | Schemata Theorem / Parity Laws |
| Best For | Continuous or very large discrete spaces | Combinatorial problems (e.g. TSP) |
The performance of any metaheuristic is a balance between Exploration (visiting new regions) and Exploitation (refining the current best).
Researchers should prioritize SA when the neighborhood structure is well-defined and the "energy" landscape is relatively smooth. Choose GA when the problem can be decomposed into independent sub-components that can be recombined through crossover.