• 沒有找到結果。

Canonical Ordering Trees and Their Applications in Graph Drawing

N/A
N/A
Protected

Academic year: 2022

Share "Canonical Ordering Trees and Their Applications in Graph Drawing"

Copied!
24
0
0

加載中.... (立即查看全文)

全文

(1)

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 δ0is 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 most3n/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.

(2)

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 least2n/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 R0. 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

(3)

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 most15n/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 most3n/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 tov. 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 u1, u2, . . . , uksuch that(ui, ui+1) ∈ E for 1 ≤ i < k. We also use P to denote the set of the edges in it. Each ui for 1< i < k is called an internal vertex of P. Furthermore, if(uk, u1) ∈ E, then u1, u2, . . . , ukis 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 u1, u2, u3 in G, G− {u1, u2, u3} 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, Ghas a vertexvF. For each edge e in G, Ghas a dual edge e = (vF1, vF2) where F1and F2are 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

(4)

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 v1, v2, . . . , vn be an ordering of the vertices of G where v1, v2, vn are the three ex- terior vertices of G in ccw order. Let Gkbe the subgraph of G induced byv1, v2, . . . , vk

and let Hk be the exterior face of Gk. Let G− Gk be the subgraph of G obtained by removingv1, v2, . . . , vk.

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

(1) Gkis biconnected, and its exterior face Hkis a cycle containing the edge(v1, v2).

(2) The vertexvk is on the exterior face of Gk, and its neighbors in Gk−1 form a subinterval of the path Hk−1− (v1, v2) with at least two vertices. Furthermore, if k < n, vk has at least one neighbor in G− Gk. (Note that the case k = 3 is degenerated, and H2− (v1, v2) is regarded as the edge (v1, v2) 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(v1, v2)

(5)

4 6

7

5

3

1 2

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

step by step. At step k, whenvkis added to construct Gk, let cl, cl+1, . . . , crbe the lower ordered neighbors ofvkfrom left to right on the exterior face of Gk−1. We call(vk, cl) the left edge ofvk,(vk, cr) the right edge of vk, and the edges(cp, vk) with l < p < r the internal edges ofvk. The collection T of the left edges of the verticesvjfor 3≤ j ≤ n plus the edge(v1, v2) 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. Letv1, v2, . . . ,vn

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

(1) A vertexvi of G is orderly with respect to T if the neighbors ofviin G form the following four blocks in ccw order aroundvi:

B1(vi): the parent of vi,

B2(vi): the unrelated neighbors vjofviwith j< i, B3(vi): the children of vi, and

B4(vi): the unrelated neighbors vjofviwith j> i, where each block could be empty.

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

Let T be an orderly spanning tree of a plane triangulation G. Letv1, v2, . . . , vn be the ccw preordering of the vertices of G with respect to T . It is easy to see thatv1, v2, vn

are the exterior vertices in ccw order, and for any interior vertexvi(3≤ i ≤ n − 1), both B2(vi) and B4(vi) are nonempty.

(6)

n

1

T1 2

2 T

T T n

T

T v

Fig. 2. Edge directions around an interior vertexv.

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

Definition 3. Let G be a plane triangulation with three exterior verticesv1, v2, vn in ccw order. A realizerR of G is a partition of the interior edges of G into three sets T1, T2, Tnof directed edges such that the following hold:

• For each i ∈ {1, 2, n}, the interior edges incident to vi are in Ti and directed towardvi.

• For each interior vertex v of G, v has exactly one edge leaving v in each of T1, T2, Tn. The ccw order of the edges incident tov is: leaving in T1, entering in Tn, leaving in T2, entering in T1, leaving in Tn and entering in T2 (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 Ti(i ∈ {1, 2, n}) is a tree rooted at the vertex vicontaining all interior vertices of G. Figure 3 shows a realizer of a plane triangulation G. Three trees T1, T2, Tnare 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.

(7)

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 verticesv1, v2, vnin 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{T1, T2, Tn} be a realizer of G, where Ti is rooted atvi for each i = 1, 2, n.

Then each Tiplus both exterior edges of G incident toviis 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 atv1. Then the ccw preordering v1, v2, . . . , vnof the vertices of G with respect to T is an st-numbering of G.

Proof. First observe thatv1, v2, vn are the exterior vertices of G in ccw order. Forv1

andv2,vn is their bigger neighbor. Forv2andvn,v1is their smaller neighbor. For any other vertexvi, 3 ≤ i ≤ n − 1, both B2(vi) and B4(vi) are nonempty. The parent of vi

in T and all vertices in B2(vi) are smaller neighbors of vi. The children ofvi(if any) in T and all vertices in B4(vi) are bigger neighbors of vi.

For example, consider the tree Tn(rooted atvn) shown in Fig. 3. By Lemma 2(1) and (2), the union of Tnand the two exterior edges(v1, vn) and (v2, vn) is a canonical ordering tree of G. Denote it by Tn. The ccw preordering of the vertices of G with respect to Tn 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 verticesv1, v2, vnin ccw order. Let R = {T1, T2, Tn} be a realizer of G. We direct the exterior edges as v1 → vn, vnv2, v2→ v1. 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 T1, T2, Tn, respectively. The following results were proved in [2], [3], [16], and [23]:

(8)

Lemma 4. Let G be a plane triangulation with three exterior verticesv1, v2, vnin ccw order.

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

(2) There is an unique realizerR0of G such that all interior cyclic faces of G(R0) are directed in cw direction.R0can be obtained in O(n) time.

The realizerR0stated in statement (2) of Lemma 4 is called the minimum realizer of G [2], [3]. We useR0to 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 R0to construct a more compact straight-line grid embedding later.

For example, the realizer shown in Fig. 3 is actually the minimum realizerR0of G.

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

In the induced orientation G(R0):

• F3cwdenotes the set of interior faces of G(R0) with three cw edges and δ0= |F3cw|.

• F2cw denotes the set of interior faces of G(R0) with two cw edges and one ccw edge andα0= |F2cw|.

• F1cw denotes the set of interior faces of G(R0) with one cw edge and two ccw edges andβ0= |F1cw|.

Note thatF3cw, F2cw, F1cwform a partition of the set of the interior faces of G(R0).

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(R0) is δ0+ α0+ β0 = 2n − 5. Since every edge (including the exterior edges) of G(R0) 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 Ti(i ∈ {1, 2, n}) be the canonical ordering tree obtained by adding the two exterior edges incident tovi to Ti. Letηibe the number of internal vertices of the tree Ti, which obviously is the same as the number of the internal vertices of Ti. By Lemma 4(1), we haveη1+ η2+ ηn− δ0= n − 1. Let li (i∈ {1, 2, n}) be the number of leaves of Ti. Thenηi= n − li. Thus l1+ l2+ ln = 2n + 1 − δ0. Becauseδ0≤ (n − 1)/2, we have l1+ l2+ ln≥ (3n + 3)/2. Hence at least one of li ≥ (n + 1)/2.

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

(9)

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 verticesv1, v2, vnin ccw order. Let T be an orderly spanning tree of G with at least(n + 1)/2 leaves, and let T be rooted at vn. Letρ be the ccw preordering of the vertices of G with respect to T . In this ordering,ρ(vn) = 1, ρ(v1) = 2 and ρ(v2) = n.

For any vertexv other than v1, v2, vn,v has a nonempty set B2(v) of smaller neighbors and a nonempty set B4(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 isv1.) Stop assigning numbers when we reach either the next leaf of T or the rootvn. When we reachvn, 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 isv2.) Stop assigning numbers when we reach either the next leaf of T or the rootvn. When we reachvn, 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 = Tn

(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 visitv1first in step 1, then move to step 2 to visitv2. 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 reachvn. Note that we always haveξT(v1) = 1, ξT(v2) = 2 and ξT(vn) = 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 Tn. Note that we always haveξT(v2) = 1, ξT(v1) = 2 andξT(vn) = 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 GT (GT, resp.).

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

(10)

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 v2. v1is its smaller neighbor.

Case 3:v is a leaf other than v1and is numbered in step 1. All the vertices in the non- empty set B2(v) are traveled before v by ξT. Hence, they are smaller neighbors ofv.

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

Therefore, ξT is an st-numbering. Similarly, we can show ξT is also an st-numbering.

(11)

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.

Letv, 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 verticesv= 2, v = 5, u= 1, u= 3 are the first block of leaves of Tn. The order of the four leaves in the i th block traveled byξTT, resp.) is v, u, v, u(u, v, u, v, resp.). Though it is possible that some nonleaf vertices of T are traveled byξTT, 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 GT, and let Pbe a directed path in GT. Then for any block B of leaves of T , one of P and Pcannot 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. Letv1, . . . , vt1(can be degenerated to empty set) be all the vertices traveled byξT betweenvand u. (See Fig. 5 for an illustration.

Some edges on P are drawn in solid lines.) Thenv1, . . . , vt1are all the vertices traveled betweenvand ubyξT. Let u1, . . . , ut2(can be an empty set) be all the vertices traveled byξTbetween uandv. Then u, u1, . . . , ut2are on the unique path, denoted by Q1, of T from uto the rootvn. Letv1, . . . , vt3(can be an empty set) be all the vertices traveled byξT betweenvand u. Thenv, v1, . . . , vt3 are on the unique path of T fromvto the rootvn, denote this unique path by P1.

Since P passes through both uandv, and u1, . . . , ut2are all the vertices traveled by ξT between uandv, there is a vertexw ∈ {u, u1, . . . , ut2} such that the edge (w, v) is in P, andξT(v) > ξT(w) ≥ ξT(u). Denote the unique path from w to vn in T by Q2. Note that Q2is a subpath of Q1.

Let R be the closed region enclosed by the edge(w, v) and the paths P1and Q2. Now consider the position of uwith respect to R. Because Q1is the path connecting uto the rootvnin T and uis a leaf of T , ucannot be on Q1. Therefore, ucannot be on Q2. Similarly, ucannot be on P1. So uis either inside or outside of R.

(12)

Suppose uis outside of R. Consider the unique path in T from uto the rootvn. There are two possibilities: (1) It intersects with P1 from the left. Then ξT travels u

beforev, which is impossible. (2) It intersects with Q2from the right. ThenξT travels ubefore u, which is again impossible. Therefore, umust be inside R.

Similarly, it can be shown thatvand allvj(1≤ j ≤ t1) are outside of R. Therefore none ofvorvj (1≤ j ≤ t1) can be a neighbor of u.

Consider the path P. Ifvis not on P, we are done. Assumevis on P. If Ppasses through uafter it passes throughv, it has to reach ufrom one ofv, v1, . . . , vt1. (This is becausev1, . . . , vt1 are all the vertices traveled betweenvand ubyξT.) However, since none ofv, vj, 1 ≤ j ≤ t1, is a neighbor of u, this is impossible. Thus Pcannot 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 realizerR0of 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 GTand GTby Lemma 5. This can be done in O(n) time.

Let P be a longest directed path in GT, and let Pbe a longest directed path in GT. By Lemma 6, for any block B of leaves of T , one of P or Phas to bypass at least one leaf in B. Thus P and Ptogether 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 GT, GT is at most15n/1.

We apply the VR algorithm in Lemma 1 to one of GT, GT 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 realizerR0of 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(x1, x2) and (y1, y2) as follows:

(x1, x2) <lex(y1, y2) iff either x1< y1, or x1= y1and x2< y2. The following definition and lemma were given in [27] and [28].

(13)

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)) ∈ R3 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 v1, v2, vnin ccw order.

LetR0= {T1, T2, Tn} be the minimum realizer of G. Let F = F3cw∪ F2cwbe the set of interior faces of G(R0) that have either three or two cw edges on their boundaries.

Thus|F| = δ0+ α0.

For each vertexv ∈ G, let P1(v) (P2(v) and P3(v), resp.) be the path in T1(T2and Tn, resp.) fromv to the root v1(v2andvn, resp.). P1(v), P2(v), Pn(v) divides G into three regions R1(v), R2(v) and Rn(v), where Ri(v) denotes the closed region bounded by the paths Pj(v), Pk(v) and the exterior edge (vj, vk) (i = j, k).

For each interior vertexv of G, let π1(v) (π2(v) and πn(v), resp.) be the number of faces of G(R0) in R1(v) (R2(v) and Rn(v), resp.) that belong to F. Note that since the two interior faces of G(R0) incident to the exterior edges (v1, v2) and (v1, vn) are not in R1(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 verticesv1, v2andvn, defineπi(vi) = δ0+ α0andπj(vi) = 0 for j= i. Note that for all vertices v, π1(v) + π2(v) + πn(v) = δ0+ α0.

Lemma 8. If u∈ Ri(v)− Pi+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∈ Rn(v) − P1(v) implies πn(u) < πn(v).

Case 1: u is in the interior of the region Rn(v). Let Q be the path in Tnfrom u to the rootvnof Tn. Q must intersect either P1(v) or P2(v) at a vertex p.

Case 1(a): Suppose p is on P2(v). Let r be the parent of p in T2. 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 Rn(v) but not in Rn(u). By the property of the realizer, the edge (q, p) must be in Tn

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

(14)

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) v1

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 P1(v) (but p = v). By the property of the realizer, there must be an edge(p, r) in T2directed from p to r and this edge must be in the region Rn(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 Rn(v) but not in Rn(u). By the property of the realizer, the edge (q, p) must be in Tnand directed toward p. The edge(p, r) is in T2and directed toward r . So f has at least two cw edges on its boundary, and hence is inF. Thus, πn(u) ≤ πn(v)−1 < πn(v).

Case 2: u is on the path P2(v). By the property of the realizer, there exists an edge (u, p) in T1directed toward p and this edge must be in the region Rn(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 Rn(v) but not in Rn(u). By the property of the realizer, the edge (q, u) must be in T2and directed toward u. The edge(u, p) is in T1and directed toward p. So f has at least two cw edges on its boundary and hence is inF. 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 ∈ Ri(v), then (πi(u), πi−1(u)) <lexi(v), πi−1(v)) (when i = 1 or n, i − 1 denotes n or 2, resp.).

Proof. We only prove the case u∈ Rn(v). The other cases are symmetric. We need to shown(u), π2(u)) <lexn(v), π2(v)).

If u ∈ Rn(v) − P1(v), then by Lemma 8 we have πn(u) < πn(v), which implies n(u), π2(u)) <lex n(v), π2(v)). Otherwise u ∈ P1(v). This implies u ∈ R2(v) − Pn(v). By Lemma 8 with i = 2, we have π2(u) < π2(v). Since Rn(u) ⊂ Rn(v), we have πn(u) ≤ πn(v). Thus (πn(u), π2(u)) <lexn(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.

(15)

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

Otherwise, z is an interior vertex and x, y ∈ Ri(z) for some i ∈ {1, 2, n}. By Lemma 9, we havei(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 δ0is the number of cyclic faces of G with respect to its minimum realizerR0. The embedding can be constructed in linear time.

Proof. Pick three points a= (0, 0), b = (δ00, 0) and c = (0, δ00). By Theorem 3 and Lemma 7, the mappingv → (π2(v), πn(v)) is a straight-line grid embedding on a grid of size0+ α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 realizerR0of 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 R0of G in Fig. 3.

For example, the coordinate of the vertex numbered 6 in Fig. 3 is2(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 Gbe a plane graph with four verticesvW, vS, vE, vN in ccw order on its exterior face. A regular edge labeling (REL for short) of Gis a partition of the interior edges of G into two subsets S1, S2 of directed edges such that the following hold:

(1) For each interior vertexv, the edges incident to v appear in ccw order around v as follows: a set of edges in S1leavingv; a set of edges in S2enteringv; a set of edges in S1enteringv; a set of edges in S2leavingv. Each set is nonempty.

(2) All interior edges incident tovN are in S1 and enteringvN. All interior edges incident tovWare in S2and leavingvW. All interior edges incident tovSare in S1 and leavingvS. All interior edges incident tovE are in S2and enteringvE. Each block is not empty.

Lemma 10. Let Gbe a plane graph with four vertices on its exterior face. Ghas an REL if and only if the following conditions hold: (1) every interior face of Gis a triangle and the exterior face of Gis a quadrangle; (2) Ghas no separating triangles.

(16)

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 Gafter deleting(vW, vE).

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 verticesvW, vE, vN

in ccw order. Delete the edge(vW, vE). Denote the new exterior vertices by vSand the resulting plane graph by G. (See Fig. 7 for an example.) Gdoes not have separating triangles, and it has four exterior verticesvW, vS, vE, vNin ccw order on its own exterior face. Thus, Gis a PTP graph and has an REL(S1, S2) according to Lemma 10.

We investigate the properties of the REL of G. Denote by G1the directed subgraph of Ginduced by S1and the four exterior edges directed asvS→ vW, vW→ vN, vSvE, vE → vN. Let E1be the edge set of G1. (E1is the union of S1and the four exterior edges.) Then G1 is an st-plane graph with source vS and sink vN. Similarly, let G2 be the directed subgraph of G induced by S2 and the four exterior edges directed as vW → vS, vS→ vE, vW → vN, vN→ vE. Let E2be the edge set of G2. Then G2is an st-plane graph with sourcevWand sinkvE. We call G1 the S–N net and G2 the W–E net of Gderived from the REL(S1, S2). For example, Fig. 8 shows an REL with its derived S–N and W–E nets for the PTP graph Gshown in Fig. 7. (Ignore the small boxes containing integers for now. Their meaning will be explained later.)

Consider the S–N net G1. For each edge e ∈ E1, let left(e) (right(e), resp.) denote the face of G1on the left (right, resp.) of e. Define the dual graph of G1, denoted by G1 as follows. The node set of G1 is the set of the interior faces of G1plus two exterior faces fW and fE (which are obtained by “splitting” the exterior face of G1). For each edge e ∈ E1, there is a corresponding edge e in G1 directed from the face left(e) to the face right(e). G1is an st-plane graph, so G1 is also an st-plane graph with fWas the only source and fE as the only sink [21], [26]. For each face f in G1, 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 (S1, S2) is an REL, so each of the two directed paths on the boundary of f contains at least two edges.)

參考文獻

相關文件

The purpose of this research is to study a tiling problem: Given an m × n chessboard, how many ways are there to tile the chessboard with 1 × 2 dominoes and also ”diagonal”

The writer is convinced that Seng-chao’s concept of the Saint should be interpreted as an activity which is, in a sense, similar to the basic nature of NG Yu-kwan’s concept of Pure

Now, nearly all of the current flows through wire S since it has a much lower resistance than the light bulb. The light bulb does not glow because the current flowing through it

A subgroup N which is open in the norm topology by Theorem 3.1.3 is a group of norms N L/K L ∗ of a finite abelian extension L/K.. Then N is open in the norm topology if and only if

At least one can show that such operators  has real eigenvalues for W 0 .   Æ OK. we  did it... For the Virasoro

where L is lower triangular and U is upper triangular, then the operation counts can be reduced to O(2n 2 )!.. The results are shown in the following table... 113) in

In this work, for a locally optimal solution to the NLSDP (2), we prove that under Robinson’s constraint qualification, the nonsingularity of Clarke’s Jacobian of the FB system

Given a connected graph G together with a coloring f from the edge set of G to a set of colors, where adjacent edges may be colored the same, a u-v path P in G is said to be a