127 (2002) MATHEMATICA BOHEMICA No. 3, 473–480

GRAPHS ISOMORPHIC TO THEIR GRAPHS

1 2 Martin Knor ,Bratislava,Ľudovít Niepel ,Kuwait

(Received November 15, 2000)

Abstract. We prove that for every number n  1, the n-iterated P3- of G is isomorphic to G if and only if G is a collection of cycles, each of length at least 4. Hence, G is isomorphic to P3(G) if and only if G is a collection of cycles, each of length at least 4. ∼ Moreover, for k  4 we reduce the problem of characterizing graphs G such that Pk(G) = G to graphs without cycles of length exceeding k. Keywords: , path graph, cycles MSC 2000 : 05C38

1. Introduction

Let G be a graph, k  1, and let Pk be the set of paths of length k in G.The set of a path graph Pk(G)isthesetPk. Two vertices of Pk(G)arejoinedby an edge if and only if the edges in the intersection of the corresponding paths form a path of length k − 1inG, and their union forms either a or a path of length k + 1. It means that the vertices are adjacent if and only if one can be obtained from the other by “shifting” the corresponding paths in G. Path graphs were investigated by Broersma and Hoede in [2] as a natural general- ization of line graphs, since P1(G) is the line graph L(G)ofG (for further connections to line graphs see [6]). Traversability of P2-path graphs is studied in [9], and a char- acterization of P2-path graphs is given in [2] and [7]. properties of path graphs are studied in [1], [3] and [5], and in [4] graphs with connected P3-path graphs are characterized. When a new function on graphs appears, one of the very first problems is to determine the fixed points of the function, i.e., graphs that are isomorphic to their

1 Supported by VEGA grant 1/6293/99. 2 Supported by Kuwait University grant #SM 02/00.

473 images. It is well known (and trivial to prove) that a connected graph G is isomorphic to its line graph L(G) if and only if G is a cycle. In [2] it is proved that a connected graph G is isomorphic to its P2-path graph if and only if G is a cycle. We remark that Pk(G) is not necessarily a connected graph if G is connected and k  2. However, slight modifications of the proof in [2] give rise to the following theorem:

Theorem A. Let G be a graph isomorphic to P2(G). Then each component of G is a cycle.

i However, even stronger theorem follows from [5]. Let Pk(G)denotethei-iterated i i−1 0 Pk-path graph of G, i.e., Pk(G)=Pk(Pk (G)) if i>0, and Pk (G)=G.Wehave

Theorem B. Let G be a graph and n anumber,n  1, such that G is isomorphic n to P2 (G). Then each component of G is a cycle.

By now, only a little is known about Pk-path graphs for k  3.In[8]LiandZhao proved the following theorem:

Theorem C. Let G be a connected graph isomorphic to P3(G).ThenG is a cycle of length greater than or equal to 4.

In this paper we generalize Theorem C to an analogue of Theorem A for P3-path graphs:

Theorem 1. Let G be a graph isomorphic to P3(G). Then each component of G is a cycle of length greater than or equal to 4.

In fact, we prove more. We prove an analogue of Theorem B for P3-path graphs:

Theorem 2. Let G be a graph and n anumber,n  1, such that G is isomorphic n to P3 (G). Then each component of G is a cycle of length greater than or equal to 4. We remark that the proof of Theorem C in [8] is analogous to the proof of Theo- rem A (in a weaker form) in [2], and since it is based on some counting arguments, it is not clear how to extend it to the proof of Theorem 2. In fact, our approach to the problem is completely different. At present, we are not able to generalize Theorem 1 to Pk-path graphs for k  4. The problem seems to be too complicated in general; for a solution for graphs in which every component contains a “large” cycle see Lemma 3. Thus, for k  4it may be useful to start with trees, see also Corollary 6. However, even for trees the problem appears to be hard. In this connection we pose the following

474 i Problem. Does there exist a T and a number k, k  4, such that Pk(T ) is a nonempty forest for every i  0? P G k G If such a tree does not exist, then k(G) for every number and a forest . (We remark that the problem is trivial for k =1;fork = 2 it is solved negatively in [5]; and for k = 3 it is solved negatively by Lemma 7.) In the next two sections we prove Theorem 2. In Section 2 we present some general results for Pk-path graphs when k  2,andSection3isdevotedtoP3-path graphs of trees.

2. General results

We use standard graph-theoretic notation. Let G be a graph. The vertex set and theedgesetofG, respectively, are denoted by V (G)andE(G). If v is a vertex of G then degG(v) denotes the of v in G. For two subgraphs, H1 and H2 of G,we denote by H1 ∪ H2 the union of H1 and H2 in G,andbyH1 ∩ H2 their intersection. A path and a cycle, respectively, of length l are denoted by Pl and Cl. For easier handling of paths of length k in G (i.e., the vertices of Pk(G)) we make the following agreement. We denote the vertices of Pk(G) (as well as the vertices of G) by small letters a, b,..., while the corresponding paths of length k in G are denoted by capital letters A, B,....ItmeansthatifA is a path of length k in G and a is a vertex in Pk(G), then a must be the vertex corresponding to the path A. Throughout this section, the symbol k is used for the length of paths producing the path graph. I.e., we consider here only Pk-path graphs, k  2. By a large cycle we mean a cycle of length greater than k. A cycle whose length does not exceed k is a small cycle.

n ∼ Lemma 3. Let G be a graph such that Pk (G) = G for some n  1 and k  2. Then every component of G containing a large cycle is isomorphic to a single cycle. C P C ∼ n C ∼ ÈÖÓ Ó.If is a large cycle then k( ) = C, and hence Pk ( ) = C,too.As n ∼ n Pk (G) = G, all large cycles in Pk (G) are images of large cycles in G. If a and b are adjacent vertices in Pk(G), then A and B share a path of length k − 1. This implies that if C is a large cycle in G,thenPk(C) does not contain a n n chord in Pk(G), and hence, Pk (C) does not contain a chord in Pk (G), either. Since n the number of large cycles in G is equal to the number of large cycles in Pk (G), no large cycle contains a chord in G. Suppose that there is a large cycle in G with a vertex incident to an edge outside this cycle. For every large cycle C,letIG(C) denote the total number of edges outside C that are incident to a vertex of C.AsC does not contain a chord,

475 n n I Pk C · IG C I n P C · IG C I G Pk (G)( ( )) = 2 ( ), and Pk (G)( k ( )) = 2 ( ). Let ( )denotethe n n maximum value of IG(C), where C is a large cycle in G.ThenI(Pk (G)) = 2 ·I(G). n Since I(G) > 0, Pk (G) is not isomorphic to G. 

Lemma 4. Every small cycle in Pk(G) hasanevenlength. C a ,a ,...,a l P G l  k ÈÖÓ Ó.Let =( 1 2 l) be a small cycle of length in k( ), .If u and v are adjacent vertices in Pk(G), then U and V share a path of length k − 1. Since l  k, A1,A2,...,Al share a path P of length t  k − (l − 1)  1inG.Let P =(p0,p1,...,pt). Assume that A1 =(a1,0,a1,1,...,a1,k),...,Al =(al,0,al,1,...,al,k) are denoted so that for every i,1 i  l,wehavei0

Definition. Atree t is obtained from a claw 1,3 subdividing each edge of 1,3  by t − 1 vertices, see Figure 1 for 3.Atree t1,t2 is obtained from two paths of

length 2t1 central vertices of which are joined by a path of length t2,seeFigure2 

for 1,2 and Figure 3 for 2,1.

 

3: 1,2: 2,1:

  

Figure 1 Figure 2 Figure 3

C P  C  t

It is easy to see that Pk(k)= 3k and k( t,k−t)contains 4t,1 .Thus,  Pk-path graphs of trees containing a copy of k or t,k−t contain cycles. The next lemma shows a converse.

Lemma 5. If T is a tree such that Pk(T ) contains a cycle, then T contains either

  t

ÈÖÓ Ó. Only for this proof we define the notion of a turning path (see also [1]). Let (x0,x1,...,xl−1) be a closed walk of length l in Pk(G). Then for every i,0 i

476 Let T be a tree, and let C =(a0,a1,...,al−1) be a cycle of length l in Pk(T ). Since T is a tree, there are at least two turning paths among A0,A1,...,Al−1.Let

Ai1 and Ai2 be turning paths such that t =[(i2 − i1)modl] is the smallest possible.

Then Ai1 ∪ Ai1+1 ∪ ...∪ Ai2 forms a path of length k + t (the indices are modulo l).

If t  k,thenAi1−t ∪ Ai1−t+1 ∪ ...∪ Ai1 forms another path of length t + k,since

Ai1−t+1,Ai1−t+2,...,Ai1−1 are not turning paths. As Ai1 −1 = Ai1 +1, T contains k.

Thus, suppose that t

and Ai2 =(p0,p1,...,pl ,c1,c2,...,ct). Then Ai1 ∪Ai1 +1∪...∪Ai2 =(bt,bt−1,...,b1, p0,p1,...,pl ,c1,c2,...,ct). Since t is the smallest possible distance between ver- tices of C corresponding to turning paths, we have Ai1−t ∪ Ai1−t+1 ∪ ...∪ Ai1 =

(bt,bt−1,...,b1,p0,p1,...,pl ,d1,d2,...,dt), where d1 = c1,andAi2 ∪ Ai2+1 ∪ ...∪

Ai2+t =(et,et−1,...,e1,p0,p1,...,pl ,c1,c2,...,ct), where e1 = b1.AsT is a tree  and l = k − t, T contains  t,k−t. ByLemma5andthenotebeforeit,wehave

Corollary 6. Let T be a tree. Then Pk(T ) contains a cycle if and only if T

  t

3. P3-path graphs

Definition. A caterpillar is a tree T with a path P =(v0,v2,...,vl), such that the eccentricity of vi is at most 2 in the component of T − E(P ) containing vi, 0  i  l.A3-caterpillar T is a caterpillar with a path P =(v0,v2,...,v3r)such that degT (vi)=2if0

T T  v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v0 v1 v2 v3 v4 v5 v6 Figure 4

In Figure 4 we have a 3-caterpillar T with 4 basic vertices v0, v3, v6 and v9.We remark that usually, the term caterpillar is used for a bit different tree. However, in this paper we use this notion only for the graph defined in the preceding definition. n ∼

Let G be a forest such that P3 (G) = G for some n  1. By Lemma 4, every cycle

  in P3(G) is a large cycle. Thus, G does not contain 3, 1,2 or 2,1 by Corollary 6,

477 n as otherwise P3 (G) contains a large cycle. In particular, since G does not contain

3, it is a disjoint union of caterpillars.

i Lemma 7. Let T be a caterpillar such that P3(T ) is a forest for every i  0. j Then there is j such that P3 (T ) is an empty graph. T P i T ÈÖÓ Ó.Let be a caterpillar such that 3( ) does not contain a cycle for every i  0. If the diameter of T is at most 4, then P3(T ) does not contain a path T P 2 T of length 3 (recall that does not contain  1,2), so that 3 ( ) is an empty graph. Hence, assume that the diameter of T is at least 5. If G is a tree, then at most one nontrivial component of P3(G) is different from a complete , see [4, Corollary 5]. Since the diameter of a is at most two, at most one nontrivial component of P3(T )isa caterpillar containing a path of length 3. Hence, in what follows it is enough to consider this unique “large” caterpillar of P3(G). Let T be a 3-caterpillar with a path P =(v0,v1,...,v3r) denoted as in the defin- ition above. Then T has exactly r + 1 basic vertices. Let Vi =(vi,vi+1,vi+2,vi+3), 0  i  3r − 3. Then the (large) caterpillar T of P3(T ) is a 3-caterpillar with a path P =(v1,v2,...,v3r−3) with exactly r basic vertices, see Figure 4. Hence, the r r+2 caterpillar of P3 (T ) is a 3-caterpillar with a unique basic vertex, so that P3 (T )is an empty graph. To prove the lemma it is enough to concentrate on caterpillars that are not 3- ∗ ∗ ∗ caterpillars. These caterpillars T contain a pair of vertices u1 and u2 at a distance ∗ ∗ either 3j +1 or3j +2 suchthatdegT ∗ (u1)  3 and degT ∗ (u2)  3. Moreover, ∗ ∗ ∗ ∗ ∗ if the distance from u1 to u2 is 3j +1 and Q is a path joining u1 with u2,then ∗ ∗ ∗ ∗ the eccentricity of ui in the component of T − E(Q ) containing ui is at least 2, j ∗ i ∈{1, 2}. In what follows consider the caterpillar T of P3 (T ). By our assumption, T is not a 3-caterpillar and it contains two vertices u1 and u2 at a distance either 1or2suchthatdegT (u1)  3 and degT (u2)  3. Moreover, if u1u2 ∈ E(G)then the eccentricity of ui in the component of T −{u1u2} containing ui is at least 2, i ∈{1, 2}. u P T If 1 and u2 have distance 2 then T contains  1,2,sothat 3( ) contains a large cycle. Now consider a caterpillar T with u1u2 ∈ E(T ). Let Co(u1)andCo(u2)be components of T −{u1u2} containing u1 and u2, respectively. As mentioned above, the eccentricities of u1 and u2 in these components are at least 2. However, if both P of them exceed 2, then 3(T )contains 1,2. Thus, suppose that the eccentricity of u1 in Co(u1) is exactly 2. Then Co(u1) consists of at most 2 paths of length 2 rooted in u1 and of some edges incident

478

P T P with u1.OtherwiseT contains  1,2 or 3( )contains 3. Moreover, as iterated 3- T u u j u ∈ V u path graphs of do not contain  1,2, the distance from 2 to is 3 if (Co( 2)) and degT (u)  3. We distinguish two cases. u × 1: There are exactly two paths of length 2 rooted in 1.

If the eccentricity of u2 is at least 5 in Co(u2), then P3(T )contains 3.Onthe other hand, if the eccentricity of u2 is at most 4 in Co(u2), then the caterpillar T

of P3(T ) is a 3-caterpillar, or P3(T )contains 1,2, see Figure 5. (We remark that U =(u1,u2,u3,u4). Extra edges that are possibly in T or in T , are represented by halfedges in Figure 5.)

T T  u1 u2 u3 u4 u Figure 5

T u T

u1 u2 u3 u4 u5 u6 u7 u2 u1 Figure 6

u × 2: There is exactly one path of length 2 rooted in 1. Let (u2,u3,...,uk)bealongestpathofCo(u2)rootedinu2.DenotebyT the caterpillar of P3(T ), U2 =(u1,u2,u3,u4)andU1 =(u2,u3,u4,u5)(ifu5 exists), seeFigure6.LetCo(u1)andCo(u2) be defined analogously to Co(u1)andCo(u2) above. If the eccentricity of u2 is at least 6 in Co(u2) (i.e., if k  8), then the eccentricities 2 of u1 and u2 are greater than 2 in Co(u1)andCo(u2), respectively. Hence, P3 (T )

contains 1,2, a contradiction. If the eccentricity of u2 is at most 2 in Co(u2) (i.e., if k = 4), then T is a 3- T caterpillar (recall that does not contain 1,2). Let u be a vertex adjacent to u2, u = u3, such that degT (u)=2,seeFigure6.If k =7thenT is of the type already solved in Case 1, and if 5  k  6thenT is of the type from Case 2 and all (but one) neighbours of u2 have degree 1 in Co(u2). Hence, we may assume that all neighbours of u2 (except u3)havedegree1inCo(u2). Now if k =7thenT is of the type from Case 2 with the eccentricity of u2 exactly 3inCo(u2), and if 5  k  6thenT is a 3-caterpillar.  t By Lemma 7, for every caterpillar T there is a number t such that P3 (T )isan t empty graph or P3 (G) contains a large cycle. Thus, for every n, n  1, we have n G G P3 (G) if is a forest, which completes the proof of Theorem 2.

479 References

[1] Belan A., Jurica P.: Diameter in path graphs. Acta Math. Univ. Comenian. New Ser. 68 (1999), 111–126. [2] Broersma H. J., Hoede C.: Path graphs. J. 13 (1989), 427–444. [3] Knor M., Niepel Ľ.: Centers in path graphs. J. Comb. Inf. Syst. Sci. 24 (1999), 79–86. [4] Knor M., Niepel Ľ.: Connectivity of path graphs. Discuss. Math., Graph Theory 20 (2000), 181–195. [5] Knor M., Niepel Ľ.: Distances in iterated path graphs. To appear in Discrete Math. [6] Knor M., Niepel Ľ.: Path, trail and walk graphs. Acta Math. Univ. Comenian. New Ser. 68 (1999), 253–256. [7] Li H., Lin Y.: On the characterization of path graphs. J. Graph Theory 17 (1993), 463–466. [8] Li X., Zhao B.: Isomorphisms of P4-graphs. Australas. J. Comb. 15 (1997), 135–143. [9] Yu X.: Trees and unicyclic graphs with graphs. J. Graph Theory 14 (1990), 705–708.

Author’s address: Martin Knor, Slovak University of Technology, Faculty of Civil Engi- neering, Department of , Radlinského 11, 813 68 Bratislava, Slovakia, e-mail: [email protected]; Ľudovít Niepel, Kuwait University, Faculty of Science, Depart- ment of Mathematics & Computer Science, P.O. Box 5969, Safat 13060, Kuwait, e-mail: [email protected].

480