# 组合数学 (Fall 2011)/Optimization

## Contents

## Duality

Consider the following LP:

Let be the value of the optimal solution. We want to estimate the upper and lower bound of .

Since is the minimum over the feasible set, every feasible solution forms an upper bound for . For example is a feasible solution, thus .

For the lower bound, the optimal solution must satisfy the two constraints:

Since the 's are restricted to be nonnegative, term-by-term comparison of coefficients shows that

The idea behind this lower bound process is that we are finding suitable nonnegative multipliers (in the above case the multipliers are all 1s) for the constraints so that when we take their sum, the coefficient of each in the sum is dominated by the coefficient in the objective function. It is important to ensure that the multipliers are nonnegative, so they do not reverse the direction of the constraint inequality.

To find the best lower bound, we need to choose the multipliers in such a way that the sum is as large as possible. Interestingly, the problem of finding the best lower bound can be formulated as another LP:

Here and were chosen to be nonnegative multipliers for the first and the second constraint, respectively. We call the first LP the **primal program** and the second LP the **dual program**. By definition, every feasible solution to the dual program gives a lower bound for the primal program.

### LP duality

Given an LP in canonical form, called the **primal** LP:

the **dual** LP is defined as follows:

We then give some examples.

- Surviving problem (diet problem)

Let us consider the surviving problem. Suppose we have types of natural food, each containing up to types of vitamins. The th food has amount of vitamin , and the price of the th food is . We need to consume amount of vitamin for each to keep a good health. We want to minimize the total costs of food while keeping healthy. The problem can be formalized as the following LP:

The dual LP is

The problem can be interpreted as follows: A food company produces types of vitamin pills. The company wants to design a pricing system such that

- The vitamin has a nonnegative price .
- The price system should be competitive to any natural food. A costumer cannot replace the vitamins by any natural food and get a cheaper price, that is, for any .
- The company wants to find the maximal profit, assuming that the customer only buy exactly the necessary amount of vitamins ( for vitamin ).

- Maximum flow problem

In the last lecture, we defined the maximum flow problem, whose LP is

where directed graph is the flow network, is the source, is the sink, and is the capacity of directed edge .

We add a new edge from to to , and let the capacity be . Let be the new edge set. The LP for the max-flow problem can be rewritten as:

The second set of inequalities seem weaker than the original conservation constraint of flows, however, if this inequality holds at every node, then in fact it must be satisfied with equality at every node, thereby implying the flow conservation.

To obtain the dual program we introduce variables and corresponding to the two types of inequalities in the primal. The dual LP is:

It is more helpful to consider its integer version:

In the last lecture, we know that the LP for max-flow is totally unimordular, so is this dual LP, therefore the optimal solutions to the integer program are the optimal solutions to the LP.

The variables defines a bipartition of vertex set . Let . The complement .

For 0/1-valued variables, the only way to satisfy is to have and . Therefore, is an - cut.

In an optimal solution, if and only if and . Therefore, the objective function of an optimal solution is the capacity of the minimum - cut .

### Duality theorems

Let the primal LP be:

Its dual LP is:

**Theorem**- The dual of a dual is the primal.

**Proof.**The dual program can be written as the following minimization in canonical form:

Its dual is:

which is equivalent to the primal:

We have shown that feasible solutions of a dual program can be used to lower bound the optimum of the primal program. This is formalized by the following important theorem.

**Theorem (Weak duality theorem)**- If there exists an optimal solution to the primal LP:
- then,

- If there exists an optimal solution to the primal LP:

**Proof.**Let be an arbitrary feasible solution to the primal LP, and be an arbitrary feasible solution to the dual LP.

We estimate in two ways. Recall that and , thus

- .

Since this holds for any feasible solutions, it must also hold for the optimal solutions.

A harmonically beautiful result is that the optimums of the primal LP and its dual are equal. This is called the strong duality theorem of linear programming.

**Theorem (Strong duality theorem)**- If there exists an optimal solution to the primal LP:
- then,

- If there exists an optimal solution to the primal LP:

## Unimodularity

### Integer Programming

Consider the **maximum integral flow** problem: given as input a flow network where for every the capacity is integer. We want to find the integral flow with maximum value.

The mathematical programming for the problem is:

where is the set of all nonnegative integers. Compared to the LP for the max-flow problem, we just replace the last line with . The resulting optimization is called an **integer programming (IP)**, or more specific **integer linear programming (ILP)**.

Due to the Flow Integrality Theorem, when capacities are integers, there must be an integral flow whose value is maximum among all flows (integral or not). This means the above IP can be efficiently solved by solving its LP-relaxation. This is usually impossible for general IPs.

Generally, an IP of canonical form is written as

Consider the **3SAT** problem. Each instance is a **3CNF(conjunctive normal form)**: , where each is a **clause** and each , called a **literal**, is either a boolean variable or a negation of a boolean variable. We want to determine whether there exists an truth assignment of the boolean variables such that the input formula is satisfied (i.e., is true).

The following IP solves 3SAT:

Since 3SAT is NP-hard (actually it is the first problem known to be NP-hard), generally IP is NP-hard.

### Integrality of polytopes

A point in an -dimensional space is integral if it belongs to , i.e., if all its coordinates are integers.

A polyhedron is said to be **integral** if all its vertices are integral.

An easy observation is that an integer programming has the same optimal solutions as its LP-relaxation when the polyhedron defined by the LP-relaxation is integral.

**Theorem (Hoffman 1974)**- If a polyhedron is integral then for all integer vectors there is an optimal solution to which is integral.

**Proof.**There always exists an optimal solution which is a vertex in . For integral , all vertices are integral.

### Unimodularity and total unimodularity

**Definition (Unimodularity)**- An integer matrix is called
**unimodular**if . - An integer matrix is called
**total unimodular**if every square submatrix of has , that is, every square, nonsingular submatrix of is unimodular.

- An integer matrix is called

A totally unimodular matrix defines a integral convex polyhedron.

**Theorem**- Let be an integer matrix.
- If is totally unimodualr, then for any integer vector the polyhedron is integral.

**Proof.**Let be a basis of , and let be the corresponding coordinates in . A basic solution is formed by and zeros. Since is totally unimodular and is a basis thus nonsingular, . By Cramer's rule, has integer entries, thus is integral. Therefore, any basic solution of is integral, which means the polyhedron is integral.

Our next result is the famous Hoffman-Kruskal theorem.

**Theorem (Hoffman-Kruskal 1956)**- Let be an integer matrix.
- If is totally unimodualr, then for any integer vector the polyhedron is integral.

**Proof.**Let . We claim that is also totally unimodular. Any square submatrix of can be written in the following form after permutation:

where is a square submatrix of and is identity matrix. Therefore,

- ,

thus is totally unimodular.

Add slack variables to transform the constraints to the standard form . The polyhedron is integral if the polyhedron is integral, which is implied by the total unimodularity of .

## Matroid

The matroid is a structure shared by a class of optimization problems for which greedy algorithms work.

### Kruskal's greedy algorithm for MST

For the **minimum-weight spanning tree (MST)** problem. We are given a connected undirected graph with positive edge weights , and want to find a spanning tree of the minimum accumulated weight .

We consider the equivalent maximum problem to find a spanning tree with maximum weight. To see this makes the problem no harder, we can replace the weight for every edge by , where is a sufficient large constant which is greater than all weights. The minimum-weight spanning tree for the modified weight is the maximum-weight spanning tree for the original weight.

The following greedy algorithm solves the maximum-weight spanning tree problem.

**Kruskal's Algorithm**- ;
- while that is forest
- pick such with maximum ;
- ;

It is not hard to verify the correctness of this greedy algorithm. But we are more interested in the general framework underlying this algorithm.

### Matroids

Let be a finite set and be a family of subsets of . A member set is called **maximal** if for any .

For , denote . Obviously,.

**Definition**- A set system is a
**matroid**if it satisfies:- (hereditary) if then ;
- (matroid property) for every , all maximal have the same .

- A set system is a

Suppose is a matroid. Some matroid terminologies:

- Each member set is called an
**independent set**. - A maximal independent subset of a set , i.e., a maximal , is called a
**basis**of . - The size of the maximal is called the
**rank**of , denoted .

#### Graph matroids

Let be a graph. Define a set system with ground set as

That is, is the set of all forests in .

We claim that is a matroid.

First, is hereditary since any subgraph of a forest must also be a forest.

We then verify the matroid property of . Let be an arbitrary subgraph of . Suppose has connected components. For any maximal forest in (i.e., is a spanning forest in ), it holds that . In other words, for any , all maximal member of have the same cardinality.

Therefore, is a matroid. Each independent set (of matroid) is a forest in . For any subgraph , the rank of is the size of a spanning forest of .

#### Linear matroids

Let be an matrix. Define a set system as

is hereditary since every any subset of a set of linearly independent vectors is still linearly independent.

For any subset of columns of . Let be the submatrix composed by these columns. Then contains all sets of linearly independent columns of . Clearly, all maximal such sets have the same size, which is the column-rank of .

Therefore, is a matroid. Each independent set (of matroid) is a linearly independent set of columns of matrix . For any set of columns of matrix , the rank of is the column-rank of the submatrix defined by the columns in .

### Weighted matroid maximization

Consider the following **weighted matroid maximization** problem. Let be a matroid. We define positive weights of elements in . Our goal is to find an independent set with the maximum accumulated weight .

We then introduce the Greedy Algorithm which finds the maximum-weight independent set.

**Greedy Algorithm**- ;
- while with
- choose such with maximum ;
- ;

The correctness of the greedy algorithm is due to the next theorem.

**Theorem (Rado 1957; Edmonds 1970)**- The greedy algorithm finds an independent set with the maximum weight.

**Proof.**Suppose the theorem is false. Let be the independent set returned by the greedy algorithm and let be a maximum-weight independent set.

Suppose , where the s are chosen by the algorithm in that order. Then it is easy to see that .

Suppose , where .

Choose the least index such that . If none exists, then we must have ; in this case we can let .

In either case we know that the greedy algorithm did not add any of in step . Since what it did choose has smaller weight, it must be that , for , has the property either that or that . In other words, is a basis of . But this contradicts the matroid property, since , being a subset of , is also an independent subset of and is larger.