Skip to main content

Family 5 · OR Problem Family

Location & Covering

Problems of selecting candidate sites to open or activate, to optimally serve demand points according to criteria of coverage, distance, or cost.

Uncapacitated Facility Location

UFLP — min ∑ fiyi + ∑ cijxij
16 Tests 8 Algorithms 1 Variant (CFLP) NP-hard — 1.488-approx (Li, 2013)

Given m potential facility sites with opening costs fi and n customers with assignment costs cij, select which facilities to open and assign each customer to an open facility to minimize total fixed plus assignment cost. Also known as the Simple Plant Location Problem (SPLP) in the European literature, this is a fundamental model for discrete location theory appearing in network design, service facility siting, server placement, and distribution logistics. The best polynomial-time approximation ratio is 1.488, close to the inapproximability threshold of 1.463 established by Guha & Khuller (1998).

Mathematical Formulation min ∑i=1..m fi yi + ∑ij cij xij
s.t. ∑i=1..m xij = 1   ∀ j   (each customer assigned to exactly one facility)
     xij ≤ yi   ∀ i, j   (assign only to open facilities)
     yi ∈ {0, 1},   xij ∈ {0, 1}
NP-Hard Facility Siting MILP 1.488-Approx Primal-Dual OR-Library
Algorithm Type Complexity Reference
Greedy Add Heuristic O(m² · n) Iterative facility opening
Greedy Drop Heuristic O(m² · n) Iterative facility closing
Local Search (LS) Metaheuristic Varies Add/drop/swap, best-improvement
Simulated Annealing Metaheuristic Varies Toggle/swap, Boltzmann acceptance
Tabu Search Metaheuristic Varies Sun (2006), aspiration criterion
Iterated Greedy Metaheuristic Varies Destroy-repair with acceptance
Genetic Algorithm Metaheuristic Varies Binary encoding, uniform crossover
VNS Metaheuristic Varies Mladenovic & Hansen (1997)
View Facility Location Source

p-Median Problem

PMP — min ∑j wj mini dij   s.t. |S| = p
13 Tests 8 Algorithms 1 Variant (Capacitated) NP-hard for general p

Open exactly p facilities from m candidates to minimize total weighted distance from n demand points to their nearest open facility. Unlike the UFLP, there are no fixed opening costs — the constraint is on the number of facilities. Introduced by Hakimi (1964) for optimal switching center placement, the p-Median is a cornerstone of discrete location theory with applications in public facility siting, emergency service placement, and distribution network design. NP-hard for general p (Kariv & Hakimi, 1979).

Mathematical Formulation min ∑i=1..mj=1..n wj dij xij
s.t. ∑i=1..m xij = 1   ∀ j   (each customer assigned)
     xij ≤ yi   ∀ i, j   (assign to open facilities)
     ∑i=1..m yi = p   (exactly p facilities)
     yi ∈ {0, 1},   xij ∈ {0, 1}
NP-Hard Weighted Distance Cardinality Constraint Interchange Heuristic
Algorithm Type Complexity Reference
Greedy Heuristic O(p · m · n) Iterative cost-reducing facility opening
Teitz-Bart Interchange Heuristic O(p · (m−p) · n) Teitz & Bart (1968)
Local Search Metaheuristic Varies Swap open/closed facility
Simulated Annealing Metaheuristic Varies Swap with Boltzmann acceptance
Tabu Search Metaheuristic Varies Facility swap with tabu memory
Iterated Greedy Metaheuristic Varies Close facilities + greedy reopen
Genetic Algorithm Metaheuristic Varies Binary/subset encoding
VNS Metaheuristic Varies 1-swap → 2-swap → block-swap
View p-Median Source

Hub Location Problem

p-Hub Median — min ∑i,j Wij [Di,h(i) + α · Dh(i),h(j) + Dh(j),j]
Tests 3 Algorithms NP-hard (O'Kelly, 1987)

Given n nodes with inter-node flows Wij and distances Dij, select p hub nodes and assign each non-hub to a hub (single allocation). Flows between origin-destination pairs are routed through hubs, with inter-hub transportation receiving a discount factor α < 1 reflecting economies of scale from consolidation. Applications include airline hub-and-spoke networks, postal sorting centers, telecommunications backbone design, and freight distribution systems.

Single-Allocation Cost Model min ∑ij Wij · [ Di,h(i) + α · Dh(i),h(j) + Dh(j),j ]
s.t. h(i) ∈ H   ∀ i   (each node assigned to a hub)
     |H| = p   (exactly p hubs selected)
     α ∈ (0, 1)   (inter-hub discount factor)
NP-Hard Hub-and-Spoke Flow Routing Economies of Scale Single Allocation
Algorithm Type Complexity Reference
Enumeration Exact O(C(n,p) · n²) All p-subsets; feasible for small n
Greedy Hub Selection Heuristic O(n² · p) Greedily open cost-minimizing hubs
Simulated Annealing Metaheuristic Varies Hub swap with Boltzmann acceptance
View Hub Location Source

Maximum Coverage Problem

MaxCov — max |∪i ∈ T Si|   s.t. |T| ≤ k
Tests 3 Algorithms NP-hard — (1−1/e)-approx optimal

Given a universe U of n elements and a collection of m subsets, select at most k subsets to maximize the number of covered elements. The coverage function is monotone and submodular, which guarantees the greedy algorithm achieves a (1 − 1/e) ≈ 0.632 approximation ratio — the best possible for any polynomial-time algorithm under standard complexity assumptions (Feige, 1998). Maximum coverage is the dual perspective of set cover: instead of minimizing cost to cover everything, it maximizes coverage under a budget constraint. Applications include facility placement, sensor deployment, advertising reach, and influence maximization in social networks.

Mathematical Formulation max |∪i ∈ T Si|
s.t. |T| ≤ k   (budget constraint on selected subsets)
     T ⊆ {1, …, m}
NP-Hard Submodular (1−1/e)-Approx Greedy Optimal Sensor Placement
Algorithm Type Complexity Reference
Greedy Coverage Heuristic O(k · m · n) Nemhauser, Wolsey & Fisher (1978)
LP Relaxation + Rounding Heuristic O(LP) Round variables exceeding threshold
Local Search Metaheuristic O(k · m · n) per swap Swap selected/unselected subsets
View Max Coverage Source

Set Covering Problem

SCP — min ∑ cj xj   s.t. ∀ i ∈ U : covered
Tests 4 Algorithms NP-hard — ln(m)+1 greedy approx

Given a universe U = {1, …, m} and a collection of n subsets Sj with costs cj, select a minimum-cost sub-collection such that every element in U is covered by at least one selected subset. The greedy algorithm that repeatedly selects the subset with the lowest cost per newly covered element achieves an H(m) = ln(m) + 1 approximation ratio — the best possible unless P = NP (Feige, 1998). Set covering is one of Karp's 21 NP-complete problems and arises in crew scheduling, facility placement, logical test design, and wireless base station deployment.

Mathematical Formulation min ∑j=1..n cj xj
s.t. ∑j: i ∈ Sj xj ≥ 1   ∀ i ∈ U   (every element covered)
     xj ∈ {0, 1}   ∀ j
NP-Hard Karp's 21 ln(m)+1 Approx ILP Lagrangian Relaxation Crew Scheduling
Algorithm Type Complexity Reference
ILP (HiGHS) Exact Exponential MILP via scipy.optimize.milp
Greedy Set Cover Heuristic O(m · n) Chvatal (1979), ln(m)+1 approx
LP Relaxation + Rounding Heuristic O(LP) Round above 1/f threshold
Lagrangian Relaxation Heuristic O(n · T) Beasley (1990), subgradient optimization
View Set Covering Source

Maximum Weight Set Packing

SetPack — max ∑ wi xi   s.t. pairwise disjoint
Tests 3 Algorithms NP-hard — 1/k greedy approx

Given a universe U, a collection of m subsets Si with weights wi, select a sub-collection of pairwise disjoint subsets to maximize total weight. Set packing is the dual of set cover: cover seeks the cheapest way to cover all elements, while packing seeks the heaviest collection of non-overlapping sets. On the conflict graph (where nodes are subsets and edges connect intersecting subsets), set packing is equivalent to the Maximum Weight Independent Set (MWIS) problem. Applications include scheduling non-conflicting meetings, assigning non-overlapping frequency bands, and organ donor-recipient matching.

Mathematical Formulation max ∑i=1..m wi xi
s.t. xi + xj ≤ 1   ∀ i, j where Si ∩ Sj ≠ ∅   (pairwise disjoint)
     xi ∈ {0, 1}   ∀ i
NP-Hard Dual of Set Cover 1/k-Approx Conflict Graph Independent Set
Algorithm Type Complexity Reference
Greedy Set Packing Heuristic O(m log m + m · |U|) Hurkens & Schrijver (1989), 1/k-approx
ILP Formulation Exact Exponential Binary IP with conflict constraints
Local Search Metaheuristic Varies Swap/add/drop on selected subsets
View Set Packing Source

Key References

  • Hakimi, S.L. (1964). Optimum locations of switching centers and the absolute centers and medians of a graph. Operations Research, 12(3), 450–459.
  • Teitz, M.B. & Bart, P. (1968). Heuristic methods for estimating the generalized vertex median of a weighted graph. Operations Research, 16(5), 955–961.
  • Cornuejols, G. et al. (1977). Location of bank accounts to optimize float. Management Science, 23(8), 789–810.
  • Nemhauser, G.L., Wolsey, L.A. & Fisher, M.L. (1978). An analysis of approximations for maximizing submodular set functions. Math. Programming, 14(1), 265–294.
  • Chvatal, V. (1979). A greedy heuristic for the set-covering problem. Math. Oper. Res., 4(3), 233–235.
  • Kariv, O. & Hakimi, S.L. (1979). An algorithmic approach to network location problems. SIAM J. Applied Math., 37(3), 539–560.
  • O'Kelly, M.E. (1987). A quadratic integer program for the location of interacting hub facilities. Eur. J. Oper. Res., 32(3), 393–404.
  • Hurkens, C.A.J. & Schrijver, A. (1989). On the size of systems of sets every t of which have an SDR. SIAM J. Discrete Math., 2(1), 68–72.
  • Beasley, J.E. (1990). OR-Library: Distributing test problems by electronic mail. J. Oper. Res. Soc., 41(11), 1069–1072.
  • Campbell, J.F. (1994). Integer programming formulations of discrete hub location problems. Eur. J. Oper. Res., 72(2), 387–405.
  • Shmoys, D.B., Tardos, E. & Aardal, K. (1997). Approximation algorithms for facility location problems. Proc. 29th ACM STOC, 265–274.
  • Feige, U. (1998). A threshold of ln n for approximating set cover. J. ACM, 45(4), 634–652.
  • Jain, K. & Vazirani, V.V. (2001). Approximation algorithms for metric facility location and k-median problems. J. ACM, 48(2), 274–296.
  • Reese, J. (2006). Solution methods for the p-median problem: An annotated bibliography. Networks, 48(3), 125–142.
  • Li, S. (2013). A 1.488 approximation algorithm for the uncapacitated facility location problem. Information and Computation, 222, 45–58.
  • Daskin, M.S. (2013). Network and Discrete Location: Models, Algorithms, and Applications, 2nd ed. Wiley.