Introduction

  • Solve problems approximately - aims at a local optimum
  • 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
    17
    SolutionType 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 G=(V,E)G = (V, E) and an integer KK, does GG contain a subset VVV' \subseteq V such that V|V'| is (at most) KK and every edge in GG has a vertex in VV' (vertex cover)?

  • Vertex cover problem: Given an undirected graph G=(V,E)G = (V, E). Find a minimum subset SS of VV such that for each edge (u,v)(u, v) in EE, either uu or vv is in SS.

  • Feasible solution set FS : all the vertex covers. VFSV\in FS

  • cost(S)=Scost(S)=|S|

  • S ~ S’: S’ can be obtained from S by (adding or) deleting a single node.

    Each vertex cover S has at most V|V| neighbors.

  • Search: Start from S=VS = V; delete a node and check if S’ is a vertex cover with a smaller cost.

image-20210531112622665

The Metropolis Algorithm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SolutionType Metropolis()
{
Define constants k and T;
Start from a feasible solution S in FS ;
MinCost = cost(S);
while (1)
{
S’ = Randomly chosen from N(S);
CurrentCost = cost(S’);
if ( CurrentCost < MinCost )
{
MinCost = CurrentCost;
S = S’;
}
else
{
With a probability e^(-△cost/ (kT)), let S = S’;
else break;
}
}
return S;
}

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: T={T1,T2,}T = \{ T_1 , T_2 , \cdots \}

Hopfield Neural Networks

Definitions

  • Graph G=(V,E)G = (V, E) with integer edge weights ww (positive or negative).
  • If we<0w_e < 0, where e=(u,v)e = (u, v), then uu and vv want to have the same state; if we>0w_e > 0 then uu and vv want different states.
  • The absolute value we|w_e| indicates the strength of this requirement.
  • Output: A configuration SS of the network – an assignment of the state sus_u to each node uu
  • 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 SS, edge e=(u,v)e = (u, v) is good if wesusv<0w_e s_u s_v < 0 (we<0w_e < 0 iff su=svs_u = s_v ); otherwise, it is bad.

[Definition] In a configuration SS, a node uu is satisfied if the weight of incident good edges \geq weight of incident bad edges.

v:e(u,v)Ewesusv0\sum_{v:e(u,v)\in E}w_es_us_v\leq0

[Definition]A configuration is stable if all nodes are satisfied.

image-20210602151425321

State-flipping Algorithm

1
2
3
4
5
6
7
8
9
10
ConfigType State_flipping()
{
Start from an arbitrary configuration S;
while ( ! IsStable(S) )
{
u = GetUnsatisfied(S);
su = - su;
}
return S;
}
  • The state-flipping algorithm terminates at a stable configuration after at most W=eweW = \sum_e|w_e| iterations.

    image-20210602171225189
  • Problem: To maximize Φ\Phi.
  • 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 Φ\Phi is a stable configuration.
  • Still an open question: to find an algorithm that constructs stable states in time polynomial in nn and logW\log W (rather than nn and WW), or in a number of primitive arithmetic operations that is polynomial in nn alone, independent of the value of WW.

Maximum Cut

The Maximum Cut problem

  • Given an undirected graph G=(V,E)G = (V, E) with positive integer edge weights we, find a node partition (A, B) such that the total weight of edges crossing the cut is maximized.

    w(A,B)=uA,vBwuvw(A,B)=\sum_{u\in A,v\in B}w_{uv}

image-20210602171924696
  • Problem: To maximize Φ(S)=e is goodwe\Phi(S)=\sum_{\text{e is good}}|w_e|
  • Feasible solution set FS: any partition (A,B)(A, B)
  • S ~ S’: S’ can be obtained from S by moving one node from AA to BB, or one from BB to AA.
  • A special case of Hopfield Neural Network – with we all being positive.
1
2
3
4
5
6
7
8
9
10
ConfigType State_flipping()
{
Start from an arbitrary configuration S;
while ( ! IsStable(S) )
{
u = GetUnsatisfied(S);
su = - su;
}
return S;
}
  • May NOT in polynomial time

Quality of Local Optimum

  • Let (A,B)(A, B) be a local optimal partition and let (A,B)(A*, B*) be a global optimal partition. Then w(A,B)12w(A,B)w(A, B) \geq \frac12 w(A*, B*).

    image-20210602172706539
image-20210602173016087

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

    2ϵVw(A,B)\frac{2\epsilon}{|V|}w(A,B)

  • Upon termination, the big-improvement-flip algorithm returns a cut (A,B)(A, B) so that

    (2+ϵ)w(A,B)w(A,B)(2+\epsilon)w(A,B)\geq w(A*,B*)

  • The big-improvement-flip algorithm terminates after at most O(n/ϵlogW)O(n/\epsilon\log W) 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 -> Θ(nk)\Theta(n^k) for searching in neighbors

image-20210602174506860

Note: K-L的分析还是未解决的