Abstract: | This paper proposes a new data structure called a variable-priority queue. The queue supports, in addition to the ordinary queue operations, an operation MIN to find an item of minimum key and three operations to change keys of items. Any sequence of these m operations can be processed in O(m) time. Furthermore, as its application, this paper presents two efficient algorithms for network problems. The first finds multicommodity flows in cycles in linear time. The second, using the first, finds edge-disjoint paths connecting terminal pairs in a doughnut-shaped grid. The grid is bounded by two nested rectangles, and terminals are specified on the two rectangular boundaries outside the four corners. If there are k terminal pairs and all the terminals are ordered in clockwise order around rectangles, then the algorithm decides in O(k) time whether there are edge-disjoint paths connecting terminals in the grid, and actually finds edge-disjoint paths in O(k log k) time. |