Application of Operational Research basics: Combinatorial Optimization (6)-Approximate algorithm selection (4)

Source: Internet
Author: User

This session introduces the Steiner tree problem (Steiner trees) and the travel salesman problem (TSP) and explains their approximate algorithms.

Eectilinear on the plane

The eectilinear on the plane refers to the problem that there are $n $ points on the plane, and that the total length of the line is as small as possible to connect them together. Note that the segment does not have to intersect at a given $n $ points (otherwise the smallest spanning tree is gone) and can intersect at other points on the plane. In the optimal solution, a line segment is called a Steiner point on the plane except for the points outside the given point.

You can see $n = 3$ and $n = 4$, $S $, $S _1$, and $S _2$ are Steiner points. $n = 3$, the Steiner Dot is the Fermat point of the triangle.

The eectilinear on the plane is a np-hard problem.

Eectilinear of complete graphs satisfying triangular inequalities

A complete graph of eectilinear that satisfies a triangular inequality refers to the question of a complete graph $G = (V, E) for a given triangle inequality (three points $x with a connecting edge for any 22, Y, z$, $w (x, y) \le W (x, Z) + W (z, y) $, $w $ for edge) and $S \subseteq v$, $G $ of the connected sub-graph $G ' $, so that all points in $S $ are in $G ' $, and $G ' $ edge and minimum.

Even with so many constraints, the problem remains a np-hard issue (see Proof). Here we present a 2-approximation algorithm: It is very simple, as long as the minimum spanning tree of $S $ can be calculated (don't forget the full graph, $S $ is definitely connected).

The algorithm approximate ratio proves :

Assuming that the sum of the optimal eectilinear is $\text{opt}$, the sum of Benquan of the minimum spanning tree is $\text{mst}$. We copy each edge of the optimal Steiner tree once and get a graph with a Euler loop whose sum of Benquan is $2\text{opt}$.

We set out at the Oratu of one of the $S $, and found a $L $ in the Europa loop. We only walk $S the points in the $, and each point only goes once, if you cannot go along the $L $ to the next point directly "jump to" that point (don't forget the full picture, this "jump" is called short-cutting).

For example, as part of the Euler loop we found, the red dot is the point in $S $. Since the first a cannot go along the $L $ to $b $, we have to jump over it, because a has passed, so we can not go c→a→d, but to jump from C directly to D.

Since the complete graph conforms to the trigonometric inequalities, it is certainly not longer than walking past $L $. In this way, we find a connected graph of $S $, and the Benquan of this connected graph is at most $2\text{opt}$.

Don't forget, $S $ of any connected graph, the sum of edge weights is no smaller than the smallest spanning tree. So we have $\text{mst} \le 2\text{opt}$. This proves that the approximate ratio of the algorithm is 2.

The example shows that this approximation is tight for the algorithm. The Benquan values that are not drawn in the figure are 2. Make $S = \{1, 2, \dots, n\}$, obviously the optimal solution is $n $ (using the middle 0 as the Steiner Point), but using the above algorithm will get the result of $ (n-1) $, approximately 2 when the $n $ is large enough.

The approximate ratio of traveling quotient problem

As we all know, the TSP on the full map is Np-hard. However, there is not even a good approximation of the TSP on the full graph. The following proves that the TSP on the full graph does not have a polynomial algorithm with an approximate ratio of $O (2^{\text{poly} (N)}) $, where $\text{poly} (n) $ represents a polynomial of $n $.

We use the Hamilton loop problem to prove it. For the normal graph $G = (V, E) on the Hamilton Loop problem, we construct the complete graph $G ' = (V, e ') $, $E ' $ in an edge $e ' $ of Benquan $w (E ') $ is defined as follows: $ $w (e ') = \begin{cases} 1 & E ' \in e \ 2^{\text{poly} (n)}n & E ' \not\in e \end{cases}$$ This full graph's input size is still a polynomial of $n $.

If the TSP has an approximate ratio of $O (2^{\text{poly} (N)}) $, then for the full graph above, the algorithm absolutely cannot choose $e ' \not\in e$ edges. But if the algorithm only constructs a solution with the edge of the $e ' \in e$, it also finds the Hamilton Loop in $G $. We know that the Hamilton Loop itself is the NPC, and this is the proof.

The traveling quotient problem of satisfying triangle inequality's complete graph

Since the travel quotient problem is so the general picture, let's add a little bit of restraint. The TSP has a good approximation on the complete graph of the triangular inequalities.

First, it is easy to prove that the problem is approximately 2 higher than the upper bound: first run a minimum spanning tree (edge and affirmation small equals the optimal Hamilton Loop), each side of the tree is repeated into Eulerian graph, on Eulerian graph and Steiner tree similar short-cutting can be.

But we can prove a tighter upper bound. You don't have to repeat every side of the tree to get Eulerian graph. If we match the number of points in the tree (hereinafter referred to as the Singularity) for pairing (the singularity of a picture must have an even number of points, do not worry about a match), each pair of a side, then the composition of the graph is even point, that is, a Eulerian graph. This pairing work is very easy, as long as you use a flower tree or something to find a perfect match for a minimum weight. The approximate ratio of this algorithm to 1.5 is shown below.

Assuming the optimal Hamiltonian loop such as, the white dot is the singularity on the smallest spanning tree. We can get two disjoint matches (1-2, 3-4, ..., 2k-1-2k and 2-3, 4-5, ..., 2k-1) by short-cutting the singularity in order. Because of the triangle inequality, the sum of the two matching weights is certainly not greater than $\text{opt}$, then the lesser of the two matches is certainly not greater than the value of $0.5\text{opt}$. Don't forget, we find the smallest perfect match in the algorithm, then the minimum perfect match of the weight value is certainly not much more than $0.5\text{opt}$. The minimum spanning tree + minimum weight perfect match proves the approximate ratio of 1.5.

The above example shows that the 1.5 pair of the algorithm is tight, and the Benquan value that is not drawn is 2. The solid line on the right is the smallest spanning tree that the algorithm can get, and the dashed lines are the least-weighted perfect match that the algorithm might calculate. It is obvious that the optimal solution is $n $, and the solution that the algorithm may derive is $n + \frac{n}{2}$. As long as the "trapezoid" above the point is enough, then the approximate ratio is 1.5.

The shortest Hamiltonian path of complete graphs satisfying triangular inequalities

Here's a somewhat different question: in a complete graph that satisfies a triangular inequality, a given $k = \{0, 1, 2\}$ fixed points (that is, a specified start or end point, or both are specified, or not specified), to satisfy the shortest Hamilton path of the fixed point.

This problem can be solved by the following approximate algorithms:

1. First, a minimum spanning tree $T $ is obtained;

2. The set of points $S $ contains two types of points: a fixed point on the smallest spanning tree that is even point (because the fixed point is to be Oralu, it is not easy to find the one that starts with them), and the non-fixed point of the singularity on the smallest spanning tree;

3. Similar to the TSP problem, to find a $S $ minimum weight matching $M $, requires $2-k$ non-fixed point mismatch (as long as the addition of $2-k$ auxiliary points, with the non-fixed point of the weight value of 0 auxiliary edge). Easy to find, this will just have 2 points to become the singularity, and the fixed point must be in these 2 points;

4. In this way $T \cup m$ is a picture with Oralu, short-cutting method to turn Oralu into Hamilton Road.

This algorithm $k \in \{0, 1\}$ is a 1.5 approximation algorithm. The following is proof.

$k = 0$

The proof thought is similar to the TSP. Assuming a $2t$ singularity on the optimal solution, it can be split into two matches: 1-2, 3-4, ..., (2t-3)-(2t-2) (2t-1 and 2t no match) with 2-3, 4-5, 6-7, ..., (2t-2)-(2t-1) (1 and 2t do not match), it can be proved that the sum of the weights of $M $ $0.5\text{opt}$.

$k = 1$

Set the starting point (set to s) as a fixed point.

If the starting point is a good singularity, assuming that the optimal solution has a $2t+1$ singularity (excluding the starting point), then you can split into two matches: 1-2, 3-4, ..., (2t-1)-2t (2t+1 no match) with 2-3, 4-5, ..., 2t-(2T+1) ( 1 no match);

If the starting point is even point is more troublesome. Suppose that there are $2t$ singularities on the optimal solution, because the starting point must be matched, we cannot break the optimal solution into two matching matching requirements. But we can first split the optimal solution into two matching $M _1$:s-1, 2-3, ..., (2t-2)-(2t-1) (2t no match), and $M _2$:1-2, 3-4, ..., (2t-1)-2t (s no match).

Note $w (M) $ represents the sum of the weights that match $M $. If $w (M_1) < W (m_2) $ that incorporates $M _1$ into $T $ The answer is already out, otherwise we use the $T \cup m_2$ to get a Eulerian graph, find a Hamilton loop, and then remove the connection s of an edge, get the S as the starting point of Hamilton Road. Since $w (m_2) \le W (m_1) $, and we add the graph to the $M _2$, there is still an approximate ratio of 1.5.

$k = 2$

$k = 2$ is slightly different, and the approximate ratio is 5/3 when the algorithm is given both the start and end points. This time we're going to turn $T \cup \text{opt}$ into 3 matches to complete the proof. The following example proves that the starting point (s) and the end point (recorded as T) are even points, and others are similar.

It is not difficult to find, $T-\{s, t\}$ have even a few points, then $S $ also have an even number of points. The optimal path is followed by $s, v_1, v_2, \dots, v_{2k}, t$, where $v _i$ is the singular point on $T $.

Remember $u-v$ means that only through the edge of the optimal path from the point $u $ go to $v $, $u \sim v$ represents only through $T $ in the edge from the point $u $ to $v $. We try to split the $T \cup \text{opt}$ into three parts (not necessarily matches), and each edge is used at most once:
1. $s-v_1, v_2-v_3, \dots, v_{2k-2}-v_{2k-1}, v_{2k}-t$;
2. $v _1-v_2, V_3-v_4, \dots, v_{2k-1}-v_{2k}, S \sim t$;
3. Find $s, T, V_1, V_2, \dots, v_{2k}$ an arrangement $u _1, u_2, \dots, u_{2k+2}$, $u _1 \sim u_2, U_3 \sim u_4, \dots, u_{2k+1} \sim u_{2k+2}$.

Due to triangular inequalities, the weights of the edges used by the $u \sim v$ must be large equal to the weights directly connected $u $ and the edge of the $v $. If we can find the above split, and each edge is used at most once, then we find 3 $S $ perfect match, the sum of its weights does not exceed $2\text{opt}$. In this way, the minimum weight of $S $ will not exceed $\frac{2}{3}\text{opt}$ to prove the approximate ratio of $\frac{5}{3}$.

Let me give you an example. On the left, the solid line is the edge of the $T $, the dash is the edge in the $\text{opt}$, the red Edge is the edge in part 1, the blue Edge is the edge of Part 2, and the green edge is the edge in part 3.

Look at the picture on the right. Although all green edges cannot form a match, the orange edge can form a match, and the sum of the weights must not be greater than the sum of the weights of the green edges.

It is clear that Part 1 and Part 2, except $s \sim t$, make up the optimal path. We find the edges in section 3 and section 2 $s \sim t$ in $T $ by the following algorithm:

1. Find the path from $s $ to $t $ in the $T $ as $s \sim t$, removing the used edges;
2. For each connected block, select any one of the singularity points $u $, find the path to another singularity point $v $ in $T $, and the path does not contain any other singularity points. Remove the used edges;
3. Repeat step 2 until the point in the $S $ has been found in step 2.

According to the algorithm description it is easy to see that if the algorithm exits successfully, we find the required split. It follows that each point in the $S $ can find the corresponding point in step 2, that is, the algorithm can exit successfully.

Note that both $s $ and $t $ are even points. At the end of step 1, since $s $ with $t $ is the path endpoint, after removing the edges on the path, the $s $ and the $t $ all become singular points, and the other points on the path are not changed after the edges on the path are removed.

In step 2, because each connected block must have an even number of odd points, you can always find the $u $ and $v $ that meet the requirements. Because there are no other singularity points in the middle of the path, the parity of the other points does not change, and the subsequent operation of the algorithm is not affected, and the $u $ with $v $ as the path endpoint, after removing the edges in the path becomes the even point, will not be selected again, and does not affect the subsequent operation of the algorithm.

Therefore, we can be sure to split the $T \cup \text{opt}$ into a $S $3 perfect match to prove that the approximate ratio of the algorithm does not exceed $\frac{5}{3}$.

Application of Operational Research basics: Combinatorial Optimization (6)-Approximate algorithm selection (4)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.