Chapter 18
Performing Local Search
IN THIS CHAPTER
Determining how to perform a local search on an NP-hard problem
Working with heuristics and neighboring solutions
Discovering the many tricks to apply to a local search
Solving the 2-SAT problem with local search and randomization
Previous chapters show how solving algorithms does not always correspond to finding an exact solution because of time and resource constraints, or because of the difficulty (or perhaps impossibility) of the problem you’re facing. Such dire situations call for compromise, trading exact solutions for feasible approximations. This chapter discusses an approach, local search (a kind of optimization), that helps create a compromise with difficult problems and reach satisfying solutions. Local search is also sometimes called a local improvement technique.
The first part of the chapter introduces the principles under which local search works, and then analyzes the core ingredients of a local search solution. It also introduces the key concepts of heuristics and neighboring solutions, without which local search ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access