a polynomial algorithm for constructing the clique graph of a line graph

6

Click here to load reader

Upload: bruce-hedman

Post on 21-Jun-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A polynomial algorithm for constructing the clique graph of a line graph

Discrete Applied Mathematics 15 (1986) 61-66 61

North-Holland

A POLYNOMIAL ALGORITHM FOR CONSTRUCTING THE CLIQUE GRAPH OF A LINE GRAPH

Bruce H E D M A N Department of Mathematics, University of Connecticut, Trout Brook and Asylum A venues, West Hartford, CT 06117, USA

Received 12 February 1985 Revised 27 January 1986

We will consider only finite, undirected, connected graphs without loops or multiple edges. A

clique of graph G is a maximal complete subgraph of G. The clique graph K(G) of graph G is the intersection graph of the cliques of G. The line graph L(G) of graph G is the intersection

graph of the edges of G. Thus, K(L(G)) is the clique graph of the line graph of G. This paper presents a five-step algorithm for constructing K(L(G)). As applications of the

algorithm the results of two previous papers on K(L(G)) are subsumed as easy corollaries. Finally, additional corollaries are presented, including a description of K(L(Kn)).

This algorithm is on the order O(n3), whereas constructing the clique graph of a general graph

is NP-complete.

1. Terminology

For terms not defined below we will follow Harary [1]. We will consider only finite, undirected, connected graphs without loops or multiple edges. Denote the vertex set of graph G by V(G), the number of vertices by ] V I, and the edge set by E(G). If Vl and 02 are vertices of G connected by an edge, then denote this edge by VlV2. A star is a set of edges containing a common vertex. A cycle of three edges C 3 will be called a triangle. Two triangles with a common edge are called adjacent. The degree degG(v) of a vertex v is the number of edges of G containing v; this may be written deg(v) when G is understood. A vertex v of a triangle C 3 with

deg(o)_> 3 is called an outlet of C 3. A clique of graph G is a maximal complete subgraph of G. The clique graph K(G)

of graph G is the intersection graph of the cliques of G. The line graph L(G) of graph G is the intersection graph of the edges of G. Thus, K(L(G)) is the clique graph of the line graph of G. I f S is a maximal, pairwise-intersecting set of edges of G, denote the clique of L(G) corresponding to S by K(L(S)). If k ~ V(K(L(G)), then k corresponds to a clique of L(G); call it K l(k). If So_ V(L(G)), then S cor- responds to a subset of edges of G; call it L l(s) . For k~ V(K(G)) we may more concisely write L l (K-l(k)) as (LK) l(k).

We will assume I V I ->4, since the clique graph of a line graph of a connected graph on three or fewer vertices is the trivial graph.

0166-218X/86/$3.50 (c) 1986, Elsevier Science Publishers B.V. (North-Holland)

Page 2: A polynomial algorithm for constructing the clique graph of a line graph

62 B. Hedman

2. The algorithm

For subsequent reference we need first to state a rather obvious lemma.

Lemma 2.1. For k e V(K(L(G))), (LK)-l(k) is either a tr&ngle or a star.

Algorithm 2.2. To construct K(L(G)) for any graph G on at least four vertices: Step O. Color the vertices of G black. Step 1. For every triangle C 3 with three outlets, add a new vertex ti, connect it to

each vertex of C 3, and color it red. Step 2. For every triangle C 3 with exactly two outlets, color red its third vertex s]

(a non-outlet). Step 3. For every triangle C 3 with exactly one outlet, delete one of the other two

vertices and color red the third one, s 2. Step 4. Add edges titj, tis), or sis) between every pair of red vertices contained in

adjacent triangles. Step 5. Delete f rom G all black vertices of degree 1.

Theorem 2.3. The graph G* constructed by Algorithm 2.2 & K(L(G)).

The following sequence of diagrams illustrates these five steps (see Fig. 1). Since Algorithm 2.2 necessitates finding all triangles among the n vertices of a

graph it is of the order O(n3). Computing the clique graph of a given graph, in contrast, is well-known to be NP-complete [3].

Proof . First, we will define a function f : V(K(L(G)))-, V(G*), and then show that it is onto, one-to-one, and edge-preserving.

For k ¢ V(K(L(G))), Case 1. If IK 1(k)1_>4, then by Lemma 2.1 the edges of (LK)-1(k) have a com-

mon vertex; call it g. Define f(k)=g. Case 2. If IK-l(k)] =3 and if (LK)-l(k) has common vertex g, then define

f(k) =g. Case 3. If IK-l(k)[ =3 and if (LK)-1(k) is a triangle C~ of G with three outlets,

define f(k) = t i (Step 1 of Algorithm 2.2). Case 4. If ]K l(k)l =3 and if (LK) l(k) is a triangle C/3 of G with exactly two

outlets, define f (k)= s] (Step 2 of Algorithm 2.2). Case 5. If IK l(k)l =3 and if (LK)-I(k) is a triangle C/3 of G with exactly one

outlet, define f ( k )=s 2 (Step 3 of Algorithm 2.2). Case 6. If IK l(k)l =2 , then denote the common vertex of the two edges in

(LK) l(k) by g, and define f (k)=g. Since I V I _> 4, we know I K - l(k) l _ 2. Now we will show that f is onto. Choose any vertex g of G*. Either g e T or g e G.

If gET, then for some i ,g=t i corresponding to a triangle C 3 in G with three

Page 3: A polynomial algorithm for constructing the clique graph of a line graph

A n algorithm for constructing K(L)G)) 63

G S TEP I

STEP II ST EP III

S T E P I V S T E P V KCLCG))

• BLACK bRED

Fig. 1.

outlets. Let k=K(L(C3)), and note f (k)=g. I f g e G , then originally in G,

degG(g)>3 or degG(g)=2. If degG(g)>3, denote the edges containing g by {el . . . . . en}, n > 3 . Clearly, this is a maximal pairwise-intersecting subset of edges of G; let k=K(L({el . . . . . en})) and f (k)=g. If degG(g) =2, then denote the edges by el,e2 and the adjacent vertices by gl and g2- If glg2~E(G), then let k=K(L({el,ez})) and f (k)=g. If gjg2eE(G), then g, gl, and g2 are vertices of a triangle of G; call it C/3. Either C/3 has one or two outlets. If C 3 has one outlet, then g=s 2. Let k=K(L(Ci3)) so f (k)=g. I f C/3 has two outlets, then g=s). Let k=K(L(Ci3)) so f (k)=g.

Now we will show that f is one-to-one. Note that, unless f(k) e T, by definition of f we know f(k) e (LK)-l(k). Consider kl, k2 e V(K(L(G))) where f (k l) =f(k2). I f (LK)-1(kl) is a triangle C/3 of G with one, two, or three outlets, respectively, then f (k l) is s 2, si l, or ti, respectively. Then f(k2) is s 2, s], or t i respectively, and k, = k 2 = C/3 as C/3 is the only clique mapped by f onto s 2, s), or ti, respectively. I f

Page 4: A polynomial algorithm for constructing the clique graph of a line graph

64 B. Hedman

neither (LK)-l(kl) nor (LK)-I(k2) is a triangle of G, then each is a star. But by the definition of f (case 1, 2, or 6) the common vertex of (LK) l(kl) is f(kl) and of (LK) 1(k2) is f(k2). But as f(kl)=f(k2) and as (LK)-I(kO is maximal, we conclude that kl = k2.

Now we will show that f is edge-preserving. First, assume that klk2E E(K(L(G))). This means that (LK)-l(kl) and (LK)-l(k2) are two maximal pairwise-intersecting sets of edges which share a common edge; call it el. I f neither (LK) l(kl) nor (LK)-l(k2) is a triangle, then each set of edges has a common vertex which, by the definition o f f (case I, 2 or 6), for (LK)-I(kl) is f (kl) and for (LK)-I(k2) is f(k2). Then f(kl) and f(k2) are connected by e 1 in G*. I f exactly one of (LK)-a(kl) and (LK)-I(k2) is a triangle C/3, say (LK)-l(kl), then f (kl) is either ti, Si 1, or S 2, depending upon whether C 3 has three, two, or one outlet. Since (LK)-I(k2) is a star f(k2) is a vertex of C 3 and so is connected to f (kl) in G* by either Step 1, 2, or 3 of the algorithm. I f both (LK)-I(kl) and (LK)-I(k2) are triangles, say C 3 and C 3, respectively, then assume both C 3 and C 3 have three

outlets. Then f (kl)= ti and f (k2)= t j are connected in G* by Step 4 of the algorithm. Assume exactly one of C 3 and C 9 has three outlets, say C 3, then f (k ,) = t i. Since C 3 shares edge el with C 3 then necessarily C 3 has two outlets, and f(k2) = s) is con- nected to f(kl) = t i in G* by Step 4 of the algorithm. Assume neither C 3 nor C 3 has three outlets, then, as they share a common edge e~, they each have two outlets. So f (kl) =si I and f ( k 2 ) = S ) are connected in G* by Step 4 of the algorithm.

Finally, we need to show tha t f - l is edge-preserving. As we have already shown that f is one-to-one and onto, we know there exists f - I : V ( G * ) ~ V(K(L(G))). Choose gl,g2 ~ V(G*) such that glgz~E(G*). Denote f - l (gl) by k I and f - l (g2 ) by k2. Assume both (LK) ~(kl) and (LK)-l(k2) are stars. Then the vertex common to the edges in (LK)-l(ki) is f (k l )=g 1, and the vertex common to (LK)-l(k2) is f(k2) =g2. As g¿ and g2 are connected in G*, we know (LK)-l(kO and (LK)-l(k2) share a common edge in G, and, hence, kl and k 2 a r e connected in K(L(G)). Assume exactly one of (LK)-l(kl) and (LK) l(k2) is a triangle C/3, say (LK)-l(Iq). Then gl = f (k l ) is ti, si 1, or s 2 depending upon whether C~ has three, two, or one outlet, respectively. We know (LK) l(k2) is a star with common vertex g2 =f(k2). Since g~ and g2 are connected in G*, we know g2 is a vertex of C/3 in G whether gl = ti, si l, or s 2. Thus (LK) l(kl) and (LK)-l(k2) have a common edge, and k I and k2 are connected in K(L(G)).

Next, assume both (LK) l(kl) and (LK)-I(k2) are triangles C~ and C 3, respec- tively, of G. If both C/3 and C ~ have three outlets, then gl = ti and g2 = ti. Since gl and g2 are connected in G*, by Step 4 of the algorithm we know C/3 and C9 are ad- jacent in G. Hence, (LK)-l(kl) and (LK) l(k2) share a common edge, and kl and k 2 are connected in K(L(G)). If exactly one of C/3 and C 3 has three outlets, say 6',-3, then gl=ti. Since g~ =t i is connected to g2 in G*, we know C~ must have two

2 2 outlets and g2 = s , - Then as t i and s) are connected by Step 4 of the algorithm we know C/3 and C/are adjacent triangles, and kl is connected to k 2 in K(L(G)). If neither 6',.3 nor C] have three outlets, then as gl and g2 are connected in G* we

Page 5: A polynomial algorithm for constructing the clique graph of a line graph

A n algorithm for constructing K(L)G)) 65

know C/3 and C 9 have two outlets apiece, and gl =s] and g2 =s) . As s] and s) are connected, we know by Step 4 of the algorithm that C 3 and C 3 are adjacent

triangles, and k I is connected to k2 in K(L(G)). []

3. Applications

We give five applications of Algorithm 2.2. Their proofs follow routinely from the algorithm, and are not included here. The first two are theorems about clique graphs of line graphs which have already appeared in the literature. But their proofs are greatly simplified when subsumed as corollaries of Algorithm 2.2.

In 1972 S.T. Hedetniemi and P.J. Slater [2] proved the following.

Corollary 3.1. I f G & a connected graph containing no triangles and at least three vertices, then K(L(G)) = G - { o : deg(o) = 1 }.

In 1978 I. Sato [4] proved the following characterization for graphs which are their own clique graphs of line graphs.

Corollary 3.2. Graph G satisfies K(L(G)) = G i f and only i f G satisfies the following three conditions:

(i) For all vE V(G), deg(o)>2. (ii) G has no adjacent triangles.

(iii) Every triangle o f G has exactly two outlets.

The algorithm allows us to make a more inclusive statement than Corollary 3.2. If there is a function f : V ( G ) ~ V(H) between two graphs G and H such that olo 2 ~E(G) implies f(ol)f(o2) ~E(H), then write G c H. If for all o ~ V(G) in graph G deg(o)>k, then G is called k-valent.

Corollary 3.3. I f G is a 2-valent graph which contains no tr&ngle with only one outlet, then G c_ K(L(G)).

Denote K(L(K(L(G)))) by (KL)2(G), and inductively K(L((KL) n I(G))) by (KL)n(G).

Corollary 3.4. I f G & 3-valent, then (KL)n(G) & 3-valent for n>_ 1, and

G c_ (KL)(G) c_ (KL)2(G) c_ ... c (KL)n(G).

Let K, be the complete graph on n vertices. Denote the ith binominal coefficient by (~).

Page 6: A polynomial algorithm for constructing the clique graph of a line graph

66 B. Hedman

Corollary 3.5. K(L(Kn)) has n+ (~) vertices. Of these the (~) vertices each have degree 3n - 6 while the n vertices each have degree (~). Hence, the number of edges in K(L(Kn)) is

(~) (nz-3n+4)2

References

[1] F. Harary, Graph Theory (Addison-Wesley, Reading, MA, 1969). [2] S.T. Hedetniemi and P.J. Slater, Line graphs of triangleless and iterated clique graphs, in: Y. Alavi,

D.R. Lich and A.T. White, eds. Graphs Theory and Applications (Springer, Berlin, 1972) 139-147. [3] H.D. Johnson, Cliques of a graph, Internat. J. Comput. Information Sci. 5 (3) (1976) 209-238. [4] 1. Sato, On a few clique graph equations, TRU Mathematics 14 (2) (1978) 31-36.