Information Processing Letters 87 (2003) 59–66 www.elsevier.com/locate/ipl Optimal one-page tree embeddings in linear time Robert A. Hochberg a, , Matthias F. Stallmann b a Department of Computer Science, East Carolina University, Greenville, NC 27858-4353, USA b Department of Computer Science, North Carolina State University, Raleigh, NC 27695-8207, USA Received 6 June 2002; received in revised form 19 February 2003 Communicated by S. Albers Abstract In the minimum linear arrangement problem one wishes to assign distinct integers to the vertices of a given graph so that the sum of the differences (in absolute value) across the edges of the graph is minimized. This problem is known to be NP-complete for the class of all graphs, but polynomial for trees—algorithms of time complexity O(n 2.2 ) and O(n 1.6 ) were given by Shiloach [SIAM J. Comput. 8 (1979) 15–32] and Chung [Comput. Math. Appl. 10 (1984) 43–60], respectively. We present a linear-time algorithm for finding the optimal embedding (arrangement) in a restricted but important class of embeddings called one-page embeddings. 1 2003 Elsevier Science B.V. All rights reserved. Keywords: Algorithms; Optimal embedding; One-page embedding; Anchored tree 1. Introduction Given a graph G = (V,E),a linear arrangement π of G is a bijection π : V →{1, 2,...,n}, where n =|V |. The cost of a linear arrangement π is given by the sum C[π,G]= (u,v)E π(u) - π(v) , and a minimum linear arrangement of G is a linear arrangement which minimizes this sum. For the class of all graphs, the problem of finding a minimum linear arrangement was shown in 1976 by Garey et al. [4] to be NP-complete. In that same year, * Corresponding author. E-mail addresses: hochberg@cs.ecu.edu (R.A. Hochberg), mfms@cs.ncsu.edu (M.F. Stallmann). 1 A more extensive report is in Robert Hochberg’s thesis [7]. Goldberg and Klipker [6] gave an O(n 3 ) algorithm that solved the problem when G is a tree. Shiloach [9] improved this bound to O(n 2.2 ) in 1979, and Chung [2] further improved it in 1983 to O(n λ ) for any λ satisfying λ> lg 3 1.6. Recently, Shahrokhi et al. [8] showed that an algorithm for minimum linear arrangement could be used to find the bipartite crossing number of trees, thus showing that an O(n λ ) algorithm also exists for that problem. In what follows, we use the term embedding instead of “linear arrangement”. Hence we will speak of optimal embeddings and one-page embeddings, rather than optimal or one-page linear arrangements. The present work discusses the problem of embed- ding trees on one page, and gives a linear time algo- rithm for this restricted problem. This is an improve- ment, for the case of trees, of a 1988 result of Fred- erickson and Hambrusch [3] which gives an optimal 0020-0190/03/$ – see front matter 2003 Elsevier Science B.V. All rights reserved. doi:10.1016/S0020-0190(03)00261-8