DOI: 10.1007*/s00454-004-1154-y* _{©}

**Geometry**

2005 Springer Science+Business Media, Inc.
**Canonical Ordering Trees and Their Applications in Graph Drawing**

^{∗}

Huaming Zhang and Xin He

Department of Computer Science and Engineering, State University of New York at Buffalo, Buffalo, NY 14260, USA

{huazhang,xinhe}@cse.buffalo.edu

**Abstract.** We study the properties of Schnyder’s realizers and canonical ordering trees
of plane graphs. Based on these newly discovered properties, we obtain compact drawings
*of two styles for any plane graph G with n vertices. First, we show that G has a visibility*
*representation with height at most15n/16. This improves the previous best bound of*
*(n − 1). Second, we show that every plane graph G has a straight-line grid embedding on*
an*(n − δ*0*− 1) × (n − δ*0*− 1) grid, where δ*0*is the number of cyclic faces of G with respect*
*to its minimum realizer. This improves the previous best bound of(n − 1) × (n − 1).*

*We also study the properties of the regular edge labeling of 4-connected plane trian-*
*gulation. Based on these properties, we show that every such a graph has a canonical*
*ordering tree with at most(n + 1)/2 leaves. This improves the previously known bound*
of* (2n +1)/3. We show that every 4-connected plane graph has a visibility representation*
with height at most*3n/4. All drawings discussed in this paper can be obtained in linear*
time.

**1.** **Introduction**

*The concepts of canonical ordering and canonical ordering tree of plane triangulations*
and triconnected plane graphs played crucial roles in designing several graph-drawing
algorithms [8], [10], [11], [14], [16]–[18]. Recently, Chiang et al. generalized these
concepts to arbitrary connected plane graphs [5], which leads to improvements in several
graph-drawing algorithms [4], [5].

*A visibility representation (VR for short) of a plane graph G is a representation,*
*where the vertices of G are represented by nonoverlapping horizontal segments (called*
*vertex segments), and each edge of G is represented by a vertical line segment touching*
the vertex segments of its end vertices. The problem of computing a compact VR is

∗This research was supported in part by NSF Grant CCR-9912418 and NSF Grant CCR-0309953.

important not only in algorithmic graph theory, but also in practical applications such
*as VLSI layout. A VR of a 2-connected plane graph G can be obtained from an st-*
*numbering of G and the corresponding st-numbering of its dual [26], [29]. Using this*
approach, the height of the VR is bounded by*(n −1) and the width of the VR is bounded*
by*(2n − 5) [26], [29].*

Some work have been done to reduce the width of the VR. Kant and He showed that
every 4-connected plane graph has a VR with width at most*(n − 1) [19]. Kant proved*
that every plane graph has a VR with width at most* (3n − 6)/2 [18]. Very recently,*
Lin et al. reduced the width to* (22n − 42)/15 by choosing the best st-numbering from*
*three st-numberings derived from a Schnyder’s realizer of G [23]. However, the height*
of the VR of a general plane graph remains to be the trivial bound of*(n − 1). In this*
*paper we prove that every plane graph G has a VR with height at most15n/16.*

*Finding a straight-line grid embedding of a plane graph G is another extensively*
studied problem. It has been known for long time that such an embedding exists. However,
the drawings produced by earlier algorithms require grids of exponential size [10]. A
breakthrough was achieved in [7], [10], and [11]: It was shown that such an embedding
can be done on a*(2n − 4) × (n − 2) grid. The grid size was reduced to (n − 1) × (n − 1)*
*in [28]. For a 4-connected plane triangulation G with at least four exterior vertices,*
the size of the grid can be reduced to*(n/2 − 1) × (n/2) [13], [24], which is optimal*
in the sense that there are an infinite number of 4-connected plane graphs, any grid
drawings of which need rectangular grids of width*(n/2 − 1) and height n/2. Chrobak*
and Kant [6] dealt with convex grid drawings of 3-connected planar graphs. It is known
that there exists a plane graph whose straight-line embedding requires a grid of size
at least*2n/3 × 2n/3. It has been conjectured that every plane graph G has such*
an embedding on a *2n/3 × 2n/3 grid. However, the best known bound remains*
*(n − 1) × (n − 1) given in [28]. In this paper we show that every plane graph has a*
straight-line grid embedding on an*(n − δ*0*− 1) × (n − δ*0*− 1) grid, where δ*0is the
*number of clockwise cyclic faces of G with respect to its minimum realizer* *R*0. Our
work is the first result reducing the grid size below*(n − 1) by a nontrivial parameter.*

*In many applications of a canonical ordering tree T , the number of leaves of T is a*
*crucial parameter. For example, in the floor-planning algorithm in [4] and the 2-visibility*
*drawing algorithm in [5] for plane graphs, the width of both drawings are bounded by the*
number of leaves of the canonical ordering tree used. Thus, the problems of finding more
compact drawings are reduced to finding a canonical ordering tree with fewer leaves.

However, it is known that there exists a plane graph for which every canonical ordering
tree has at least* (2n + 1)/3 leaves. Thus the width of the drawings produced by the*
algorithms in [4] and [5] is bounded by* (2n + 1)/3.*

*We study properties of regular edge labeling (REL for short) of a 4-connected plane*
*triangulation G. The properties and applications of REL have been studied in [1], [12],*
[19], and [20]. Our study reveals the interconnections between the REL, the canonical
ordering tree and Schnyder’s realizer. This leads to the finding of a canonical ordering
tree with at most*(n +1)/2 leaves for a 4-connected plane triangulation. Based on this,*
*we prove that every 4-connected plane graph G has a VR with height at most3n/4.*

All drawings discussed in this paper can be obtained in linear time.

Our drawing methods are somewhat different from the previous ones. For the VR of a plane graph, we not only rely on the existence of special canonical ordering trees with a

*certain number of leaves, but also introduce a new way of obtaining st-numbering from*
a canonical ordering tree, namely, we alternately assign numbers to tree nodes from left
to right or from right to left, and so on. Hopefully, this technique can be further used
to improve the height bound for VR, or even the width bound for VR if we consider
the canonical ordering tree for the dual graph. As the straight-line grid embedding is
concerned, we use the minimum realizer instead of the general Schnyder’s realizer to
obtain more compact embedding in most practical cases.

The present paper is organized as follows. Section 2 introduces preliminaries. Section
3 gathers concepts and results related to canonical ordering trees, which are interesting by
themselves and are needed in later sections. Section 4 presents the construction of a VR
with height at most*15n/16. In Section 5 we present the algorithm for compact straight-*
line grid embedding. Section 6 explores the properties of REL of a 4-connected plane
*triangulation G and proves G has a canonical ordering tree with at most(n + 1)/2*

*leaves. Section 7 studies the connection between the REL and the st-numbering and*
proves a 4-connected plane graph has a VR with height at most*3n/4. Section 8*
concludes the paper.

**2.** **Preliminaries**

*In this section we give definitions and preliminary results. G= (V, E) denotes a graph*
*with n= |V | vertices and m = |E| edges. The degree deg(v) of a vertex v is the number*
of edges incident to*v. A planar graph G is a graph which can be embedded on the*
*plane without edge crossings. A plane graph is a planar graph with a fixed embedding.*

*An embedding of a plane graph divides the plane into a number of regions, called faces.*

*The unbounded region is the exterior face. Other regions are interior faces. The vertices*
*and the edges on the exterior face are called exterior vertices and exterior edges. Other*
*vertices and edges are interior vertices and interior edges. A path P of G is a sequence*
*of distinct vertices u*_{1}*, u*2*, . . . , u**k*such that*(u**i**, u**i*+1*) ∈ E for 1 ≤ i < k. We also use P*
*to denote the set of the edges in it. Each u**i* for 1*< i < k is called an internal vertex of*
*P. Furthermore, if(u**k**, u*1*) ∈ E, then u*1*, u*2*, . . . , u**k**is called a cycle. We normally use*
*C to denote a cycle and the set of the edges in it. If C contains k vertices, it is a k-cycle.*

*A triangle (quadrangle, resp.) is a 3-cycle (4-cycle, resp.) A cycle C of G divides the*
*plane into its interior and exterior regions. If C contains at least one vertex in its interior*
*region, C is called a separating cycle. If all facial cycles of G are triangles, G is a plane*
*triangulation. A graph G is 2-connected if for any vertex u in G, G− {u} is connected.*

*G is 4-connected if for any three distinct vertices u*1*, u*2*, u*3 *in G, G− {u*1*, u*2*, u*3} is
connected. A 4-connected plane triangulation does not have separating triangles except
*the boundary cycle of its exterior face. G is called a directed graph (digraph for short)*
*if each edge of G is assigned a direction. We abbreviate the words “counterclockwise”*

and “clockwise” as ccw and cw, respectively.

*The dual graph G*^{∗}*= (V*^{∗}*, E*^{∗}*) of a plane graph G is defined as follows: For each face*
*F of G, G*^{∗}has a vertex*v**F**. For each edge e in G, G*^{∗}*has a dual edge e*^{∗} *= (v**F*1*, v**F*2*)*
*where F*_{1}*and F*_{2}*are the two faces of G with e on their common boundaries.*

*Let G be a 2-connected plane digraph with two specified exterior vertices s and t.*

*G is called an st-plane graph if it is acyclic with s as the only source and t as the only*

*sink. The properties of st-plane graphs were studied in [21] and [26]. In particular, for*
*every face f of G, its boundary cycle consists of two directed paths. The path on its*
*left (right, resp.) side is called the left (right, resp.) path of f . There is exact one source*
*(sink, resp.) vertex on the boundary of f , it is called the source (sink, resp.) of f .*

*An orientation of a graph G is a digraph obtained from G by assigning a direction*
*to each edge of G. We use G to denote both the resulting digraph and the underlying*
undirected graph unless otherwise specified. (Its meaning will be clear from the context.)
*For a plane graph G and two vertices s, t, an orientation of G is called an st-orientation*
*if the resulting digraph is an st-plane graph.*

*Let G be a 2-connected plane graph and let s, t be two distinct exterior vertices of G.*

*An st-numbering of G is a one-to-one mappingξ: V → {1, 2, . . . , n}, such that ξ(s) =*
1,*ξ(t) = n, and each vertex v = s, t has two neighbors u, w with ξ(u) < ξ(v) < ξ(w),*
*where u (w, resp.) is called a smaller neighbor (bigger neighbor, resp.) of v. Given*
*an st-numberingξ of G, we can orient G by directing each edge in E from its lower*
numbered end vertex to its higher numbered end vertex. The resulting orientation is
*called the orientation derived fromξ which, obviously, is an st-orientation of G. On the*
*other hand, if G= (V, E) has an st-orientation O, we can define a one-to-one mapping*
*ξ: V → {1, . . . , n} by topological sort. It is easy to see that ξ is an st-numbering and*
the orientation derived from*ξ is O.*

*Lempel et al. [21] showed that for every 2-connected plane graph G and any two*
*exterior vertices s and t, there exists an st-numbering. The following lemma was given*
in [26] and [29]:

**Lemma 1.** *Let G be a 2-connected plane graph. Letξ be an st-numbering of G. A*
*VR of G can be obtained fromξ in linear time. The height of the VR is the length of the*
*longest directed path in the st-orientation of G derived fromξ.*

**3.** **Canonical Ordering Tree and Orderly Spanning Tree**

*Let G be a plane triangulation with n* *≥ 3 vertices and m = 3n − 6 edges. Let*
*v*1*, v*2*, . . . , v**n* *be an ordering of the vertices of G where* *v*1*, v*2*, v**n* are the three ex-
*terior vertices of G in ccw order. Let G**k**be the subgraph of G induced byv*1*, v*2*, . . . , v**k*

*and let H**k* *be the exterior face of G**k**. Let G− G**k* *be the subgraph of G obtained by*
removing*v*1*, v*2*, . . . , v**k*.

**Definition 1.** [11] An ordering*v*1*, . . . , v**n**of a plane triangulation G is canonical if the*
*following hold for every k= 3, . . . , n:*

*(1) G**k**is biconnected, and its exterior face H**k*is a cycle containing the edge*(v*1*, v*2*).*

(2) The vertex*v**k* *is on the exterior face of G**k**, and its neighbors in G**k*−1 form a
*subinterval of the path H**k*−1*− (v*1*, v*2*) with at least two vertices. Furthermore,*
*if k* *< n, v**k* *has at least one neighbor in G− G**k**. (Note that the case k* = 3 is
*degenerated, and H*2*− (v*1*, v*2*) is regarded as the edge (v*1*, v*2*) itself.)*

Figure 1 illustrates a canonical ordering of a plane triangulation. A canonical ordering
*of G can be viewed as an order in which G is reconstructed from a single edge(v*1*, v*2*)*

4 6

7

5

3

1 2

**Fig. 1.** *A canonical ordering tree of a plane triangulation G.*

*step by step. At step k, whenv**k**is added to construct G**k**, let c**l**, c**l*+1*, . . . , c**r*be the lower
ordered neighbors of*v**k**from left to right on the exterior face of G**k*−1. We call*(v**k**, c**l**)*
*the left edge ofv**k*,*(v**k**, c**r**) the right edge of v**k*, and the edges*(c**p**, v**k**) with l < p < r the*
*internal edges ofv**k**. The collection T of the left edges of the verticesv**j*for 3*≤ j ≤ n*
plus the edge*(v*1*, v*2*) is a spanning tree of G and is called a canonical ordering tree of*
*G [11], [15]. The tree drawn in thick lines in Fig. 1 is a canonical ordering tree of G.*

*Let T be a rooted spanning tree of a plane graph G. Two distinct vertices of G are*
*unrelated with respect to T if neither of them is an ancestor of the other in T . An edge*
*of G is unrelated with respect to T if its end vertices are unrelated. While traveling T*
*in ccw (cw, resp.) preorder (postorder, resp.), if each vertex of G is assigned a number*
from*{1, 2, . . . , n} according to the order being visited, the resulting order is called the*
*ccw (cw, resp.) preordering (postordering, resp.) of G with respect to T .*

In [5] the concept of a canonical ordering tree was generalized to any connected plane
*graph, which Chiang et al. call an orderly spanning tree, as follows:*

**Definition 2.** *Let G be a plane graph and let T be a spanning tree of G. Letv*1*, v*2*, . . . ,v**n*

*be the ccw preordering of the vertices of G with respect to T .*

(1) A vertex*v**i* *of G is orderly with respect to T if the neighbors ofv**i**in G form the*
following four blocks in ccw order around*v**i*:

*B*1*(vi): the parent of v**i*,

*B*2*(vi): the unrelated neighbors v**j*of*v**i**with j< i,*
*B*3*(vi): the children of v**i*, and

*B*4*(vi): the unrelated neighbors v**j*of*v**i**with j> i,*
where each block could be empty.

*(2) T is called an orderly spanning tree of G ifv*1 is an exterior vertex, and each
*v**i**(1 ≤ i ≤ n) is orderly with respect to T .*

*Let T be an orderly spanning tree of a plane triangulation G. Letv*1*, v*2*, . . . , v**n* be
*the ccw preordering of the vertices of G with respect to T . It is easy to see thatv*1*, v*2*, v**n*

are the exterior vertices in ccw order, and for any interior vertex*v**i*(3*≤ i ≤ n − 1), both*
*B*_{2}*(v**i**) and B*4*(v**i**) are nonempty.*

n

1

T1 2

2 T

T T n

T

T v

**Fig. 2.** Edge directions around an interior vertex*v.*

The following is another related concept called Schnyder’s realizer [27], [28]:

**Definition 3.** *Let G be a plane triangulation with three exterior verticesv*1*, v*2*, v**n* in
*ccw order. A realizerR of G is a partition of the interior edges of G into three sets*
*T*1*, T*2*, T**n*of directed edges such that the following hold:

*• For each i ∈ {1, 2, n}, the interior edges incident to v**i* *are in T**i* and directed
toward*v**i*.

*• For each interior vertex v of G, v has exactly one edge leaving v in each of T*1*, T*2*, T**n*.
The ccw order of the edges incident to*v is: leaving in T*1*, entering in T**n*, leaving
*in T*2*, entering in T*1*, leaving in T**n* *and entering in T*2 (see Fig. 2). Each entering
block could be empty.

*It was shown in [27] and [28] that every plane triangulation G has a realizerR, and*
*each T**i**(i* *∈ {1, 2, n}) is a tree rooted at the vertex v**i*containing all interior vertices of
*G. Figure 3 shows a realizer of a plane triangulation G. Three trees T*_{1}*, T*2*, T**n*are drawn

2 1

n

13

4

11 12

10 7

9 3

1

2

5 6

8

v v 14

v

**Fig. 3.** *A plane triangulation G and the minimum realizer of G.*

as dashed lines, dotted lines, and thick solid lines, respectively. (Ignore the small boxes containing integers and the directions of the exterior edges for now. Their meaning will be explained later.)

The following lemma summarizes the results related to the above concepts. They were shown in [4], [9], [22], [23], [25], and [27]:

**Lemma 2.** *Let G be a plane triangulation with three exterior verticesv*1*, v*2*, v**n**in ccw*
*order.*

*(1) If T is an orderly spanning tree of G, then the ccw preordering of the vertices of*
*G with respect to T is a canonical ordering of G. Hence T is also a canonical*
*ordering tree of G. A canonical ordering tree of G is also an orderly spanning*
*tree of G.*

*(2) Let{T*1*, T*2*, T**n**} be a realizer of G, where T**i* *is rooted atv**i* *for each i* *= 1, 2, n.*

*Then each T**i**plus both exterior edges of G incident tov**i**is an orderly spanning*
*tree of G.*

*(3) A canonical ordering tree T of G with at most (2n + 1)/3 leaves is obtainable*
*in O(n) time. There is a plane triangulation G for which every canonical ordering*
*tree has at least (2n + 1)/3 leaves.*

*(4) A realizer of G can be obtained from an orderly spanning tree T in O(n) time,*
*where one of the trees in the realizer is obtained from T by removing the two*
*edges on the exterior face.*

The following lemma shows the connection between canonical ordering trees and
*st-numberings.*

**Lemma 3.** *Let G be a plane triangulation and let T be a canonical ordering tree (or,*
*equivalently, an orderly spanning tree) of G rooted atv*1*. Then the ccw preordering*
*v*1*, v*2*, . . . , v**n**of the vertices of G with respect to T is an st-numbering of G.*

*Proof.* First observe that*v*1*, v*2*, v**n* *are the exterior vertices of G in ccw order. Forv*1

and*v*2,*v**n* is their bigger neighbor. For*v*2and*v**n*,*v*1is their smaller neighbor. For any
other vertex*v**i**, 3 ≤ i ≤ n − 1, both B*2*(v**i**) and B*4*(v**i**) are nonempty. The parent of v**i*

*in T and all vertices in B*2*(v**i**) are smaller neighbors of v**i*. The children of*v**i*(if any) in
*T and all vertices in B*4*(v**i**) are bigger neighbors of v**i*.

*For example, consider the tree T**n*(rooted at*v**n*) shown in Fig. 3. By Lemma 2(1) and (2),
*the union of T**n*and the two exterior edges*(v*1*, v**n**) and (v*2*, v**n**) is a canonical ordering*
*tree of G. Denote it by T*_{n}^{}*. The ccw preordering of the vertices of G with respect to T*_{n}^{}
*are shown in integers inside the small boxes. It is an st-numbering of G by Lemma 3.*

*Let G be a plane triangulation with three exterior verticesv*1*, v*2*, v**n*in ccw order. Let
*R = {T*1*, T*2*, T**n**} be a realizer of G. We direct the exterior edges as v*1 *→ v**n**, v**n* →
*v*2*, v*2*→ v*1*. The resulting orientation is called the orientation induced byR and denoted*
*by G (R). Note that G(R) is never an st-orientation because it is always cyclic.*

Let*δ(R) denote the number of interior cyclic faces of G(R). Let η*1*, η*2*, η**n* be
*the number of internal (i.e. nonleaf) vertices in T*_{1}*, T*2*, T**n*, respectively. The following
results were proved in [2], [3], [16], and [23]:

**Lemma 4.** *Let G be a plane triangulation with three exterior verticesv*1*, v*2*, v**n**in ccw*
*order.*

*(1) LetR = {T*1*, T*2*, T**n**} be any realizer of G. Then η*1*+ η*2*+ η**n**− δ(R) = n − 1.*

*(2) There is an unique realizerR*0*of G such that all interior cyclic faces of G(R*0*)*
*are directed in cw direction.R*0*can be obtained in O(n) time.*

The realizer*R*0*stated in statement (2) of Lemma 4 is called the minimum realizer of*
*G [2], [3]. We useR*0to construct a canonical ordering tree with at least*(n + 1)/2*

leaves, which in turn enables us to find more compact VR representation. We also use
*R*0to construct a more compact straight-line grid embedding later.

For example, the realizer shown in Fig. 3 is actually the minimum realizer*R*0*of G.*

*The orientation of G drawn in the figure is the orientation of G(R*0*). It has three cw*
interior cyclic faces, marked by empty circles. We call such faces the cyclic faces of
*G(R*0*). (Note that although the exterior face is cyclic in G(R*0*), we do not count it in*
*δ(R*0*) since it is not an interior face.)*

*In the induced orientation G(R*0*):*

*• F*3cw*denotes the set of interior faces of G(R*0*) with three cw edges and δ*0*= |F*3cw|.

*• F*2cw *denotes the set of interior faces of G(R*0*) with two cw edges and one ccw*
edge and*α*0*= |F*2cw|.

*• F*1cw *denotes the set of interior faces of G(R*0*) with one cw edge and two ccw*
edges and*β*0*= |F*1cw|.

Note that*F*3cw*, F*2cw*, F*1cw*form a partition of the set of the interior faces of G(R*0*).*

The following theorem is needed in later sections.

**Theorem 1.**

(1) *δ*0*+ α*0*= n − δ*0− 1.

(2) *δ*0 *≤ (n − 1)/2.*

*(3) G has a canonical ordering tree with at least(n + 1)/2 leaves, which can be*
*obtained in linear time.*

*Proof.* *(1) The number of interior faces of G(R*0*) is δ*0*+ α*0*+ β*0 *= 2n − 5. Since*
*every edge (including the exterior edges) of G(R*0*) is a cw edge of exactly one interior*
face, we have 3δ0*+ 2α*0*+ β*0*= 3n − 6. This gives 2δ*0*+ α*0*= n − 1, which implies (1).*

(2) Since 2δ0*= n − α*0*− 1 ≤ n − 1, we have δ*0*≤ (n − 1)/2.*

*(3) Let T**i**(i* *∈ {1, 2, n}) be the canonical ordering tree obtained by adding the two*
exterior edges incident to*v**i* *to T**i*. Let*η**i*be the number of internal vertices of the tree
*T**i**, which obviously is the same as the number of the internal vertices of T**i*. By Lemma
4(1), we have*η*1*+ η*2*+ η**n**− δ*0*= n − 1. Let l**i* *(i∈ {1, 2, n}) be the number of leaves*
*of T**i*. Then*η**i**= n − l**i**. Thus l*_{1}*+ l*2*+ l**n* *= 2n + 1 − δ*0. Because*δ*0*≤ (n − 1)/2,*
*we have l*_{1}*+ l*2*+ l**n**≥ (3n + 3)/2. Hence at least one of l**i* *≥ (n + 1)/2.*

Note, it takes linear time to construct the minimum realizer*R*0 [3]. Thus, the con-
struction of such a canonical ordering tree can be obtained in linear time.

*For a 4-connected plane triangulation G, there exists a canonical ordering tree T of*
*G with at most(n + 1)/2 leaves. Since we need to use a different technique and the*
proof is lengthy, we put it in the separate section, Section 6.

**4.** **Compact Visibility Representation with Reduced Width**

In this section we present our theorem on the height of the compact VR. Here, the com-
*pactness is meant to be only in one dimension: the height. Let G be a plane triangulation*
with exterior vertices*v*1*, v*2*, v**n**in ccw order. Let T be an orderly spanning tree of G with*
at least*(n + 1)/2 leaves, and let T be rooted at v**n*. Let*ρ be the ccw preordering of the*
*vertices of G with respect to T . In this ordering,ρ(v**n**) = 1, ρ(v*1*) = 2 and ρ(v*2*) = n.*

For any vertex*v other than v*1*, v*2*, v**n*,*v has a nonempty set B*2*(v) of smaller neighbors*
*and a nonempty set B*_{4}*(v) of bigger neighbors.*

*We construct two vertex numberings of G according to T simultaneously. The first*
vertex numbering*ξ**T* *of G is defined as follows:*

**Step 1: Traveling from the leftmost unassigned leaf of T by ccw postordering with***respect to T . (The first visited vertex isv*1.) Stop assigning numbers when we reach
*either the next leaf of T or the rootv**n*. When we reach*v**n*, the numbering process is
complete. When we reach a leaf, do not assign a number to it at this moment. Continue
to step 2 if there are leaves remaining to be traveled.

**Step 2: Traveling from the rightmost unassigned leaf of T by cw postordering with***respect to T . (Initially, it isv*2.) Stop assigning numbers when we reach either the next
*leaf of T or the rootv**n*. When we reach*v**n*, we are done. When we reach a leaf, do not
assign a number to it at this moment. Loop back to step 1 if there are leaves remaining
to be traveled.

*Figure 4(a) illustrates this numbering process using the canonical ordering tree T* *= T**n*^{}

(shown as thick solid lines), which is obtained from the minimum realizer in Fig. 3 by
applying Lemma 2(2). The integers inside the small boxes are the numbers assigned to
the vertices. In this process we visit*v*1first in step 1, then move to step 2 to visit*v*2. Then
we loop back to step 1 to visit the vertex numbered 3, followed by step 2 to visit vertices
numbered 4 and 5, and so on, until we reach*v**n*. Note that we always have*ξ**T**(v*1*) = 1,*
*ξ**T**(v*2*) = 2 and ξ**T**(v**n**) = n.*

The second vertex numbering*ξ**T*^{} is defined similarly, except that the order of steps
1 and 2 are swapped. Figure 4(b) shows the numbering*ξ**T*^{} *for the graph G in Fig. 3 by*
*using the canonical ordering tree T*_{n}^{}. Note that we always have*ξ**T*^{}*(v*2*) = 1, ξ**T*^{}*(v*1*) = 2*
and*ξ**T*^{}*(v**n**) = n.*

Next we prove the following technical lemma:

**Lemma 5.** *Let T be a canonical ordering tree of a plane triangulation G. Thenξ**T**, ξ*^{}*T*

*are two st-numberings of G. The st-orientation of G derived fromξ**T* (*ξ**T*^{}*, resp.) are*
*denoted by G**T* *(G*^{}_{T}*, resp.).*

*Proof.* We show that*ξ**T* *is an st-numbering of G. For each vertex other than the root*
*v**n**, its parent in T is assigned a bigger number byξ**T*. For each vertex*v other than v*1,

2 3 8

14 13

12 11

10 9 6

5 7 4

v v

6

v

v v 2

1 2

3

4 5

7

8

9 10

11

12 13

14

1 3 4

5

6

7 8

9 10

11 12

13

v 14

(b)

(d) (a)

(c) n

1 2 1 2

n

### (0,10)

### (7,2) (2,1)

### (10,0) (0,0)

1

**Fig. 4.** *Two drawings of the graph G in Fig. 3.*

we need to show that at least one of its neighbors is assigned a smaller number by*ξ**T*.
There are four cases.

*Case 1:v is not a leaf of T . Its children in T are smaller neighbors of v.*

*Case 2:v is v*2. *v*1is its smaller neighbor.

*Case 3:v is a leaf other than v*1*and is numbered in step 1.* All the vertices in the non-
*empty set B*_{2}*(v) are traveled before v by ξ**T*. Hence, they are smaller neighbors of*v.*

*Case 4:v is a leaf other than v*2*and is numbered in step 2.* All the vertices in the non-
*empty set B*4*(v) are traveled before v by ξ**T*. Hence, they are smaller neighbors of*v.*

Therefore, *ξ**T* *is an st-numbering. Similarly, we can show* *ξ*_{T}^{} is also an
*st-numbering.*

v

u’_{1}
v’_{t1}

v’ u’

w
u’_{t2}

Q2

v’_{1}

n

v"_{t3}

v"_{1}
P1

R

u"

v"

**Fig. 5.** The proof of Lemma 6.

Let*v*^{}*, v*^{}*(u*^{}*, u*^{}, resp.) be the*(2i − 1)th and 2ith leaf traveled by ξ**T* in step 1 (step
*2, resp.). Then u*^{}*, u*^{}(v^{}*, v*^{}, resp.) are the*(2i − 1)th and 2ith leaf traveled by ξ**T*^{} in its
*own step 1 (step 2, resp.). These four leaves are called the i th block of leaves of T . For*
example, in Fig. 4(b), the vertices*v*^{}*= 2, v*^{} *= 5, u*^{}*= 1, u*^{}= 3 are the first block of
*leaves of T*_{n}^{}*. The order of the four leaves in the i th block traveled byξ**T* (ξ*T*^{}, resp.) is
*v*^{}*, u*^{}*, v*^{}*, u*^{}*(u*^{}*, v*^{}*, u*^{}*, v*^{}*, resp.). Though it is possible that some nonleaf vertices of T*
are traveled by*ξ**T* (ξ*T*^{}, resp.) between the four leaves.

**Lemma 6.** *Let T be a canonical ordering tree of a plane triangulation G. Let P be a*
*directed path in G**T**, and let P*^{}*be a directed path in G*^{}_{T}*. Then for any block B of leaves*
*of T , one of P and P*^{}*cannot pass through all four vertices in B.*

*Proof.* *If P does not pass through all four vertices in B, we are done. Let us assume*
*that P passes through all four vertices in B. Letv*_{1}^{}*, . . . , v**t*^{}_{1}(can be degenerated to empty
set) be all the vertices traveled by*ξ**T* between*v*^{}*and u*^{}. (See Fig. 5 for an illustration.

*Some edges on P are drawn in solid lines.) Thenv*^{}_{1}*, . . . , v*^{}*t*_{1}are all the vertices traveled
between*v*^{}*and u*^{}by*ξ**T*^{}*. Let u*^{}_{1}*, . . . , u*^{}*t*_{2}(can be an empty set) be all the vertices traveled
by*ξ**T**between u*^{}and*v*^{}*. Then u*^{}*, u*^{}_{1}*, . . . , u*^{}*t*_{2}*are on the unique path, denoted by Q*1, of
*T from u*^{}to the root*v**n*. Let*v*_{1}^{}*, . . . , v**t*^{}_{3}(can be an empty set) be all the vertices traveled
by*ξ**T* between*v*^{}*and u*^{}. Then*v*^{}*, v*_{1}^{}*, . . . , v**t*^{}_{3} *are on the unique path of T fromv*^{}to
the root*v**n**, denote this unique path by P*1.

*Since P passes through both u*^{}and*v*^{}*, and u*^{}_{1}*, . . . , u*^{}*t*2are all the vertices traveled by
*ξ**T* *between u*^{}and*v*^{}, there is a vertex*w ∈ {u*^{}*, u*^{}_{1}*, . . . , u*^{}*t*2*} such that the edge (w, v*^{}*)*
*is in P, andξ**T**(v*^{}*) > ξ**T**(w) ≥ ξ**T**(u*^{}*). Denote the unique path from w to v**n* *in T by*
*Q*_{2}*. Note that Q*_{2}*is a subpath of Q*_{1}.

*Let R be the closed region enclosed by the edge(w, v*^{}*) and the paths P*1*and Q*_{2}.
*Now consider the position of u*^{}*with respect to R. Because Q*_{1}is the path connecting
*u*^{}to the root*v**n**in T and u*^{}*is a leaf of T , u*^{}*cannot be on Q*_{1}*. Therefore, u*^{}cannot be
*on Q*_{2}*. Similarly, u*^{}*cannot be on P*_{1}*. So u*^{}*is either inside or outside of R.*

*Suppose u*^{}*is outside of R. Consider the unique path in T from u*^{}to the root*v**n*.
*There are two possibilities: (1) It intersects with P*1 from the left. Then *ξ**T* *travels u*^{}

before*v*^{}*, which is impossible. (2) It intersects with Q*2from the right. Then*ξ**T* travels
*u*^{}*before u*^{}*, which is again impossible. Therefore, u*^{}*must be inside R.*

Similarly, it can be shown that*v*^{}and all*v**j*^{}(1*≤ j ≤ t*1*) are outside of R. Therefore*
none of*v*^{}or*v*^{}*j* (1*≤ j ≤ t*1*) can be a neighbor of u*^{}.

*Consider the path P*^{}. If*v*^{}*is not on P*^{}, we are done. Assume*v*^{}*is on P*^{}*. If P*^{}passes
*through u*^{}after it passes through*v*^{}*, it has to reach u*^{}from one of*v*^{}*, v*_{1}^{}*, . . . , v**t*^{}_{1}. (This
is because*v*^{}_{1}*, . . . , v**t*^{}1 are all the vertices traveled between*v*^{}*and u*^{}by*ξ**T*^{}.) However,
since none of*v*^{}*, v*^{}*j**, 1 ≤ j ≤ t*1*, is a neighbor of u*^{}*, this is impossible. Thus P*^{}cannot
*pass through all four vertices in B.*

**Theorem 2.** *Every plane graph G with n vertices has a VR with height at most*

*15n/16, which can be obtained in linear time.*

*Proof.* *Without loss of generality, we assume G is a plane triangulation. By Theorem*
1(3), from the minimal realizer*R*0*of G, we can obtain a canonical ordering tree T of G*
*with at least l≥ (n + 1)/2 leaves. Thus T has at least n/8 disjoint blocks of leaves.*

*T induces two st-orientations G**T**and G*^{}_{T}*by Lemma 5. This can be done in O(n) time.*

*Let P be a longest directed path in G**T**, and let P*^{}*be a longest directed path in G*^{}* _{T}*. By

*Lemma 6, for any block B of leaves of T , one of P or P*

^{}has to bypass at least one leaf

*in B. Thus P and P*

^{}together have to bypass at least

*n/8 leaves. So one of them has*to bypass at least

*n/16 leaves. Hence its length is at most 15n/16. Thus the length*

*of the longest directed path in one of G*

*T*

*, G*

^{}

*T*is at most

*15n/1.*

*We apply the VR algorithm in Lemma 1 to one of G**T**, G*^{}*T* whose longest directed
*path is shorter. This results in a VR of G with height at most15n/16.*

*First, it takes linear time to obtain T from G by Theorem 1. Obviously, the construction*
*of the st-numbering of G based on T as described above takes linear time. Applying*
*Lemma 1, the total running time of constructing the VR is O(n).*

For example, in Fig. 4(b), the longest directed path in the orientation derived from the
*given st-numbering passes through the vertices numbered 1, 3, 4, 6, 9,10, 11, 12, 13, 14.*

*However, in the st-numbering shown in Fig. 3, the longest directed path passes through*
*all vertices. Figure 4(c) shows the VR of the graph G, using the st-numbering in*
Fig. 4(b).

**5.** **Compact Straight-Line Grid Embedding**

In this section we use the minimum realizer*R*0*of a plane triangulation G to present our*
theorem on the size of a compact straight-line grid embedding.

Define an order relation*<*lexon two pairs of numbers*(x*1*, x*2*) and (y*1*, y*2*) as follows:*

*(x*1*, x*2*) <*lex*(y*1*, y*2*) iff either x*1*< y*1*, or x*_{1}*= y*1*and x*_{2}*< y*2. The following definition
and lemma were given in [27] and [28].

**Definition 4.** *A weak barycentric representation of a graph G* *= (V, E) is an injec-*
tive mapping*π: v ∈ V → (π*1*(v), π*2*(v), π**n**(v)) ∈ R*^{3} that satisfies the following
conditions:

(1) *π*1*(v) + π*2*(v) + π**n**(v) = 1 for all vertices v.*

(2) For each edge*(x, y) ∈ E and each vertex z ∈ {x, y}, there is a k ∈ {1, 2, n}*

such that *(π**k**(x), π**k*−1*(x)) <*lex *(π**k**(z), π**k*−1*(z)) and (π**k**(y), π**k*−1*(y)) <*lex

*(π**k**(z), π**k*−1*(z)) (when k = 1 or n, k − 1 denotes n or 2, resp.).*

**Lemma 7.** *Let* *π: v ∈ V → (π*1*(v), π*2*(v), π**n**(v)) be a weak barycentric repre-*
**sentation of G. Then given any noncolinear points a, b, c on the plane, the mapping***f :* *v ∈ V → π*1* (v)a + π*2

**(v)b + π***n*

**(v)c defines a straight-line embedding of G in the**

**plane spanned by a, b, c.***Let G= (V, E) be a plane graph with three exterior vertices v*1*, v*2*, v**n*in ccw order.

Let*R*0*= {T*1*, T*2*, T**n**} be the minimum realizer of G. Let F = F*3cw*∪ F*2cwbe the set
*of interior faces of G(R*0*) that have either three or two cw edges on their boundaries.*

Thus*|F| = δ*0*+ α*0.

For each vertex*v ∈ G, let P*1*(v) (P*2*(v) and P*3*(v), resp.) be the path in T*1*(T*2*and T**n*,
resp.) from*v to the root v*1(*v*2and*v**n**, resp.). P*_{1}*(v), P*2*(v), P**n**(v) divides G into three*
*regions R*_{1}*(v), R*2*(v) and R**n**(v), where R**i**(v) denotes the closed region bounded by the*
*paths P**j**(v), P**k**(v) and the exterior edge (v**j**, v**k**) (i = j, k).*

For each interior vertex*v of G, let π*1*(v) (π*2*(v) and π**n**(v), resp.) be the number of*
*faces of G(R*0*) in R*1*(v) (R*2*(v) and R**n**(v), resp.) that belong to F. Note that since the*
*two interior faces of G(R*0*) incident to the exterior edges (v*1*, v*2*) and (v*1*, v**n**) are not*
*in R*1*(v) and these two faces belong to F, we have π*1*(v) ≤ δ*0*+ α*0− 2. Similarly, we
have*π*2*(v), π**n**(v) ≤ δ*0*+ α*0− 2.

For the three exterior vertices*v*1*, v*2and*v**n*, define*π**i**(v**i**) = δ*0*+ α*0and*π**j**(v**i**) = 0*
*for j= i. Note that for all vertices v, π*1*(v) + π*2*(v) + π**n**(v) = δ*0*+ α*0.

**Lemma 8.** *If u∈ R**i**(v)− P**i*+1*(v), then π**i**(u) < π**i**(v) (when i = 2 or n, i +1 denotes*
*n or 1, resp.).*

*Proof.* *We only prove the case i= n. The other cases are symmetric. We need to show*
*that u∈ R**n**(v) − P*1*(v) implies π**n**(u) < π**n**(v).*

*Case 1: u is in the interior of the region R**n**(v). Let Q be the path in T**n**from u to the*
root*v**n**of T**n**. Q must intersect either P*1*(v) or P*2*(v) at a vertex p.*

*Case 1(a): Suppose p is on P*2*(v). Let r be the parent of p in T*2. Let*(q, p) be the*
*edge incident to p that is next to the edge(r, p) in cw order around p. (See Fig. 6(a).)*
*Let f be the face of G bounded by the edges(p, r), (r, q), (q, p). Note that f is in*
*R**n**(v) but not in R**n**(u). By the property of the realizer, the edge (q, p) must be in T**n*

*and directed toward p. The edge(p, r) is in T*2*and directed toward r . So f has at least*
two cw edges on its boundary, and hence is in*F. Thus, π**n**(u) ≤ π**n**(v) − 1 < π**n**(v).*

u v

1(v) P

2

f r (v) P (v)n

2 n

p P Q

q v

u

v n

(c) (b)

(a) v^{1}

v1 v v

u p

q f

v2 1

n

v v

v2

r f q

v p

**Fig. 6.** The proof of Lemma 8.

*Case 1(b): Suppose p is on P*1*(v) (but p = v). By the property of the realizer, there*
must be an edge*(p, r) in T*2*directed from p to r and this edge must be in the region R**n**(v).*

(See Fig. 6(b).) Let*(q, p) be the edge incident to p that is next to the edge (r, p) in cw*
*order around p. Let f be the face of G bounded by the edges(p, r), (r, q), (q, p). Note*
*that f is in R**n**(v) but not in R**n**(u). By the property of the realizer, the edge (q, p) must*
*be in T**n**and directed toward p. The edge(p, r) is in T*2*and directed toward r . So f has at*
least two cw edges on its boundary, and hence is in*F. Thus, π**n**(u) ≤ π**n**(v)−1 < π**n**(v).*

*Case 2: u is on the path P*_{2}*(v). By the property of the realizer, there exists an edge*
*(u, p) in T*1*directed toward p and this edge must be in the region R**n**(v). Let (u, q) be*
*the edge incident to u that is next to the edge(u, p) in cw order around u. Let f be*
the face bounded by the edges*(u, p), (p, q), (q, u). (See Fig. 6(c).) Note that f is in*
*R**n**(v) but not in R**n**(u). By the property of the realizer, the edge (q, u) must be in T*2and
*directed toward u. The edge(u, p) is in T*1*and directed toward p. So f has at least two*
cw edges on its boundary and hence is in*F. Thus, π**n**(u) ≤ π**n**(v) − 1 < π**n**(v).*

**Lemma 9.** *Let u andv be two distinct vertices of G. If v is an interior vertex of G and*
*u* *∈ R**i**(v), then (π**i**(u), π**i*−1*(u)) <*lex*(π**i**(v), π**i*−1*(v)) (when i = 1 or n, i − 1 denotes*
*n or 2, resp.).*

*Proof.* *We only prove the case u∈ R**n**(v). The other cases are symmetric. We need to*
show*(π**n**(u), π*2*(u)) <*lex*(π**n**(v), π*2*(v)).*

*If u* *∈ R**n**(v) − P*1*(v), then by Lemma 8 we have π**n**(u) < π**n**(v), which implies*
*(π**n**(u), π*2*(u)) <*lex *(π**n**(v), π*2*(v)). Otherwise u ∈ P*1*(v). This implies u ∈ R*2*(v) −*
*P**n**(v). By Lemma 8 with i = 2, we have π*2*(u) < π*2*(v). Since R**n**(u) ⊂ R**n**(v), we have*
*π**n**(u) ≤ π**n**(v). Thus (π**n**(u), π*2*(u)) <*lex*(π**n**(v), π*2*(v)) as was to be shown.*

**Theorem 3.** *The mappingπ : v ∈ V → (1/(δ*0*+ α*0*))(π*1*(v), π*2*(v), π**n**(v)) is a weak*
*barycentric representation.*

*Proof.* The first condition of the barycentric representation is clearly satisfied, which
implies the injectivity of *π. We need to verify the second condition in Definition 4.*

Consider an edge*(x, y) of G and a vertex z = x, y. If z is an exterior vertex v**i*, then
*π**i**(z) = δ*0*+ α*0 *> π**i**(x), π**i**(y), which implies (π**i**(x), π**i*−1*(x)) <*lex *(π**i**(z), π**i*−1*(z))*
and*(π**i**(y), π**i*−1*(y)) <*lex*(π**i**(z), π**i*−1*(z)).*

*Otherwise, z is an interior vertex and x, y ∈ R**i**(z) for some i ∈ {1, 2, n}. By*
Lemma 9, we have*(π**i**(x), π**i*−1*(x)) <*lex *(π**i**(z), π**i*−1*(z)) and (π**i**(y), π**i*−1*(y)) <*lex

*(π**i**(z), π**i*−1*(z)).*

**Theorem 4.** *Every plane triangulation G with n vertices has a straight-line grid em-*
*bedding on a grid of size(n − δ*0*− 1) × (n − δ*0*− 1) where δ*0*is the number of cyclic*
*faces of G with respect to its minimum realizerR*0*. The embedding can be constructed*
*in linear time.*

*Proof.* **Pick three points a*** = (0, 0), b = (δ*0

*+α*0

*0*

**, 0) and c = (0, δ***+α*0

*). By Theorem*3 and Lemma 7, the mapping

*v → (π*2

*(v), π*

*n*

*(v)) is a straight-line grid embedding on*a grid of size

*(δ*0

*+ α*0

*) × (δ*0

*+ α*0

*). By Theorem 1(1), this equals the size stated in the*theorem.

To construct the embedding, we need to construct the minimal realizer*R*0*of G, which*
can be done in linear time [3]. The calculation of the coordinates of the embedding can
*be done in O(n) time by using the techniques given in [28].*

*As an example, Fig. 4(d) shows a straight-line grid embedding of G on a grid of size*
*(n −δ*0*−1)×(n −δ*0*−1). It is obtained by using the minimal realizer R*0*of G in Fig. 3.*

For example, the coordinate of the vertex numbered 6 in Fig. 3 is*(π*2*(6), π**n**(6)) = (2, 1).*

**6.** **Canonical Ordering Tree with Fewer Leaves for 4-Connected**
**Plane Triangulations**

In order to obtain a canonical ordering tree for a 4-connected plane triangulation with fewer leaves, we need another concept and a related lemma from [12] as follows:

**Definition 5.** *Let G*^{}be a plane graph with four vertices*v**W**, v**S**, v**E**, v**N* in ccw order
*on its exterior face. A regular edge labeling (REL for short) of G*^{}is a partition of the
*interior edges of G*^{} *into two subsets S*1*, S*2 of directed edges such that the following
hold:

(1) For each interior vertex*v, the edges incident to v appear in ccw order around v*
*as follows: a set of edges in S*1leaving*v; a set of edges in S*2entering*v; a set of*
*edges in S*1entering*v; a set of edges in S*2leaving*v. Each set is nonempty.*

(2) All interior edges incident to*v**N* *are in S*1 and entering*v**N*. All interior edges
incident to*v**W**are in S*_{2}and leaving*v**W*. All interior edges incident to*v**S**are in S*_{1}
and leaving*v**S*. All interior edges incident to*v**E* *are in S*_{2}and entering*v**E*. Each
block is not empty.

**Lemma 10.** *Let G*^{}*be a plane graph with four vertices on its exterior face. G*^{}*has an*
*REL if and only if the following conditions hold: (1) every interior face of G*^{}*is a triangle*
*and the exterior face of G*^{}*is a quadrangle; (2) G*^{}*has no separating triangles.*

v

v

h g

d b f

e c

j

a

i

S W

E N

v

v

**Fig. 7.** *A 4-connected plane triangulation G and the PTP graph G*^{}after deleting*(v*W*, v*E*).*

*A graph satisfying the two conditions in the above lemma is called a proper triangu-*
*lated plane (PTP for short) graph.*

*Let G be a 4-connected plane triangulation with three exterior verticesv*W*, v*E*, v*N

in ccw order. Delete the edge*(v*W*, v*E*). Denote the new exterior vertices by v*Sand the
*resulting plane graph by G*^{}*. (See Fig. 7 for an example.) G*^{}does not have separating
triangles, and it has four exterior vertices*v*W*, v*S*, v*E*, v*Nin ccw order on its own exterior
*face. Thus, G*^{}is a PTP graph and has an REL*(S*1*, S*2*) according to Lemma 10.*

*We investigate the properties of the REL of G*^{}*. Denote by G*1the directed subgraph
*of G*^{}*induced by S*_{1}and the four exterior edges directed as*v*S*→ v*W*, v*W*→ v*N*, v*S→
*v*E*, v*E *→ v*N*. Let E*_{1}*be the edge set of G*_{1}*. (E*_{1}*is the union of S*_{1}and the four exterior
*edges.) Then G*_{1} *is an st-plane graph with source* *v*S and sink *v*N*. Similarly, let G*_{2}
*be the directed subgraph of G*^{} *induced by S*_{2} and the four exterior edges directed as
*v*W *→ v*S*, v*S*→ v*E*, v*W *→ v*N*, v*N*→ v*E*. Let E*_{2}*be the edge set of G*_{2}*. Then G*_{2}is an
*st-plane graph with sourcev*Wand sink*v*E*. We call G*_{1} *the S–N net and G*_{2} the W–E
*net of G*^{}derived from the REL*(S*1*, S*2*). For example, Fig. 8 shows an REL with its*
*derived S–N and W–E nets for the PTP graph G*^{}shown in Fig. 7. (Ignore the small boxes
containing integers for now. Their meaning will be explained later.)

*Consider the S–N net G*1*. For each edge e* *∈ E*1*, let left(e) (right(e), resp.) denote*
*the face of G*1*on the left (right, resp.) of e. Define the dual graph of G*1*, denoted by G*^{∗}_{1}
*as follows. The node set of G*^{∗}_{1} *is the set of the interior faces of G*1plus two exterior
*faces f*W *and f*E *(which are obtained by “splitting” the exterior face of G*1). For each
*edge e* *∈ E*1*, there is a corresponding edge e*^{∗} *in G*^{∗}_{1} *directed from the face left(e) to*
*the face right(e). G*1*is an st-plane graph, so G*^{∗}_{1} *is also an st-plane graph with f*Was
*the only source and f*_{E} *as the only sink [21], [26]. For each face f in G*_{1}, define the
*upper left (upper right, resp.) edge of f to be the last edge of the left (right, resp.)*
*path of f , the lower left (lower right, resp.) edge of f to be the first edge of the left*
*(right, resp.) path of f . Note that these four edges are distinct. (This is because (S*_{1}*, S*2)
*is an REL, so each of the two directed paths on the boundary of f contains at least*
two edges.)