We present in this paper a linear time optimal algorithm for minimizing the density of a channel (with exits) by
permuting the terminals on the two sides of the channel. This compares favorably with the previously known
near-optimal algorithm presented in [6] that runs in superlinear time. Our algorithm has important applications
in hierarchical layout design of intergrated circuits. We also show that the problem of minimizing wire length by
permuting terminals is NP-hard in the strong sense.