Local Search
Introduction
- Solve problems approximately - aims at a local optimum
Framework of Local Search
- Local
- Define neighborhoods in the feasible set
- A local optimum is a best solution in a neighborhood
- Search
- Start with a feasible solution and search a better one within the neighborhood
- A local optimum is achieved if no improvement is possible
Neighbor Relation
-
S ~ S’: S’ is a neighboring solution of S, S’ can be obtained by a small modification of S
-
N(S): neighborhood of S, the set { S’: S ~ S’ }
-
梯度下降法
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17SolutionType Gradient_descent()
{
Start from a feasible solution S in FS ;
MinCost = cost(S);
while (1)
{
S’ = Search(N(S)); /*find the best S’ in N(S)*/
CurrentCost = cost(S’);
if ( CurrentCost < MinCost )
{
MinCost = CurrentCost;
S = S’;
}
else break;
}
return S;
}
Vertex Cover
-
Vertex cover problem: Given an undirected graph and an integer , does contain a subset such that is (at most) and every edge in has a vertex in (vertex cover)?
-
Vertex cover problem: Given an undirected graph . Find a minimum subset of such that for each edge in , either or is in .
-
Feasible solution set FS : all the vertex covers.
-
-
S ~ S’: S’ can be obtained from S by (adding or) deleting a single node.
Each vertex cover S has at most neighbors.
-
Search: Start from ; delete a node and check if S’ is a vertex cover with a smaller cost.
The Metropolis Algorithm
1 | SolutionType Metropolis() |
Simulated Annealing
-
The material is cooled very gradually from a high temperature, allowing it enough time to reach equilibrium at a succession of intermediate lower temperatures.
-
Cooling schedule:
Hopfield Neural Networks
Definitions
- Graph with integer edge weights (positive or negative).
- If , where , then and want to have the same state; if then and want different states.
- The absolute value indicates the strength of this requirement.
- Output: A configuration of the network – an assignment of the state to each node
- There may be no configuration that respects the requirements imposed by all the edges.
- Object: Find a a configuration that is sufficiently good.
[Definition] In a configuration , edge is good if ( iff ); otherwise, it is bad.
[Definition] In a configuration , a node is satisfied if the weight of incident good edges weight of incident bad edges.
[Definition]A configuration is stable if all nodes are satisfied.
State-flipping Algorithm
1 | ConfigType State_flipping() |
-
The state-flipping algorithm terminates at a stable configuration after at most iterations.
Related to Local Search
- Problem: To maximize .
- Feasible solution set FS : configurations
- S ~ S’: S’ can be obtained from S by flipping a single state
- Any local maximum in the state-flipping algorithm to maximize is a stable configuration.
- Still an open question: to find an algorithm that constructs stable states in time polynomial in and (rather than and ), or in a number of primitive arithmetic operations that is polynomial in alone, independent of the value of .
Maximum Cut
The Maximum Cut problem
- Given an undirected graph with positive integer edge weights we, find a node partition (A, B) such that the total weight of edges crossing the cut is maximized.
Related to Local Search
- Problem: To maximize
- Feasible solution set FS: any partition
- S ~ S’: S’ can be obtained from S by moving one node from to , or one from to .
- A special case of Hopfield Neural Network – with we all being positive.
1 | ConfigType State_flipping() |
- May NOT in polynomial time
Quality of Local Optimum
-
Let be a local optimal partition and let be a global optimal partition. Then .
Big-improvement-flip
-
Stop the algorithm when there are no “big enough” improvements.
-
Big-improvement-flip: Only choose a node which, when flipped, increases the cut value by at least
-
Upon termination, the big-improvement-flip algorithm returns a cut so that
-
The big-improvement-flip algorithm terminates after at most flips
Try a better “local”
-
The neighborhood of a solution should be rich enough that we do not tend to get stuck in bad local optimal; but the neighborhood of a solution should not be too large, since we want to be able to efficiently search the set of neighbors for possible local moves.
-
Single-flip -> k-flip -> for searching in neighbors
Note: K-L的分析还是未解决的