---
title: Online Facility Assignment Problem
url: https://www.emergentmind.com/topics/online-facility-assignment-problem
type: topic
---

# Online Facility Assignment Problem

The Online Facility Assignment Problem (OFA) is a central problem in online optimization, formalizing the scenario where a set of capacitated servers (facilities) are placed in a metric space, and customers (requests) arrive sequentially. Each arrival must be irrevocably assigned to a facility with available capacity, incurring assignment cost proportional to the metric distance; the goal is to minimize the total assignment cost compared to an omniscient offline optimum. The problem’s online nature, capacity constraints, and metric geometry give rise to rich algorithmic and analytical challenges, with strong dependency on the spatial layout, algorithm class, and adversarial strategies.

## 1. Formal Model and Variants

**Classical Setup:**  
Let $S = \{s_1, \ldots, s_k\} \subset X$ be facilities (servers) in a metric space $(X,d)$, each with capacity $c(s_j) \geq 1$. An online sequence of requests $\sigma = r_1, r_2, \dots, r_n$ (with $n \leq \sum_{s \in S} c(s)$) is revealed one at a time. On arrival of $r_i \in X$, the algorithm must immediately and irrevocably assign it to a free facility (one that has received fewer than $c(s)$ assignments), incurring cost $d(r_i, s)$. The assignment must respect server capacities: at most $c(s)$ requests may be matched to $s$.

**Objective:**  
Minimize total cost $\sum_{i=1}^n d(r_i,s_i)$, where $s_i$ is the facility to which request $r_i$ is assigned.

**Competitive Ratio:**  
An online algorithm $\text{ALG}$ is $\alpha$-competitive if, for every request sequence $\sigma$, $\text{ALG}(\sigma) \leq \alpha \cdot \text{OPT}(\sigma)$, where $\text{OPT}(\sigma)$ is the minimum-possible cost of the offline optimum with full knowledge of the sequence [2402.12734].

**Variants:**
- **Uniform capacity:** $c(s) = \ell$ for all $s$ (often denoted $\mathrm{OFAL}_{k, \ell}$).
- **Line metric:** Facilities are points on $\mathbb{R}$, often evenly spaced ($s_i = i-1$).
- **General metrics**, **planar/polygonal geometries**, **moving or dynamic facilities**, **weighted requests**, **congestion cost**, and **facility deletions** have all been studied as extensions [2504.04556, 2211.11961, 1807.03839].

## 2. Core Algorithmic Approaches

### Most-Preferred-Free-Server (MPFS) Framework

An online algorithm is in MPFS if, for each arriving request, it selects among the current free servers by a priority order depending only on request location (e.g., nearest neighbor), and assigns to the highest-ranked available one. Capacity-insensitivity: the competitive ratio for MPFS algorithms is the same for unit-capacity as for any $\ell \geq 1$ (the input decomposes into $\ell$ layers of unit-capacity problems) [2207.05308].

**Notable MPFS algorithms:**
- **Greedy (GRDY):** Assign request to nearest free server.
- **IDAS (Interior Division):** Uses a carefully chosen division point between every pair of adjacent servers, achieving optimal bounds among MPFS algorithms.
- **PTCP (Policy Transition at Critical Point):** Recursively splits the facility set at its widest gap, assigning according to partition and recursing, achieving layout-sensitive optimality [2308.05933].

### Permutation Algorithm (perm)

Simulates a monotone, incrementally-built offline optimum: for request $r_i$, constructs an offline optimum for $\{r_1,\ldots,r_i\}$ extending the previous assignment by one, and assigns $r_i$ to the server whose load increases [2402.12734].

### Capacity-Sensitive and Layout-Sensitive Methods

Beyond greedy, algorithms can exploit geometric asymmetry (e.g., exponential server spacings), or use facility- or capacity-sensitive Voronoi diagrams in the plane [2009.01446, 2504.04556].

## 3. Theoretical Bounds and Competitive Analysis

### Tight Competitive Ratios: Line Metric

- **General lower bounds:** For $k$ servers placed evenly on a line, no deterministic online algorithm can have competitive ratio less than $k+1$ for the permutation algorithm; specifically, for any $\varepsilon>0$ there is a sequence $\sigma$ with
  \[
  \frac{\mathrm{perm}(\sigma)}{\mathrm{opt}(\sigma)} \geq k+1 - \varepsilon
  \]
  This directly disproves previous $k$-competitive claims for perm and closes a long-standing gap [2402.12734].

- **GRDY and IDAS:** For equidistant servers, GRDY has $4k-5$ ratio, while IDAS is optimal among MPFS algorithms with $2k-1$. Lower bounds of $2k-1$ hold universally for MPFS; only non-MPFS algorithms might surpass this [2207.05308].
  
  | Algorithm | Competitive Ratio (equidistant, $k$ servers) |
  |-----------|----------------------------------------------|
  | perm      | $\geq k+1$                                   |
  | GRDY      | $4k-5$                                       |
  | IDAS      | $2k-1$ (optimal MPFS)                        |
  | PTCP      | $2\alpha(S)+1$ (with $\alpha(S)$ layout-sensitivity) |

- **Small $k$ (3,4,5):** Proven lower bounds for any deterministic algorithm are $1+\sqrt{6} > 3.44948$ for $k=3$, $(4+\sqrt{73})/3 > 4.18133$ for $k=4$, $13/3 > 4.333$ for $k=5$ [2008.08415].

### General Layout and Layout-Sensitive Bounds

Let $\alpha(S) := \max_{T\subset S, |T|\geq 2}\frac{\text{diam}(T)}{\max \text{adjacent gap in }T}$.
- **PTCP:** Achieves $2\alpha(S)+1$ competitive ratio, optimal in MPFS class [2308.05933].
- For even spacing ($\alpha(S) = k-1$), this matches $2k-1$. For clusters or exponentially spread servers, competitive ratio can be constant.

### Other Geometric Configurations

- **Regular $n$-gons (polygon/circle):** For $n$-gons and circles with uniform facility spacing, the greedy algorithm is $(2n-1)$-competitive; for $n$ facilities with linearly/exponentially growing chord lengths, ratios degrade to $n^2-n+1$ and $2^n-1$ respectively. Simplest geometries (triangles, rectangles) enjoy constant or near-linear ratios [2504.04556, 2512.00506].

## 4. Algorithms for General Metrics, Dynamic Models, and Extensions

- **General metrics:** On unweighted graphs, Optimal-Fill is strictly $2|F|$-competitive, tight [2009.01446].
- **Plane (Voronoi):** Capacity-sensitive Voronoi is $2n-1$-competitive for $n$ facilities.
- **Facility Deletions:** In dynamic models (allowing arrivals/departures), tight $O(\frac{\log n_{\text{act}}}{\log\log n_{\text{act}}})$ ratios are achieved in uncapacitated models via randomized coin-flip strategies. Capacitated dynamic variants require HST embeddings, with $O(\log m+\log c\log n_{\text{act}})$ bounds, where $m$ is the number of sites and $c$ is facility capacity [1807.03839].
- **Weights and Congestion:** For weighted requests or when congestion cost (number of assignments per facility) is convex, randomized variants of Meyerson’s algorithm achieve $O(\log n)$ (secretarial order) and $O(\log k^*/\log\log k^*)$ (congestion parameter $k^*$) competitive ratios [2211.11961].

## 5. Adversarial and Probabilistic Analysis

Adversarial constructions for lower bounds strategically choose request locations to maximally frustrate local greedy rules or permutation-based assignments. The classical cross-assignment and offset-tuning techniques yield worst-case input sequences matching theoretical lower bounds [2402.12734, 2008.08415, 2207.05308].

Probabilistic methods, such as those applied to regular polygons under random arrivals, rely on recursive integral equations for the expected cost conditioned on the occupancy state, allowing for exact numerical computation or dynamic programming up to modest $n$ [2512.00506].

## 6. Open Questions and Future Directions

- **Closing the gap for non-MPFS:** The possibility of online algorithms outside the MPFS class achieving competitive ratios below $2k-1$ on the line remains unresolved [2207.05308].
- **Randomized algorithms:** For small $k$, lower bounds for deterministic strategies are tight, but whether randomization can asymptotically improve the ratio is open [2008.08415].
- **Beyond the line/plane:** Extending tight bounds and algorithmic paradigms to higher-dimensional Euclidean spaces, trees, and general metric spaces is largely open, except for HST-based approximate reductions [2308.05933, 1404.5510].
- **Capacitated, weighted, or dynamic models:** Facility location with deletions and insertions, non-uniform capacities, or cost models incorporating weights/congestion continues to stimulate algorithmic and potential-function innovations [1807.03839, 2211.11961].
- **Online learning and regret bounds:** Regret-minimization frameworks for online facility selection and assignment with general site and connection costs have achieved near-optimal sublinear regret with scalable algorithms [2007.02801].

## 7. Synthesis and Impact

The Online Facility Assignment Problem epitomizes the tension between irrevocable commitment in the absence of foresight and the combinatorial/metric complexity of online service systems. Contemporary research has yielded tight competitive analyses for core algorithms (GRDY, IDAS, perm, PTCP) on lines and polygons, rigorous lower bounds—often via adversarial, geometry-exploiting constructions—and unifying frameworks (e.g., MPFS, capacity-insensitivity). Recent advances have mapped algorithmic optimality as a function of facility layout and extended techniques to dynamic, congested, and weighted variants, with deep connections to classical online matching, $k$-server, and facility location theory [2402.12734, 2207.05308, 2308.05933, 2008.08415, 2504.04556].

The field remains at the interface between combinatorial optimization, computational geometry, online algorithms, and adversarial analysis. Challenges include achieving sublinear or constant ratios on lines or grids for broader algorithm classes, understanding probabilistic and randomized strategies for geometric and highly constrained metrics, and generalizing results to richer structures and real-world deployment constraints.

Source: https://www.emergentmind.com/topics/online-facility-assignment-problem