On Rearrangement of Items Stored in Stacks
There are stacks, each filled with items, and one empty stack. Every stack has capacity . A robot arm, in one stack operation (step), may pop one item from the top of a non-empty stack and subsequently push it onto a stack not at capacity. In a {\em labeled} problem, all items are distinguishable and are initially randomly scattered in the stacks. The items must be rearranged using pop-and-pushs so that in the end, the stack holds items , in that order, from the top to the bottom for all . In an {\em unlabeled} problem, the items are of types of each. The goal is to rearrange items so that items of type are located in the stack for all . In carrying out the rearrangement, a natural question is to find the least number of required pop-and-pushes. Our main contributions are: (1) an algorithm for restoring the order of items stored in an table using only column and row permutations, and its generalization, and (2) an algorithm with a guaranteed upper bound of steps for solving both versions of the stack rearrangement problem when for arbitrary fixed positive number . In terms of the required number of steps, the labeled and unlabeled version have lower bounds and , respectively.
View on arXiv