Read this lesson as text
Heuristic Methods
Optimization · Axiom Academy
Fast approximation techniques for solving complex optimization problems A heuristic is an algorithm that finds solutions quickly without guaranteeing optimality. Heuristics trade the certainty of finding the best solution for computational efficiency. Fast: Run in polynomial time, often linear or quadratic Approximate: No guarantee of finding optimal solution Practical: Often produce solutions close to optimal Problem-specific: Exploit structure of the problem Example: Finding the shortest route visiting multiple cities (Traveling Salesman Problem) is NP-hard. An exact algorithm might take years, but a heuristic can find a good route in seconds. Greedy heuristics make locally optimal choices at each step, hoping to find a globally good solution. They are construction heuristics that build solutions incrementally. Example - Nearest Neighbor TSP: Start at a city, repeatedly visit the nearest unvisited city until all cities are visited. Simple but effective! 3. Local Search and Neighborhood Structures Local search is an improvement heuristic that starts with an initial solution and iteratively makes small modifications to improve it. 2-opt: Swap two edges in a tour Insert: Move one element to a different position Hill Climbing: Repeatedly move to the best neighbor until no improvement is possible. Terminates at a local optimum. 4. Construction vs Improvement Heuristics Heuristics can be classified into two main categories based on how they generate solutions:
This is the written version of the interactive lesson above. See the full Optimization course.