04.09.2013 Views

Algorithm Design

Algorithm Design

Algorithm Design

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

684<br />

Chapter 12 Local Search<br />

utting the two edges incident<br />

t~obad<br />

s would<br />

local<br />

be<br />

optimum:<br />

better.<br />

-<br />

Figure 12.5 An instance of the Minimum s-t Cut Problem, where all edges have<br />

capacity 1.<br />

exponentiallY many neighbors. This appears to be contrary to the general rule<br />

that "the neighborhood of a solution should not be too large;’ as stated in<br />

Section 12.5. However, we will be working with neighborhoods in a more<br />

subtle way here. Keeping the size of the neighborhood small is good if the<br />

plan is to search for an improving local step by brute force; here, however, we<br />

will use a polynomial-time minimum-cut computation to determine whether<br />

any of a solution’s exponentially many neighbors represent an improvement.<br />

The idea of the local search is to use our polynomial-time algorithm<br />

for Two-Label Image Segmentation to find improving local steps. First let’s<br />

consider a basic implementation of this idea that does not always give a good<br />

approximation guarantee. For a labeling f, we pick two labels a, b ~ L and<br />

restrict attention to the nodes that have labels a or b in labeling f. In a single<br />

local step, we will allow any subset of these nodes to flip labels from a to b, or<br />

from b to a. More formally, two labelings f and f’ are neighbors if there are two<br />

labels a, b ~ L such that for all other labels c {a, b} and all nodes i ~ V, we<br />

have f(i) = c if and only if f’(i) = c. Note that a state f can have exponentially<br />

many neighbors, as an arbitrary subset of the nodes labeled a and b can flip<br />

their label. However, we have the following.<br />

(12.8)<br />

If a labeling f is not locally optimal for the neighborhood above, then a<br />

neighbor with smaller penalty can be found via k2 minimum-cat computations.<br />

ProoL There are fewer than k2 pairs of distinct labels, so we can try each pair<br />

separately. Given a pair of labels a, b ~ L, consider the problem of finding an<br />

improved labeling via swapping labels of nodes between labels a and b. This<br />

is exactly the Segmentation Problem for two labels on the subgraph of nodes<br />

that f labels a or b. We use the algorithm developed for Twd-Label Image<br />

Segmentation to find the best such relabefing. "<br />

12.6 Classification via Local Search<br />

Figure 12.6 A bad local optimum for the local search algorithm that considers only<br />

two labels at a time.<br />

This neighborhood is much better than the single-flip neighborhood we<br />

considered first. For example, it solves the case of two labels optimally.<br />

However, even with this improved neighborhood, local optima can still be<br />

bad, as shown in Figure 12.6. In this example, there are three nodes s, t, and z<br />

that are each required to keep their initial labels. Each other node lies on one of<br />

the sides of the triangle; it has to get one of the two labels associated with the<br />

nodes at the ends of this side. These requirements can be expressed simply by<br />

giving each node a very large assignment penalty for the labels that we are not<br />

allowing. We define the edge separation penalties as follows: The light edges<br />

in th e figure have penalty 1, while the heavy edges have a large separation<br />

penalty of M. Now observe that the labeling in the figure has penalty M + 3<br />

but is locally optimal. The (globally) optimal penalty is only 3 and is obtained<br />

from the labeling in the figure by relabeling both nodes next to s.<br />

A Local Search Neighborhood That Works Next we define a different neighborhood<br />

that leads to a good approximation algorithm. The local optimum in<br />

Figure 12.6 may be suggestive of what would be a good neighborhood: We<br />

need to be able to relabel nodes of different labels in a single step. The key is<br />

to find a neighbor relation rich enough to have this property, yet one that still<br />

allows us to find an improving local step in polynomial time.<br />

Consider a labeling f. As part of a local step in our new algorithm, we will<br />

want to do the following. We pick one labe! a ~ L and restrict attention to the<br />

685

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!