We study a greedy online facility assignment process on a regular $n$-gon, where unit-capacity facilities occupy the vertices and customers arrive sequentially at uniformly random locations on polygon edges. Each arrival is irrevocably assigned to the nearest currently free facility under the shortest edge-walk metric, with uniform tie-breaking among equidistant choices. Our main theoretical result is an exact value-function characterization: for every occupancy state $S\subseteq V$, the expected remaining cost $V(S)$ satisfies a finite-horizon integral recurrence obtained by conditioning on the random arrival edge and position. To make this recurrence computationally effective, we exploit dihedral symmetry of the regular polygon and show that $V(S)$ is invariant under rotations and reflections, enabling canonicalization and symmetry-reduced dynamic programming. For small $n$, we evaluate the recurrence accurately using deterministic numerical integration over piecewise-linear distance regions,; for larger $n$, we estimate the expected total cost via direct Monte Carlo simulation of the online process and report $95\%$ confidence intervals. Our computations validate the recurrence (including a closed-form check for the square, $n=4$) and indicate that the total expected cost increases with $n$, while the per-customer expected travel distance grows gradually as remaining free vertices become farther on average. \keywords{Online algorithms \and Facility assignment \and Expected cost \and Regular polygons \and Symmetry reduction \and Monte Carlo}
翻译:我们研究在正 $n$ 边形上的贪心在线设施分配过程,其中单位容量设施位于顶点,顾客按序到达多边形边上的均匀随机位置。每个到达的顾客在最短边行走度量下,被不可撤销地分配给当前最近的空闲设施,若存在等距选项则进行均匀随机平局打破。我们的主要理论结果是精确的值函数刻画:对于每个占用状态 $S\subseteq V$,期望剩余成本 $V(S)$ 满足一个有限时域积分递推关系,该关系通过对随机到达边和位置进行条件化得到。为使该递推关系在计算上有效,我们利用正多边形的二面体对称性,证明 $V(S)$ 在旋转和反射变换下保持不变,从而可实现规范化和基于对称性约简的动态规划。对于较小的 $n$,我们通过对分段线性距离区域进行确定性数值积分来精确计算该递推关系;对于较大的 $n$,我们通过直接对在线过程进行蒙特卡洛模拟来估计期望总成本,并报告 $95\%$ 置信区间。我们的计算验证了该递推关系(包括对正方形 $n=4$ 的闭式检验),并表明期望总成本随 $n$ 增加,而每位顾客的期望旅行距离则随着剩余空闲顶点平均距离变远而逐渐增长。\keywords{在线算法 \and 设施分配 \and 期望成本 \and 正多边形 \and 对称性约简 \and 蒙特卡洛}