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

Source: Internet
Author: User

This lesson proves that the ratio of the first fit algorithm to bin packing problem is 1.7.

Averaging volume

If there are $n $ items, the volume of each item is 0.51, we can analyze the lower bound of the optimal objective function value at least about $n/2$. But the Nether is too loose (in fact the optimal target function value is $n $) and can only be used to prove that the approximate ratio is 2. How can we prove that the ratio is 1.7?

The clever mathematicians somehow thought of the method of "averaging volume". Set $i $ item volume for $a _i$, define weight $w (a_i) $ as follows: $ $w (a_i) = \frac{6}{5}a_i + V (a_i) $$ called $v $ for bonus, defined as: $ $v (a_i) = \begin{cases} 0 &am P a_i \le \frac{1}{6} \ \frac{3}{5} (A_i-\frac{1}{6}) & \frac{1}{6} < a_i \le \frac{1}{3} \ \frac{1}{10} & \FR AC{1}{3} < a_i \le \frac{1}{2} \ \frac{2}{5} & a_i > \frac{1}{2} \end{cases}$$

Proof ideas

Note $w (i) $ for one instance of bin packing $I the sum of the weights of the $, $\text{ff} (i) $ represents the value of the target function $I the first fit algorithm, $\text{opt} (i) $ represents the optimal objective function value of the instance $I $.

Again $B $ for the first fit algorithm to get the scheme, $B ^*$ for the optimal scheme, $c (B_j) $ represents the sum of the volume of items in the bin $j $, $w (B_j) $ represents the sum of the weights of the items in the bin $j $.

We easily get the following equation $ $w (i) = \sum\limits_{i=1}^n W (a_i) = \sum\limits_{j=1}^{\text{ff} (i)}w (b_j) = \sum\limits_{j=1}^{\text{opt } (I)}w (B^*_j) $$

If we can prove $\forall C (b^*_j) \le 1, W (b^*_j) \le 1.7$, according to $w (i) = \sum\limits_{j=1}^{\text{opt} (i)}w (B^*_j) $, we can get $w (i) \le 1.7\text{opt} (i) $; if we can prove that all $w (B_j) $ has a mean value of at least 1, then according to $w (i) = \sum\limits_{j=1}^{\text{ff} (i)}w (B_j) $, we can prove $\text{ff } (i) \le W (i) \le 1.7\text{opt} (i) $. But here we have to prove a weaker conclusion: except for two bins, the average value of the bin $w (B_j) $ is at least 1. As we will see later, this conclusion will deduce that $\text{ff} (i) \le W (i) + 0.8 \le 1.7\text{opt} (i) + 0.8$ can prove the approximate ratio of first fit algorithm 1.7.

The first step: proving that the averaging volume does not exceed 1.7

The proof of the first step is relatively easy, according to the definition of weight can be deduced directly. For a bin, the following scenarios are discussed.

1. If all items volume $c $ $c \le \frac{1}{6}$

In this case, the bin weight is 1.2 times times the total volume of the item in the bin, not more than 1.7.

2. If there is an item volume $c $ $\frac{1}{6} < C \le \frac{1}{2}$

Obviously, there are up to 5 of these items in a bin, so the bonus will not exceed $\frac{1}{10} \times 5 = \frac{1}{2}$, and the weights will not exceed 1.7.

3. If there are two items of volume $c _1$ and $c _2$ have $c _1 > \frac{1}{2}$ and $\frac{1}{3} < c_2 \le \frac{1}{2}$

Obviously, the volume of other items will not exceed $\frac{1}{6}$, no bonus, $c _1$ and $c _2$ bring bonus just 0.5, weight will not exceed 1.7.

4. If there are three items of volume $c _1$, $c _2$ and $c _3$ have $c _1 > \frac{1}{2}$,$\frac{1}{6} < c_2, c_3 \le \frac{1}{3}$ and $c _2 + C_3 < \ frac{1}{2}$

Obviously, the volume of other items will not exceed $\frac{1}{6}$, no bonus; $c _2$ and $c _3$ bring bonus to $\frac{3}{5} (c_2-\frac{1}{6}) + \frac{3}{5} (C_3-\fra C{1}{6}) < 0.1$, plus the bonus 0.4 brought by $c _1$, weighs no more than 1.7.

Step two: Prove that the other bin weights are at least 1 in addition to the two bin values

We first remove the bin with a weight of at least 1, considering those with less than 1 of the weight. It is easy to prove that a bin with a weight of less than 1 has the following properties:

1. Does not contain a volume of at least 0.5 items;

2. A bin will not contain two items with a volume of at least 1/3;

3. The volume of the bin is less than 5/6.

This makes it easy to launch:

1. In addition to the last bin, there are at least two items in the other bin;

2. In addition to the last two bins, the sum of the other bins is greater than 2/3 (if there is a bin with a volume of not more than 2/3, because it is the first fit algorithm, the volume in the back bin must be at least 1/3 but less than 1/2, and at least two bin at the back, which violates "A bin will not contain two items with a volume of at least 1/3" is reversed.

The following proves a lemma: If two bin $B _1$ and $B _2$ meet $B _1$ in front of $B _2$, $w (b_1), W (b_2) < 1$, $c (b_1) \ge \frac{2}{3}$ and $B _2$ have at least two items, then $\ Frac{6}{5}c (b_1) + V (b_2) \ge 1$.

The lemma proves that only the volume of the smallest item in the $B _2$ $c ' $ can be discussed:

First of all, $c ' \ge \frac{1}{6}$, otherwise $B _1$ will be "bin volume and less than 5/6" nature contradictions;

Second, $ C ' < \frac{1}{3}$, otherwise $B _2$ will be inconsistent with the nature of "an item in a bin that will not contain two volumes of at least 1/3";

In addition, $c ' > 1-c (b_1) $, otherwise $c ' $ will be put into $B _1$.

Then there may only be $\frac{1}{6} \le C ' < \frac{1}{3}$, then $$\begin{matrix} & \frac{6}{5}c (b_1) + V (b_2) \ \ge & \frac{6}{5}c (b_1) + 2 \times V (c ') \ > & \frac{6}{5}c (b_1) + \frac{6}{5} (1-c (b_1)-\frac{1}{6}) \ \ = & 1\end{matrix}$$

Assuming that the first fit gets the scheme, the weight of the bin is less than 1 in order $B _1, b_2, \dots, b_k$, then $$\begin{matrix} & W (b_1) + W (b_2) + \dots + W (b_{ K-2}) + W (b_{k-1}) + W (b_k) \ \ = & V (b_1) + (\frac{6}{5}c (b_1) + V (b_2)) + \dots + (\frac{6}{5}c (b_{k-2}) + V (b_{k-1}) ) + (\frac{6}{5}c (b_{k-1}) + \frac{6}{5}c (b_k)) + V (b_k) \ \ge & (k-2) + \frac{6}{5} \end{matrix}$$ that is, in addition to the last two bins, its It has a value of at least 1 of the bin weight. Add another 0.8, plus the weight value is at least 1 of the bin, then all the bin weight value is at least 1. This completes the proof that the gradient ratio is 1.7.

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

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.