Math Meth Oper Res (1999) 49 : 137±148 999 999 Scheduling trams in the morning* Ulrich Blasum1, Michael R. Bussieck2, Winfried Hochsta Èttler1, Christoph Moll3, Hans-Helmut Scheel2, Thomas Winter2 1 Zentrum fu È r Paralleles Rechnen, Universita Èt zu Ko È ln, Albertus-Magnus-Platz, D-50923 Ko Èln, Germany 2 Abteilung fu Èr Mathematische Optimierung, TU Braunschweig, Pockelsstraûe 14, D-38106 Braunschweig, Germany 3 Siemens AG, ZT SE 4, D-81730 Mu È nchen, Germany Abstract. In this note, we prove NP-completeness of the following problem: Given a set of trams of di¨erent types, which are stacked on sidings in their depot and an order in which trams of speci®ed types are supposed to leave. Is there an assignment of trams to departure times without any shunting move- ments? In the particular case where the number of sidings is ®xed, the problem is solvable in polynomial time. We derive a dynamic program and improve its performance by a state elimination scheme. We implemented three variants of the dynamic program and applied them to random data as well as to real- world data. Key words: Combinatorial optimization, complexity, NP-completeness, scheduling, assignment, stack 1. Introduction In the last decade computers are integrated in the planning process of public transport. As a consequence, su½cient data for discrete optimization models are available for the optimization of international, national, and local public transport applications [3, 4, 6, 9]. In particular, for huge real-word instances various vehicle and crew scheduling models have been recently solved (cf. [5, 8]) computing the round trips and assigning vehicles and crews to timetable trips. In contrast to these scheduling problems, we concentrate on activities in a depot. The problem of assigning trams to positions in a depot and to the scheduled round trips of the next day, considered in this paper, arises in the daily dis- * This research was supported by the German Research Foundation (DFG). All correspondence to Thomas Winter (e-mail: T.Winter@tu-bs.de). Manuscript received: March 1997/®nal version received: June 1998