The Upper and Lower Geodetic Numbers of Graphs ∗

Lin Dong Changhong Lu † Xiao Wang Department of Mathematics East China Normal University Shanghai, 200062, P.R.China

Abstract For any two vertices u and v in a graph G (digraph D, respectively), a u-v geodesic is a shortest path between u and v (from u to v, respectively). Let

I(u, v)(ID(u, v), respectively) denote the set of all vertices lying on a u-v geodesic.

For a vertex subset S, let IG(S)(ID(S), respectively) denote the union of all IG(u, v)

(ID(u, v), respectively) for u, v ∈ S. The geodetic number g(G)(g(D), respectively) of a graph G (digraph D, respectively) is the minimum cardinality of a set S with

IG(S) = V (G)(ID(S) = V (D), respectively). The geodetic spectrum of a graph G, denote by S(G), is the set of geodetic numbers of all orientations of graph G. The lower geodetic number is g−(G) = minS(G). The upper geodetic number is g+(G) = maxS(G). The main purpose of this paper is to investigate lower and upper geodetic numbers of graphs. Our main results in this paper are: (i) For any connected graph G and any spanning tree T of G, g−(G) ≤ l(T ), where l(T ) is the number of leaves of T . (ii) The conjecture g+(G) ≥ g(G) is true for chordal graphs or graphs with no 3-cycle or graphs of 4-colorable. Keywords: Convex set; Digraph; Distance; Geodesic; Geodetic number

1 Introduction

The graphs considered here are finite and simple (no loops or parallel edges). The set of vertices and edges of a graph G are denoted by V (G) and E(G), respectively. If xy ∈ E(G), we say that y is a neighbor of x, and denote by N(x) the set of neighbors of x. d(x) = |N(x)| is called the of x. Let S ⊆ V (G). G − S (or G/S) denotes the graph obtained from G by deleting all the vertices of S together with all the edges with at least one end in S. When S = {x}, we

∗Supported in part by National Natural Science Foundation of China (No.10301010 ) and Science and Tech- nology Commission of Shanghai Municipality (No. 04JC14031). †Correspond author. E-mail: [email protected]

1 simplify this notation to G − x. S is called a cut set of G if G − S has more components than G; if S consists of a single vertex, we simply call it a cut-vertex. A subgraph H of G is said to be induced by S if V (H) = S and xy ∈ E(H) if and only if xy ∈ E(G); we also use G[S] to denote the graph induced by S. If any two vertices of S are adjacent, we say G[S] is a . S is an independent set if no two vertices of S are adjacent in G. A subgraph H is called a spanning subgraph of G if V (H) = V (G) and xy ∈ E(H) implies xy ∈ E(G). A tree T is a connected graph with no cycle. A vertex x is called a leaf of tree T if the degree of x is one. T is a spanning tree of a connected graph G if T is a spanning subgraph of G and T is tree. The readers are referred to [15] for other basic definitions and terminologies. For any two vertices u and v in a graph G (digraph D, respectively), a u-v geodesic of graph G (digraph D, respectively) is a shortest path between u and v (from u to v, respectively).

Let IG(u, v)(ID(u, v), respectively) denote the set of all vertices lying on a u-v geodesic. For a vertex subset S of a graph G(digraph D, respectively), let IG(S)(ID(S), respectively) denote the union of all IG(u, v)(ID(u, v), respectively) for u, v ∈ S.A geodetic set of G (D, respectively) is a set S with IG(S) = V (G)(ID(S) = V (D), respectively). The geodetic number g(G)(g(D), respectively) of a graph G (digraph D, respectively) is the minimum cardinality of a geodetic set of G (D, respectively), and we call such geodetic set minimum geodetic set. → An orientation of a graph G, denoted by G, is a digraph obtained from G by assigning to each edge of G a direction. The geodetic spectrum of G is the set

→ → S(G) = {g(G): G is an orientation of G}. (1)

The lower geodetic number of G is g−(G) = minS(G), and the upper geodetic number is → → g+(G) = maxS(G). The orientation G is called a minimum spectrum orientation when g(G) = → g−(G) and a maximum spectrum orientation when g(G) = g+(G) . The concepts of the geodetic number and geodetic spectrum of a graph are introduced in [2] and [3] and investigated further in ([3]; [4]; [6]-[8]). The main purpose of this paper is to investigate lower and upper geodetic numbers of graphs.

2 Lower geodetic number of graphs

First we give a useful result on geodetic set of graphs.

Theorem 2.1 Let S be a vertex cut set of connected graph G and C be a connected component of G − S. If G[S] is a clique, then, (i) for every geodetic set N of graph G, V (C) ∩ N 6= φ; → → (ii) for every geodetic set N of an orientation G of graph G, if G has no directed cycle, → V (C) ∩ N 6= φ. Moreover, if S is just a cut-vertex, as is correct for any orientations G.

2 Proof (i) Suppose there exists a connected component C of G−S with V (C)∩N = φ. Then for any vertex v ∈ V (C), there must exist two distinct vertices vs, vt ∈ N (note that vs, vt 6∈ V (C)) such that v ∈ IG(vs, vt). Since S is a cut set, IG(v, vs) ∩ S 6= φ and IG(v, vt) ∩ S 6= φ. Assume that va ∈ IG(v, vs) ∩ S and vb ∈ IG(v, vt) ∩ S. Obviously, va 6= vb. Otherwise, v∈ / IG(vs, vt).

Since the induced graph of S is a clique, then vavb ∈ E(G), the path vs − · · · − va − vb − · · · − vt is shorter than the shortest path vs − · · · va − · · · − v − · · · − vb − · · · − vt, a contradiction. (ii) Suppose there exists a connected component C of G − S with V (C) ∩ N = φ. Then for every vertex v ∈ V (C), there also exists two distinct vertices vs, vt ∈ N (note that vs, vt 6∈ V (C)) with v ∈ I→(vs, vt) and I→(vs, v) ∩ S 6= φ, IG(v, vt) ∩ S 6= φ. Assume that va ∈ I→(vs, v) ∩ S G G G → → and vb ∈ I→(v, vt) ∩ S. Obviously, va 6= vb. Since G has no directed cycle, then vavb ∈ E(G). G Similarly, we can find a shorter directed path from vs to vt passing through the edge vavb. It is a contradiction. If S is a cut-vertex, the proof is easy and similar. 2 A vertex v is a simplicial vertex of G if the subgraph induced by its neighbors is a clique. Let Si(G) be the set of all simplicial vertices in a graph G. In [6], Chartrand, Harary and Zhang have shown that every geodetic set of a graph contains its simplicial vertices. From Theorem 2.1, We immediately obtain:

Corollary 2.1.1 Every simplicial vertex v is in every geodetic set of G. Every simplicial vertex v of a graph G is also in every geodetic set of all orientation of G without directed cycles.

Another result gained from Theorem 2.1 is

Corollary 2.1.2 (i) Any minimum geodetic set of connected G does not contain any cut-vertex; (ii) If G − v has at least three connected components, then v isn’t in any minimum geodetic set of any minimum spectrum orientations of G.

Proof (i) Let G1 and G2 be two connected components of G−v. Assume that S be a minimum geodetic set of G and v ∈ S. According to Theorem 2.1, S ∩ V (G1) 6= φ and S ∩ V (G2) 6= φ.

Assume that vs ∈ S ∩ V (G1) and vt ∈ S ∩ V (G2). Obviously, IG(vs, v) ⊂ IG(vs, vt) and

IG(v, vt) ⊂ IG(vs, vt). Hence IG(S − v) = IG(S) = V (G), a contradiction to the minimality of S. → (ii) Let G be a minimum spectrum orientation of G and S be a minimum geodetic set → of G. Suppose v ∈ S and G1, ··· ,Gk(k ≥ 3) is connected components of G − v. According to Theorem 2.1, S ∩ V (Gi) 6= φ for 1 ≤ i ≤ k. We first claim that, for each component Gi

(1 ≤ i ≤ k), there exists some vertex vi ∈ S ∩ V (Gi) such that there is directed path connected vi with v. If not, there exists some j ∈ {1, 2, ··· , k} such that there does not exist any directed path connected v with any vertices in S ∩ V (Gj). Hence, I→(S ∩ V (Gj)) = V (Gj). Let x be a G vertex in NG(v) ∩ V (Gj). Obviously x 6∈ S and x lies on a shortest directed path between some

3 two vertices in S ∩ V (Gj). No matter what the direction of the edge xv is, there must exist a directed path connected v and one of the vertices in S ∩ V (Gj). Since k ≥ 3, by reversing the direction of all the edges of some connected components (if → 0 need), we can obtain another orientation G of graph G such that for every vi ∈ S ∩ V (Gi) (1 ≤ → → 0 0 i ≤ k), if there exists a directed path from vi to v in G (from v to vi in G , respectively), there → → 0 0 exists a directed path from v to uj in G (from uj to v in G , respectively), where uj ∈ S ∩V (Gj) → and i 6= j. Therefore, I → (S −v) = I→(S) = V (G). It contradicts that G is a minimum spectrum G0 G orientation. Hence v 6∈ S. 2

Remark 1 If G − v has two connected components, the results in Corollary 2.1.2 may be not → → right. See Figure 1, the cut-vertex v belongs to any minimum geodetic set of G, where G is a minimum spectrum orientation of G.

s- s- s s- s- s@ ¨ HHj@R@ ¨* ¨ H v sP¨ P @H s  s QQP ) QPPiPs s + QQk  Qs s

→ Figure 1: G

Now we pay our attention to the lower geodetic number of G. We first introduce a method to orient the underlying graph G by given labels on vertex set of G. → Let f be a function from V (G) to positive integer set. An orientation G by labelling f of underlying graph G can be obtained as follows: for every edge uv ∈ E(G), → (i) if | f(u) − f(v) |= 1, then the direction of uv in G is from the vertex with a smaller label to the larger; → (ii) if | f(u) − f(v) |≥ 2, then the direction of uv in G is from the larger one to the smaller; (iii) if | f(u) − f(v) |= 0, then oriented the direction of uv arbitrarily.

→ Lemma 2.1.1 Let P : u = v1 → v2 → · · · → vk = v be a directed path in G obtained by above method. If the labels on the vertices of P are continuously increased by one from u to v, then P → is a u-v geodesic of G.

→ 0 Proof Suppose P : u = u1 → u2 → · · · → ut = v is a u-v geodesic of G. By the above rules, we know f(ui) ≤ f(ui−1) + 1 for 2 ≤ i ≤ t. Hence, f(v) ≤ f(u) + t − 1. Since f(v) = f(u) + k − 1,

4 → so k ≤ t. Therefore, P is a u-v geodesic of G. 2

Theorem 2.2 Let l(T ) be the number of the leaves of a tree T .

g−(G) ≤ min{l(T ): T is a spanning tree of G}.

Proof Let T be a spanning tree of a connected graph G. Suppose that u is a leaf of T . Beginning at u (also call root), a breadth-first search (commonly abbreviated BFS) is applied to the tree T . Let Vi be the set of vertices at level i in tree T for i ≥ 1. The root u is the unique → vertex in level 1. First label the vertices on G: f(v) = i if v ∈ Vi. As above, an orientation G by labelling f of underlying graph G can be obtained. For any leaf v ∈ V (T ), the unique path → between u and v in T is a directed path from u to v in G and the labels on the vertices of this path are continuously increased by one from u to v. Hence, the path between u and v in T is a → u-v geodesic in G by Lemma 2.1.1. Since T is a spanning tree of G and g(T ) = l(T ) (see [6]), → − so g(G) ≤ l(T ). Hence, g (G) ≤ l(T ). 2

From Theorem 2.2, we can directly obtain the following result in [9].

Corollary 2.2.1 ([9]) If G with order n ≥ 2 contains a Hamiltonian path, then g−(G) = 2.

3 On conjecture of g+(G) ≥ g(G)

In [13], Lu raised a conjecture that g+(G) ≥ g(G) for any graph. This conjecture is true for many special graphs such as complete graphs, complete r-partite graphs, cycle and tree. In [13], Lu has shown that the conjecture is true for connected graphs of order n with g(G) ≤ 4 or its n−1 diameter no less than 2 . In this section, we will show that this conjecture is true for graphs with no 3-cycle or graphs with chromatic number no more than 4 or chordal graphs.

Theorem 3.1 If the connected graph G has no 3-cycle, then g+(G) ≥ g(G).

Proof First we decompose V (G) through the following algorithms.

Step 1 i = 1;

Step 2 find a maximum independent set Vi of G;

Step 3 G := G − Vi and i := i + 1;

Step 4 if G = ∅, output V1,V2, ··· ,Vi−1; Otherwise, go to Step 2.

We claim that V1 ∪ V2 is a geodetic set of G. For any v ∈ Vi with i 6= 1, 2, v must be adjacent to some vertex (say v1) in V1 since V1 is a maximum independent set of G. Similarly, v must be

5 adjacent to some vertex (say v2) in V2 since V2 is a maximum independent set of G − V1. Since

G has no 3-cycle, v1 isn’t adjacent to v2. So, the distance of v1 and v2 in G is two. Hence, v lies on v1-v2 geodesic. Therefore, V1 ∪ V2 is a geodetic set of G. Now we orient E(G) as follows: For any uv ∈ E(G),

(i) if u ∈ V1, then the direction of uv is from u to v;

(ii) if u ∈ V2, then the direction of uv is from v to u; (iii) for the cases other than (i) and (ii), oriented uv arbitrarily. → Obviously, in G oriented as above, all vertices in V1 are sources and all vertices in V2 are → → + sinks. Thus, g(G) ≥ |V1| + |V2|. Hence, g (G) ≥ g(G) ≥ |V1| + |V2| ≥ g(G). 2

A k-coloring of graph G is an assignment of k colors 1, 2, ...k to the vertices of G. The coloring is proper if no two distinct adjacent vertices have the same color. The chromatic number χ(G) of graph G is the minimum k for which G is k−colorable.

→ Lemma 3.1.1 Let G be an orientation of graph G. For any u, v ∈ V (G), if I→(u, v)∪I→(v, u) ⊆ G G + IG(u, v), then g(G) ≤ g (G).

→ Proof Suppose S is a minimum geodetic set of G. Since I→(u, v) ∪ I→(v, u) ⊆ IG(u, v) for any G G → + u, v ∈ S, IG(S) = V (G), i.e., S is also a geodetic set of G. Hence, g(G) ≤ |S| = g(G) ≤ g (G).

2 → The distance from u to v in an orientation G, denoted by d→(u, v), is the length of u-v G → geodesic. If there are no directed path from u to v, we define d→(u, v) = ∞. Let d(G) = G max{d→(u, v) < ∞ : ∀u, v ∈ V (G)}. G

→ → → Lemma 3.1.2 Let G be an orientation of graph G. If G has no directed cycle and d(G) ≤ 2, then g(G) ≤ g+(G).

→ Proof Since G has no directed cycles, d→(u, v) < ∞ implies that d→(v, u) = ∞ for any G G u, v ∈ V (G). If d→(u, v) = d→(v, u) = ∞, then I→(u, v) ∪ I→(v, u) = {u, v} ⊆ IG(u, v); If G G G G d→(u, v) = 1, then I→(u, v) ∪ I→(v, u) = {u, v} ⊆ IG(u, v) = {u, v}; If d→(u, v) = 2, then G G G G + I→(u, v) ∪ I→(v, u) = I→(u, v) ⊆ IG(u, v). Hence, g(G) ≤ g (G) by Lemma 3.1.1. 2 G G G

Theorem 3.2 If G is 4-colorable, then g(G) ≤ g+(G).

Proof Let Vi be the set of vertices colored by i (i = 1, 2, ··· , k and 1 ≤ k ≤ 4). Every Vi is an independent set. Now we orient E(G) as follows: For any edge uv ∈ E(G), where u ∈ Vi and v ∈ Vj, the direction of uv is from u to v if and only if i < j.

6 → First we easily find that G oriented as above ha no directed cycles. If G is 3-colorable, → then d(G) ≤ 2. By Lemma 3.1.2, we know g(G) ≤ g+(G). Now we assume that the chromatic number of G is 4. We will show that I→(u, v) ∪ I→(v, u) ⊆ IG(u, v) for any u, v ∈ V (G). Hence, G G g(G) ≤ g+(G) by Lemma 3.1.1.

For any u, v ∈ V (G), if d→(u, v) = d→(v, u) = ∞ or d→(u, v) ≤ 2, we know I→(u, v) ∪ G G G G I→(v, u) = I→(u, v) ⊆ IG(u, v). For the case d→(u, v) = 3, we have u ∈ V1 and v ∈ V4. In this G G G → case, the distance between u and v in G must also be 3. So, a u-v geodesic of G is also a u-v geodesic of G. Hence, I→(u, v) ∪ I→(v, u) = I→(u, v) ⊆ IG(u, v). 2 G G G A chordless cycle in G is a cycle of length at least 4 in G that has no chord (that is, the cycle is an induced subgraph). A graph G is chordal if it is simple and no chordless cycle. A simplicial elimination ordering is an ordering v1, v2, . . . , vn of V (G) for deletion of vertices so that each vertex vi is a simplicial vertex of the remaining graph induced by {vi, . . . , vn}. A simple graph has a simplicial elimination ordering if and only if it is a chordal graph.(see [15])

Theorem 3.3 For every chordal graph G, g(G) ≤ g+(G) .

Proof Suppose G is a chordal graph and v1, . . . , vn is a simplicial elimination ordering of V (G).

Let S = {vi1 , vi2 , ··· , vik } ba a maximum independent set of G with 1 ≤ i1 < i2 < ··· < ik ≤ n and i1 + i2 + ··· + ik maximum. For any v ∈ V (G)/S, v has at least one neighbors in S since

S is a maximum independent set. Let U = {v ∈ V (G)/S : |N(v) ∩ S| ≥ 2} and Q(vij ) = {v ∈

V (G)/S : N(v) ∩ S = {vij }} ∪ {vij } for any vij ∈ S. Note that the subgraph induced by Q(vij ) is clique for 1 ≤ j ≤ k. If not, there exists some j such that x ∈ Q(vij ) and y ∈ Q(vij ) with xy∈ / E(G). Obviously, S ∪ {x, y}/{vij } is also an independent set of G. It is a contradiction to the maximum of S.

Now we claim that uv∈ / E(G) for any u ∈ Q(vij ) and v ∈ Q(vil ) if j 6= l. First, we have 0 0 ij > t for any vt ∈ Q(vij ). If not, let S = S ∪ {vt}/{vij }. S is also a maximum independent set of G since N(vt) ∩ S = {vij }. It is a contradiction that i1 + i2 + ··· + ik is maximum and t > ij. Without loss of generality, we assume v = vt and u = vm with t > m. If uv ∈ E(G), then vvij ∈ E(G) since ij > m and t > m. Thus, |N(v) ∩ S| ≥ 2. Hence, v ∈ U, a contradiction to v ∈ Q(vil ). Let W = V (G)/(S ∪ U). We direct the edges of G as follows: The direction of the edges between S and V (G) − S is from S to V (G) − S; The direction of the edges between U and W is from U to W ; For any edge vivj ∈ G[U] or G[W ], the direction vivj is from vi to vj if and only if i < j. → After given all the edges an direction by such method, we obtain the orientation G. If G is + Kn, it is obviously that g(G) = g (G) = n. Thus we assume that G isn’t . So, the maximum independent set S of G has at least two vertices. Let M = S ∪ U ∗ ∪ W ∗ be a

7 → minimum geodetic set of G, where U ∗ ⊆ U and W ∗ ⊆ W . In what follows, we will show that → M is also a geodetic set of the underlying graph G. Therefore, g+(G) ≥ g(G) ≥ g(G). ∗ ∗ For any vertex v ∈ U/U , since |N(v) ∩ S| ≥ 2, we know v ∈ IG(S). If W/W = ∅, then the proof is completed. So we assume W/W ∗ 6= ∅. For any vertex v ∈ W/W ∗, since the subgraph induced by Q(vij ) is clique for any vij ∈ S and there does not exist any edge between Q(vij ) → ∗ ∗ and Q(vil ) for j 6= l, v does not lie in any x-y geodesic of G with x ∈ W and y ∈ W . v must → lie on some x-y geodesic of G with x ∈ S and y ∈ W ∗ since any vertex in U has at least two neighbors in S. Note that the subgraph induced by Q(vij ) is clique for any vij ∈ S, we know the → length of the x-y geodesic in G is three. Thus, we assume that the x-y geodesic is x − u − v − y, where x ∈ S, u ∈ U, v ∈ W/W ∗ and y ∈ W ∗. Now we show that x − u − v − y is also an x-y geodesic in underlying graph G. Note that x is not adjacent to y in G. We assume the distance between x and y is two and x − w − y is an x-y geodesic in G. We easily know w ∈ W → since x ∈ S. Otherwise, x − w − y is an x-y geodesic of G, a contradiction to x − u − v − y → is an x-y geodesic of G. Obviously, w and y belong to some Q(z) with z ∈ S and z 6= x since xy∈ / E(G). Thus, w has at least two neighbors x and z in S. It is a contradiction to w ∈ W . Hence, the distance between x and y in underlying graph G is at least three. It implies that the → x-y geodesic x − u − v − y in G is also an x-y geodesic of underlying graph G. → From above discussion, if M is a minimum geodetic set of G, we know v ∈ IG(M) for any v ∈ V (G)/M. Hence, M is also a geodetic set of underlying graph G. This complete the proof. 2

References

[1] T. Bonnesens and W. Fenchel, Theorie der Konvexen K¨orper, Springer, Berlin, 1934 (Translated by L.Boron, C.Christenson, B. Smith, Theory of convex Bodies, BCS Associates, Moscow, ID, 1987). [2] F. Buckley and F. Harary, Distance in Graphs, Addison-Wesley, Redwood City, CA, 1990. [3] G. J. Chang, L. D. Tong and H. T. Wang, Geodetic spectra of graphs, European J. Combin.25(2004), 383-391. [4] G. Chartrand, F.Harary and P. Zhang, Extremal problems in geodetic graph theory, Congr. Num- ber.130(1998), 157-168. [5] G. Chartrand, F.Harary and P. Zhang, On hull number of a graph, Ars Combin. 20(2000), 181-189.

[6] G. Chartrand, F.Harary and P. Zhang, The geodetic number of a graph, Networks 39(2002), 1-6. [7] G. Chartrand and P. Zhang, The forcing geodetic number of a graph, Discuss. Math. Graph Theory 19(1999), 45-48.

[8] G. Chartrand and P. Zhang, Realizable ratios in graph theory: geodesic parameters, Bull. Inst. Combin. Appl.27(1999), 69-80.

8 [9] G. Chartrand and P. Zhang, The geodetic number of an oriented graph, European J. Combin. 21 (2000), 181-189.

[10] G. Chartrand and P. Zhang, The forcing hull number of a graph, J. Combin. Math. Combin.Comput. (in press).

[11] M. G. Everett and S. B. Seidman, The hull number of a graph, DiscreteMath. 57(1985), 185-190.

[12] F. Harary and J. Nieminen, Convexity in graph, J. Differential Geom. 16 (1981), 185-190. [13] C. Lu, The geodetic numbers of graphs and digraphs, Preprint of Department of Mathematics, ECNU (2004).

[14] H. M. Mulder, The expansion procedure for graphs, in R. Bodendiek(Ed.), Contemporary Methods in Graph Theory, Wissenschaftsverlag, Mannheim, 1990, 459-477. [15] D. B. West, Introduction to Graph Theory. 2nd ed., Prentice Hall, Inc., NJ, 2001.

9