Abstract: We use the reconfiguration framework to analyze problems that involve the rearrangement of items among groups. In various applications, a group of items could correspond to the files or jobs assigned to a particular machine, and the goal of rearrangement could be improving efficiency or increasing locality. To cover problems arising in a wide range of application areas, we define the general Repacking problem as the rearrangement of multisets of multisets. We present hardness results for the general case and algorithms for various classes of instances that arise in real-life scenarios. By limiting the total size of items in each multiset, our results can be viewed as an offline approach to Bin Packing, in which each bin is represented as a multiset. In addition to providing the first results on reconfiguration of multisets, our contributions open up several research avenues: the interplay between reconfiguration and online algorithms and parallel algorithms; the use of the tools of linear programming in reconfiguration; and, in the longer term, a focus on extra resources in reconfiguration.
Introduction
In computer science, "reconfiguration" explores the feasibility of transitioning between two valid solutions of a problem through a sequence of small, incremental steps. This framework is particularly relevant in resource allocation, where moving from an inefficient state to an optimal one must be done without violating system constraints at any intermediate point.
A recent study by Kam et al. introduces the Repacking problem, the first formal investigation into the reconfiguration of multisets. This problem models scenarios such as migrating Virtual Machines (VMs) between Physical Machines (PMs) in a data center. The objective is to rearrange items (VMs) among bins (PMs) of fixed capacity $\kappa$ such that no bin is ever overfilled during the transition.
The Repacking Problem
Unlike traditional bin packing models that often assign unique identifiers to every item and container, the Repacking problem treats bins and items of the same size as indistinguishable. This "multiset of multisets" approach simplifies the state space by focusing on the composition of bins rather than their specific identities.
The core challenge lies in finding a valid path between a source configuration $\mathcal{C}_S$ and a target configuration $\mathcal{C}_T$. A move consists of transferring a single item from one bin to another, provided the destination bin has sufficient "slack" (remaining capacity) to accommodate it.
Complexity and Hardness
The researchers demonstrate that the general Repacking problem is strongly NP-hard. This result implies that finding a reconfiguration sequence is computationally difficult for arbitrary item sizes and bin capacities. The hardness is established through a reduction from a restricted version of the Bin Packing problem.
As shown in Figure 1, the analysis often involves comparing configurations with "matching bins" (those with identical contents in both states) and "non-matching bins." The difficulty arises when items must be shuffled through a limited number of non-matching bins without exceeding capacity.
Efficient Algorithms for Special Cases
Despite the general hardness, the paper identifies several tractable scenarios common in practical computing:
Small Items
When all items are relatively small compared to the bin capacity (specifically, size $\le \kappa/\alpha$), reconfiguration is always possible if the average slack across all bins meets a certain threshold (roughly $\ge \kappa/(\alpha+1)$). The authors propose an algorithm that uses a "canonical midpoint"—the First-Fit-Decreasing (FFD) configuration—to bridge the gap between source and target.
Powers of 2
In many computing environments, item sizes and capacities are powers of 2. For this case, the authors provide a complete characterization: reconfiguration is possible if and only if the total slack across all bins is at least as large as the largest item that needs to be moved. Their SettleItems algorithm efficiently handles these transitions by alternating between "compression" (aggregating slack) and "transfer" phases.
Key Insights: Slack and Indistinguishability
A central theme of the research is that slack is the currency of reconfiguration. The feasibility of a move depends on the local availability of space, but the global reachability depends on the ability to "shuffle" that space across the system.
Furthermore, the assumption of indistinguishability is crucial. By treating bins with the same item composition as identical, the authors reduce the complexity of the state space, allowing for more efficient algorithmic solutions in restricted cases.
Conclusion and Future Directions
This work provides a theoretical foundation for dynamic resource management. While the general problem is hard, the existence of efficient algorithms for small items and power-of-2 sizes offers immediate relevance to cloud infrastructure.
Future research may explore heterogeneous bin capacities, distinguishable items (where item type matters beyond size), and the optimization of sequence length to minimize the number of moves. Additionally, the authors suggest investigating "resource-focused reconfiguration," which asks how much temporary extra capacity would be needed to make an otherwise impossible reconfiguration feasible.
Reference: Kam, J., Kamali, S., Miller, A., & Nishimura, N. (2024). Reconfiguration of Multisets with Applications to Bin Packing. arXiv:2405.05535v2 [cs.DS].
Summary updated