Professional Documents
Culture Documents
Federico Malucelli Dipartimento di Elettronica e Informazione, Politecnico di Milano Stefano Pallottino Dipartimento di Informatica, Universit` a di Pisa
Via F. Buonarroti 2, I56127 Pisa, Italy, tel. +39-050-2212737, e.mail: pallo@di.unipi.it
u t = n.
Here we consider three problems which can be solved in polynomial time [2].
removes from the stack all elements down to the deepest one of type t and, consequently, reordering all elements of type t > t which have been removed. However if we aim at minimizing the total number of pushes it may be worthwhile, at any stage t, to remove more elements than those strictly necessary, thus anticipating some work to be done in successive stages. In the extreme case, at the rst stage we may remove all elements in order to obtain a completely ordered stack after the popped elements are pushed back into it. We present a polynomial algorithm that nds the feasible unloading strategy with the minimum number of push operations, and show its behavior with a small example.
References
[1] Crainic, T., J.-A. Ferland, J.-M. Rosseau, Multicommodity, multimode freight transportation: a general modeling and algorithmic framework for the service network design problem, Transportation Research B, 20B (1986) 225-242. [2] Malucelli F., S. Pallottino and D. Pretolani, The Dynamic Stack Loading and Unloading Problem, unpublished paper (2000).