A group of $n$ agents with numerical preferences for each other are to be assigned to the $n$ seats of a dining table. We study two natural topologies:~circular (cycle) tables and panel (path) tables. For a given seating arrangement, an agent's utility is the sum of their preference values towards their (at most two) direct neighbors. An arrangement is envy-free if no agent strictly prefers someone else's seat, and it is stable if no two agents strictly prefer each other's seats. Recently, it was shown that for both paths and cycles it is NP-hard to decide whether an envy-free arrangement exists, even for symmetric binary preferences. In contrast, we show that, if agents come from a bounded number of classes, the problem is solvable in polynomial time for arbitrarily-valued possibly asymmetric preferences, including outputting an arrangement if possible. We also give simpler proofs of the previous hardness results if preferences are allowed to be asymmetric. For stability, it is known that deciding the existence of stable arrangements is NP-hard for both topologies, but only if sufficiently-many numerical values are allowed. As it turns out, even constructing unstable instances can be challenging in certain cases, e.g., binary values. We completely characterize the existence of stable arrangements based on the number of distinct values in the preference matrix and the number of agent classes. We also ask the same question for non-negative values and give an almost-complete characterization, the most interesting outstanding case being that of paths with two-valued non-negative preferences, for which we experimentally find that stable arrangements always exist and prove it under the additional constraint that agents can only swap seats when sitting at most two positions away. We moreover give a polynomial algorithm for determining a stable arrangement assuming a bounded number of classes.
翻译:一组 $n$ 个具有相互数值偏好的智能体需被分配到一张餐桌的 $n$ 个座位上。我们研究了两种自然拓扑结构:圆形(循环)桌和条形(路径)桌。对于给定的座位安排,智能体的效用是其对直接相邻(至多两个)席位的偏好值之和。若没有智能体严格偏好他人的座位,则安排是无嫉妒的;若没有两个智能体严格偏好彼此的座位,则安排是稳定的。近期研究表明,即使偏好是对称二元的,对于路径和循环两种结构,判定是否存在无嫉妒安排是NP难的。相比之下,我们证明:若智能体来自有界数量的类别,则该问题对任意取值的(可能非对称)偏好可在多项式时间内求解,包括在可能时输出具体安排。我们还给出了在允许非对称偏好时先前困难结果的更简洁证明。关于稳定性,已知对两种拓扑结构判定稳定安排存在性均为NP难,但仅当允许足够多的数值取值时成立。事实上,在某些情况下(例如二元取值),甚至构造不稳定实例本身都可能具有挑战性。我们基于偏好矩阵中不同取值的数量与智能体类别数完全刻画了稳定安排的存在性。同时针对非负取值提出相同问题并给出近乎完备的刻画,最有趣的未解案例是带有两值非负偏好的路径结构——对此我们通过实验发现稳定安排始终存在,并在额外约束(智能体仅当座位间距不超过两个位置时才能交换座位)下给出理论证明。此外,我们提出了在假设有界类别数时确定稳定安排的多项式算法。