[Paper Review] Integer Point Sets Minimizing Average Pairwise L1-Distance: What is the Optimal Shape of a Town?
This paper presents an $ O(n^{7.5}) $ dynamic programming algorithm to compute optimal $ n $-towns—sets of $ n $ distinct integer grid points minimizing the sum of pairwise Manhattan distances. The method enables exact computation of optimal configurations up to $ n = 80 $, resolving a long-standing open problem in discrete geometry and grid optimization with practical implications for grid computing and facility location.
An n-town, for a natural number n, is a group of n buildings, each occupying a distinct position on a 2-dimensional integer grid. If we measure the distance between two buildings along the axis-parallel street grid, then an n-town has optimal shape if the sum of all pairwise Manhattan distances is minimized. This problem has been studied for cities, i.e., the limiting case of very large n. For cities, it is known that the optimal shape can be described by a differential equation, for which no closed-form is known. We show that optimal n-towns can be computed in O(n^7.5) time. This is also practically useful, as it allows us to compute optimal solutions up to n=80.
Motivation & Objective
- To determine the optimal geometric configuration of $ n $ buildings on a 2D integer grid that minimizes the total pairwise Manhattan distance.
- To close a longstanding gap in discrete optimization by providing the first polynomial-time algorithm for computing exact optimal $ n $-towns.
- To bridge the discrete $ n $-town problem with the continuous limit case (the 'optimal shape of a city'), which is described only by a differential equation without a closed-form solution.
- To enable practical computation of optimal layouts for grid-based systems, such as processor allocation in grid computing.
Proposed method
- A dynamic programming approach is designed where the state tracks the interface between already placed points and future placements using parameters like $ \Delta^{\mathrm{UR}} $ and $ \Delta^{\mathrm{UL}} $, summarizing cumulative distance effects.
- The algorithm constructs solutions column by column, maintaining a compact representation of partial solutions that captures all relevant distance contributions to future placements.
- The method exploits structural properties of the Manhattan distance and the convexity of the objective function to bound the number of relevant states and ensure polynomial time complexity.
- The state space is pruned using symmetry and monotonicity considerations, and the algorithm is implemented to compute exact optimal solutions up to $ n = 80 $.
- The approach is based on a recursive formulation that computes the minimal total distance by extending smaller optimal configurations with one point at a time.
- The algorithm is pseudo-polynomial in $ n $, with the exponent $ 7.5 $ arising from the number of parameters needed to describe the interface and the complexity of distance accumulation.
Experimental results
Research questions
- RQ1What is the optimal shape of a town composed of $ n $ distinct integer grid points that minimizes the sum of all pairwise Manhattan distances?
- RQ2Can exact optimal $ n $-towns be computed efficiently, and if so, what is the computational complexity of this task?
- RQ3How do discrete $ n $-towns compare to the continuous limit (the 'optimal city shape') in terms of average distance, and how do they converge as $ n $ increases?
- RQ4Is there a dynamic programming formulation that can efficiently compute optimal $ n $-towns despite the lack of monotonicity in optimal configurations?
- RQ5Can the discrete problem be solved in polynomial time, and what structural properties enable such an algorithm?
Key findings
- The paper presents the first algorithm to compute optimal $ n $-towns in $ O(n^{7.5}) $ time, enabling exact solutions up to $ n = 80 $.
- Optimal $ n $-towns do not necessarily contain optimal $ (n-1) $-towns, indicating that optimal configurations do not grow organically.
- The smallest counterexample where an optimal 35-town does not contain an optimal 34-town occurs at $ n = 35 $, demonstrating non-monotonicity in optimal solutions.
- For $ n = 72 $, the optimal $ n $-block city and optimal $ n $-town differ, indicating that discretization effects become significant when multiple near-optimal shapes compete.
- The continuous limit of the optimal shape is described by a differential equation with no known closed-form solution, but discrete $ n $-towns approximate it from below.
- The method is not extendable to higher dimensions or Euclidean distance due to the inability to summarize future distance effects with a small set of parameters.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.