Theory of Computing Systems

, Volume 33, Issue 5, pp 393–426

# On the Flattest Common Supersequence Method for Deadlock-Free Routing in Arbitrary Networks

• A. K. Laing
• R. Cypher
• C. A. Duncan
Article

DOI: 10.1007/s002240010011

Laing, A., Cypher, R. & Duncan, C. Theory Comput. Systems (2000) 33: 393. doi:10.1007/s002240010011

## Abstract.

In this paper we consider the problem of deadlock-free routing in arbitrary parallel and distributed computers. We focus on asynchronous routing algorithms which continuously receive new packets to route and which do not discard packets that encounter congestion. Specifically, we examine what we call the deadlock-free routing (DFR ) problem. The input to the DFR problem consists of an arbitrary network and an arbitrary set of paths in the network. The output consists of a routing algorithm, which is a list of the buffers used along each of the paths. The routing algorithm is required to be free from deadlock and the goal is to minimize the number of buffers required in any one node.

We study the DFR problem by converting it into an equivalent problem which we call the flattest common supersequence (FCS ) problem. The input to the FCS problem consists of a set of sequences and the output consists of a single sequence that contains all of the input sequences as (possibly noncontiguous) subsequences. The goal of the FCS problem is to minimize the maximum frequency of any symbol in the output sequence.

We present three main results. First, we prove that the decision version of the FCS problem is NP-complete, and has no polynomial-time approximation scheme unless P= NP . An alternative proof is presented which shows that unlike the shortest common supersequence (SCS) problem, the FCS problem is still NP-complete for two input sequences. This implies that approximation algorithms for FCS based on an exact pairwise merge are not possible. Next, we propose and experimentally evaluate a range of heuristics for FCS. Our experimental results show that one of these heuristics performs very well over a wide range of inputs. Lastly, we prove that this heuristic is in fact optimal for certain restricted classes of inputs.

© Springer-Verlag New York Inc. 2000

## Authors and Affiliations

• A. K. Laing
• 1
• R. Cypher
• 2
• C. A. Duncan
• 3
1. 1.EECS Department, Tufts University, 161 College Avenue, Medford, MA 02155, USA laing@eecs.tufts.edu US
2. 2.Sun Microsystems Computer Company, 901 San Antonio Road, MS MPK12-302, Palo Alto, CA 94303, USA cypher@eng.sun.com US
3. 3.Department of Computer Science, University of Miami, P.O. Box 248154, Coral Gables, FL 33124-4245, USA duncan@cs.miami.eduUS