This document describes the MaxMin Diversity Problem and the design of the algorithm used to solve it. The implementation details are covered in the MMDP implementation notes.
Given a set of n elements and a distance value for every pair of elements, the
MaxMin Diversity Problem (MMDP) consists of selecting a subset of m elements
(m < n) such that the smallest pairwise distance among the selected elements
is as large as possible. The definition of distance depends on the specific
application.
- Solution structure: an unordered subset of exactly
melements out of thenavailable in the instance. - Constraints: the subset must contain exactly
melements; bothnandmare fixed by the instance being solved. - Objective function: the minimum pairwise distance among every pair of selected elements.
- Optimization sense: maximization of a minimum (a maximin objective) — solutions are compared by how large their worst (smallest) pairwise distance is.
This differs from the closely related Maximum Diversity Problem (MDP), whose objective is the sum of the pairwise distances instead of their minimum.
Letting
Two instance sets are used: GKD-Ia (small instances, with n between 10 and
30 and various values of m, easier to solve) and GKD-Ic (larger instances,
n = 500, m = 50, requiring more computational effort). Both sets share the
same file format:
- A first line with the values of
nandm. - One line per pair of elements, giving the indices of the two elements and the distance between them. There is one distance for every pair of elements.
10 2
0 1 166.47234
0 2 170.18475
0 3 174.55453
0 4 153.28670
0 5 145.12186
...
The MMDP is solved with a multi-start local search: a random solution is built and (optionally) improved with a local search, and this is repeated many times within a time budget, keeping the best solution found across all restarts. Four configurations are compared experimentally, differing in how each restart is improved.
The constructive method builds a feasible solution by selecting m elements out
of the n available, chosen uniformly at random (no objective information is
used). In the implementation, the node list is shuffled and the first m nodes
are taken.
The local search explores a swap neighborhood: a move replaces one selected element with one that is not currently selected. Each candidate move is evaluated by recomputing the objective (the minimum pairwise distance) of the resulting subset; a move is improving when it increases that value.
Two classic neighborhood-exploration strategies are compared:
- Best improvement: the whole neighborhood is built and the move that improves the solution the most is applied. This repeats from the resulting solution until no improving move exists.
- First improvement: the first move found that improves the current solution is applied immediately, without examining the rest of the neighborhood. This repeats until no improving move exists.
For first improvement, the order in which candidates are visited matters. If the order is always lexicographical (smaller indices first), the search explores more exhaustively the region where low-index elements are selected, and is unlikely to reach other regions that might contain the optimum. For this reason the candidate order is often randomized so that all regions of the search space are visited with similar probability. Both a lexicographical and a random candidate order are compared.
Four configurations are run and compared:
| Configuration | Construction | Improvement |
|---|---|---|
| Random | random selection | none |
| First improvement (random) | random selection | first improvement, random candidate order |
| First improvement (lexicographical) | random selection | first improvement, lexicographical candidate order |
| Best improvement | random selection | best improvement |
The multi-start driver builds and improves solutions until a restart budget or a time limit is reached, keeping the best (here, "better" means a larger minimum pairwise distance, because the MMDP is a maximization problem):
Best improvement applies, at each step, the move with the largest improvement:
First improvement applies the first improving move found over the ordered candidates: