IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 18, NO. 2, FEBRUARY 1999 163 An Improved Optimal Algorithm for Bubble-Sorting-Based Non-Manhattan Channel Routing Jin-Tai Yan Abstract— It is well known that a non-Manhattan channel router always uses fewer routing tracks than a Manhattan router in a channel. To our knowledge, for a bubble-sorting-based non- Manhattan channel routing (BSNMCR) problem, Chaudhary’s heuristic algorithm [8] and Chen’s optimal al- gorithm [9] have been, respectively, proposed, where is the number of terminals and is the number of routing tracks in a channel. However, the time complexity of the two algorithms is in time in the worst case. In this paper, based on optimality- oriented swap-direction selection in an optimal bubble-sorting solution, an improved optimal algorithm for a BSNMCR problem is proposed, and the time complexity of the proposed algorithm is proven to be in time and in time in the worst case. Index Terms— Bubble sorting, channel routing, optimal algo- rithm, physical design. I. INTRODUCTION I T IS WELL known that channel routing (CR) plays an important role in very large scale integration (VLSI) design automation, and the CR problem has been extensively studied. Generally speaking, most of the routers only use horizontal and vertical wires to complete the connection of all the routing nets in a channel, i.e., most of the channels are routed in a Manhattan routing model [1]–[5]. As VLSI technology advances, the fabrication process does not preclude a layout style in a non-Manhattan routing model. In fact, a non- Manhattan channel router always uses fewer routing tracks than a Manhattan router in a channel. Hence, new non- Manhattan CR problems have been formulated [6], [8], and nonoptimum and optimal non-Manhattan algorithms [6]–[9] have been proposed. For a bubble-sorting-based non-Manhattan channel, the ba- sic concept in Wang’s algorithm [7] is to interchange a pair of adjacent nets using two wires, one in the 45 direction and the other in the 45 direction if two adjacent nets are in a wrong order. On the other hand, the nets propagate to the next track over vertical wires if two adjacent nets are in a right order. Hence, the routing process in a channel is determined by a sequence of passes of interchanging nets. In each pass, a net is only moved one position to the left, one position to the right, or remains at the same position. Basically, each pass of interchanging nets can be implemented by one routing track in a non-Manhattan channel. As a result, a bubble-sorting-based Manuscript received December 3, 1997; revised July 8, 1998. This paper was recommended by Associate Editor T. Yoshi. The author is with the Computer Systems Research Center, National Chiao Tung University, Hsinchu, 30050 Taiwan, R.O.C. Publisher Item Identifier S 0278-0070(99)01009-X. non-Manhattan channel will be routed by mapping each pass onto one routing track. To minimize the number of routing tracks in a bubble- sorting-based non-Manhattan channel, Chaudhary’s algorithm [8] further releases the constraint of moving at most one position to the left or the right during one pass. Hence, the operation of swapping nets can be propagated in one pass, and all the nets can be moved over longer distances during one pass. Basically, the swap-direction of any pass in Chaudhary’s algorithm [8] depends on the number of nonzero elements in the right and left inversion tables. If the number of nonzero elements in the left (right) inversion table is greater than that in the right (left) inversion table, one right (left) swap pass will be performed from left to right (right to left). On the other hand, if the number of nonzero elements in the left inversion table is the same as that in the right inversion table, one left swap pass will be performed from right to left. Hence, Chaudhary’s algorithm takes time to route a bubble-sorting-based non-Manhattan channel, where is the number of routing tracks and is the number of terminals in a channel. In Fig. 1, a Manhattan routing result and non-Manhattan routing results by Wang’s algorithm [7] and Chaudhary’s algorithm [8] for a channel are illustrated, respectively. Recently, Chen et al. [9] proposed an optimal algorithm to solve a bubble-sorting-based non-Manhattan channel routing (BSNMCR) problem. Chen et al. prove a theorem, , to explain no sorting-order in an optimal bubble-sorting solution (BSS), and to further generate a binary decision diagram for an optimal BSS. If a left-swap pass and a right- swap pass are applied to a bubble-sorting problem at the same time, Chen’s algorithm [9] takes to obtain an optimal BSS in swap passes. Clearly, a significant improvement in time complexity over nonoptimal approaches is achieved as ensuring optimality. Referring to the channel in Fig. 1, Chen’s algorithm [9] only needs five swap passes to complete the connection of all the routing nets in two routing layers. However, the time complexity of Chaudhary’s algorithm and Chen’s algorithm is in time in the worst case. In this paper, based on optimality-oriented swap-direction selection in an optimal BSS, an improved optimal algorithm for a BSNMCR problem is proposed, and the time complexity of the proposed algorithm is proven to be in time and in time in the worst case. The rest of this paper is organized as follows: Section II con- tains the formulation and necessary definitions for a BSNMCR problem. In Section III, the optimality-oriented swap-direction 0278–0070/99$10.00 1999 IEEE