DM811 - Heuristics for Combinatorial Optimization
Sheet 3, Autumn 2011 [pdf format]

This is a list of exercises that will be treated in class in the next sessions on Examples. It maybe good going through them before coming to the classes.

1  Exercise

Consider a local search algorithm for GCP that uses the strategy k fixed/complete/unproper. That is, it solves a sequence of decision k-coloring problems with candidate solution any complete, possibly improper, assignment of colors to vertices. The neighborhood operator is the one-exchange and the evaluation function is the number of edges in conflict. How can we achieve a O(nk) complexity to choose the best improvement at each step of the local search?

2  Exercise

Consider the Max k-SAT problem and a local search on the one-flip neighborhood with best improvement strategy. Indicate which auxiliary data structures can be maintained to speed up each step. Provide a computational analysis.

3  Exercise

A possible application of local search to the GCP defines the following:

Show that any local optimum of this function corresponds to a feasible coloring. Does a global optimum correspond to a coloring that uses the minimal possible number of colors?

4  Exercise

p-Median Problem

Input: A set U of locations for n users, a set F of locations for m facilities and a distance matrix D=[dij] ∈ Rn× m.

Task: Select a set JF of p locations where to install facilities such that the sum of the distances of each user to its closest installed facility is minimized, i.e.,

min

 
i ∈ U
 
 
min
j ∈ J
 dij   |  J ⊆ F   and   |J|=p


Design construction heuristics and local search algorithms.

5  Exercise

Set Covering

Input: Collection C of subsets of a finite set S and a weight function ω: CR.

Task: Find a set cover for S, i.e., a subset C′⊆ C such that every element in S belongs to at least one member of C′ and the sum of the costs associated with the subsets in C′ is minimal.

Is this problem NP-hard? If the problem is NP-hard, design at least one construction heuristic and at least one local search (solution representation + neighborhood + evaluation function).

6  Exercise

Make a randomized version of the construction heuristic designed in the previous exercise.

7  Exercise

Set Problems



Set Covering
min
n
j=1
 cj xj
 
n
j=1
 aij xj ≥ 1     ∀ i
 xj ∈ {0,1}
Set Partitioning
min
n
j=1
 cj xj
 
n
j=1
 aij xj = 1     ∀ i
 xj ∈ {0,1}
Set Packing
max
n
j=1
 cj xj
 
n
j=1
 aij xj ≤ 1    ∀ i
 xj ∈ {0,1}


Design a simple construction heuristic and a simple local search algorithm for these problems.

8  Exercise

Bin Packing Problem

Input: A finite set U of items, a size s(u) ∈ Z+ for each uU, and a positive integer bin capacity B.

Task: Find the minimal number of bins K for which there exits a partition of U into disjoint sets U1, U2, …,Uk and the sum of the sizes of the items in each Ui is B or less.

Two-dimensional bin packing

Input: A finite set U of rectangular items, each with a width wuZ+ and a height huZ+, uU, and an unlimited number of identical rectangular bins of width WZ+ and height HZ+.

Task: Allocate all the items into a minimum number of bins, such that the bin widths and heights are not exceeded and the original orientation is respected (no rotation of the items is allowed).

  1. Discuss differences between the Bin packing problem and the Knapsack problem.
  2. Design construction heuristics for the 1D and 2D Bin Packing problems
  3. Consider the extension of the Bin Packing problem in which bins have variable size. More precisely, each bin in the set B is of a different type k and for each type we are given a cost ck and a capacity Wk. We are asked to minimize the total cost of used bins. Modify the heuristics at the previous point to handle this version of the problem.

9  Exercise

Make a Venn diagram (set diagram) representing the relation between the following classes of algorithms: construction heuristics (CH), metaheuristics (MH), local search (LS), stochastic local search (SLS), best improvement (BI), iterative improvement (II), first improvement (FI), uninformed random walk (RW), beam search (BS), rollout (RO), iterated greedy (IG), iterated local search (ILS).

10  Exercise

Compare the pivot rules in tabu search and in simulated annealing. Think about computational issues and devise a guideline about the situations in which one or the other metaheuristic may be more appropriate.

11  Exercise

Design a tabu search algorithm for the single machine total weighted tardiness problem using all three neighborhoods discussed in class.

12  Exercise

Graph Partitioning Problem

Input: A graph G=(V,E), weights w(v) ∈ Z+ for each vV and l(e) ∈ Z+ for each eE.

Task: Find a partition of V into disjoint sets V1,V2,…,Vm such that ∑vVi w(v) ≤ K for 1≤ im and such that if E′ ⊆ E is the set of edges that have their two endpoints in two different sets Vi, then ∑eEl(e) is minimal.

Consider the specific case of graph bipartitioning, that is, the case |V|=2n and K=n and w(v)=1, ∀ vV.

  1. Design a local search algorithm by defining the solution representation and the neighborhood function.
  2. Determine the size of the search space, the size of the neighborhood and the computational cost of a step in the local search algorithm.
  3. Show that, by maintaining appropriate data, it is possible to calculate the cost of a swap of vertices between the two partitions in constant time and that the update of the auxiliary data can also be made in constant time.

13  Exercise

Linear Ordering Problem

The two following problems are equivalent.

Input: an n × n matrix C


Task: Find a permutation π of the column and row indices {1,…,n} such that the value

f(π)=
n
i=1
 
n
j=i+1
 cπiπj

is maximized. In other terms, find a permutation of the columns and rows of C such that the elements in the upper triangle is maximized.



Feedback arc set problem (FASP)

Input: A directed graph D=(V,A), where V={1,2,…,n}, and arc weights cij for all [ij] ∈ A


Task: Find a permutation π1, π2, … πn of V (that is, a linear ordering of V) such that the total costs of those arcs [πjπi] where j>i (that is, the arcs that point backwards in the ordering)

f(π)=
n
i=1
 
n
j=i+1
 cπjπi

is minimized.


Design a simple construction heuristic and a simple local search algorithm.

14  Exercise

Quadratic Assignment Problem

Input: A set of n locations with a matrix D=[dij] ∈ Rn× n of distances and a set of n units with a matrix F=[fkl]∈ Rn× n of flows between them

Task: Find the assignment σ of units to locations that minimizes the sum of products between flows and distances, i.e.,

 
min
σ ∈ Σ
 
 
i,j
 fij dσ(i)σ(j)


Define solution representation, evaluation function and neighborhood for a local search algorithm. Make a computational analysis and show that a single neighbor can be evaluated in O(n).

15  Exercise

Graph Partitioning Problem

Input: A graph G=(V,E), weights w(v) ∈ Z+ for each vV and l(e) ∈ Z+ for each eE.

Task: Find a partition of V into disjoint sets V1,V2,…,Vm such that ∑vVi w(v) ≤ K for 1≤ im and such that if E′ ⊆ E is the set of edges that have their two endpoints in two different sets Vi, then ∑eEl(e) is minimal.

Consider the specific case of graph bipartitioning, that is, the case |V|=2n and K=n and w(v)=1, ∀ vV.

  1. Design a local search algorithm by defining the solution representation and the neighborhood function.
  2. Determine the size of the search space, the size of the neighborhood and the computational cost of a step in the local search algorithm.
  3. Show that, by maintaining appropriate data, it is possible to calculate the cost of a swap of vertices between the two partitions in constant time and that the update of the auxiliary data can also be made in constant time.

16  Exercise

Consider the following design problem: Dispose on a 8x8 board numbers from 1 to 256 in such a way that each number is placed only once and that the binary representaiton of the numbers have the minimum Hamming distance in the neighborhood, that is, the largest distance from any of the numbers in the 8 neighboring cells. Design a tabu search algorithm.