• No results found

A linear time algorithm to compute square of interval graphs and their colouring

N/A
N/A
Protected

Academic year: 2021

Share "A linear time algorithm to compute square of interval graphs and their colouring"

Copied!
11
0
0

Loading.... (view fulltext now)

Full text

(1)

Available online atwww.sciencedirect.com

ScienceDirect

AKCE International Journal of Graphs and Combinatorics 13 (2016) 54–64

www.elsevier.com/locate/akcej

A linear time algorithm to compute square of interval graphs and

their colouring

Satyabrata Paul

a,∗

, Madhumangal Pal

a

, Anita Pal

b

aDepartment of Applied Mathematics with Oceanology and Computer Programming, Vidyasagar University, Midnapore 721102, India bDepartment of Mathematics, National Institute of Technology Durgapur, Durgapur 713209, India

Received 6 September 2015; received in revised form 8 February 2016; accepted 20 February 2016 Available online 31 March 2016

Abstract

The square of a graph G =(V, E), denoted by G2, is a graph on the same vertex set V(G) such that two vertices x and y are adjacent in G2if and only if there is a path of length one or two between x and y in G. In this article, a new linear time algorithm is presented to compute G2from G when G is an interval graph. Also a linear time algorithm is designed to find all the maximal cliques of G2from G. Application of square of interval graphs in the field of L(h, k)-labelling problem is also discussed. Finally, it is shown that L(1, 1)-labelling number of an interval graph can be computed in linear time.

c

⃝2016 Kalasalingam University. Publishing Services by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

Keywords:Interval graph; Square of graph; Clique; L(1, 1)-labelling

1. Introduction

The kth power of a graph G denoted by Gkis a graph having the same vertex set as G and the distance between two vertices in Gkis one if and only if the distance between these two vertices in G is at most k. Obviously, G1=G. Due to their interesting properties and wide range of applications, power graph has been widely studied in the past. Power graph can be applied in different fields like routing in network, quantum random walk in physics, etc. The problem of colouring of power of graphs has also been considered in the past where the power of some specific classes of graphs like planar graph [1] and chordal graphs [2] has been studied. Vertex colouring of power of graphs has been used to solve different problems like interleaving [3], distributing data storage [4], sphere packing [5], etc. Square of graphs are also very useful in the study of radio communication networks. Vertex colouring of square of graphs are used to solve L(1, 1)-labelling problem of graphs. Again L(1, 1)-labelling problem has wide range of applications in the field of radio communication, mobile networking, frequency assignment [6], etc. L(1, 1)-labelling problem is a particular case of L(h, k)-labelling problem for h = k = 1.

Peer review under responsibility of Kalasalingam University. ∗Corresponding author.

E-mail addresses:[email protected](S. Paul),[email protected](M. Pal),[email protected](A. Pal).

http://dx.doi.org/10.1016/j.akcej.2016.02.007

0972-8600/ c⃝2016 Kalasalingam University. Publishing Services by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

(2)

1.1. L(h, k)-labelling problem

The definition of L(h, k)-labelling is as follows.

Definition 1. L(h, k)-labelling of a graph G = (V, E) is a function f from V to the set of non-negative integers {0, 1, . . . , λ} such that | f (x) − f (y)| ≥ h if d(x, y) = 1 and | f (x) − f (y)| ≥ k if d(x, y) = 2, where d(x, y) is the length of the shortest path (i.e. the number of edges) between the vertices x and y.

The span of L(h, k)-labelling is the difference between largest and smallest used labels. The minimum span over all possible labelling functions is denoted byλh,k(G).

For different values of h and k different problems have been addressed by the researchers. Roberts [7] investigated the problem for the case of h = k = 1, i.e. L(1, 1)-labelling problem. Griggs and Yeh [8] studied the problem for the case of h = 2 and k = 1. Bertossi and Bonuccelli [9] introduced a kind of integer control code assignment in packet radio networks to avoid hidden collisions. This problem is equivalent to the L(0, 1)-labelling problem. Also, channel assignment in optical cluster-based networks can be modelled either as the L(0, 1)- or L(1, 1)-labelling problem. In general, channel assignment problems, with a channel defined as a frequency, a time slot, a control code, etc. can be modelled by an L(h, k)-labelling problem, for suitable values of h and k. In the literature, there are so many results related to L(h, k)-labelling problem [6] are available. In this paper, we focus our attention on L(1, 1)-labelling of

interval graphs. 1.2. Interval graph

An undirected graph G = (V, E) is said to be an interval graph if the vertex set V can be put into one-to-one correspondence with a set I of intervals on the real line such that two vertices are adjacent in G if and only if their corresponding intervals have non-empty intersection, i.e. there is a bijective mapping f : V → I .

The set I is called an interval representation of G and G is referred to as the interval graph of I .

Interval graphs arise in the process of modelling many real life situations, specially involving time dependencies or other restrictions that are linear in nature. This graph and various subclass thereof arise in diverse areas such as archaeology, molecular biology, sociology, genetics, traffic planning, VLSI design, circuit routing, psychology, scheduling, transportation etc. Recently, interval graphs have found applications in protein sequencing, macro substitution, circuit routine, file organization, job scheduling, routing of two points nets and so on. In addition to these, interval graphs have been studied intensely from both the theoretical and algorithmic point of view. A brief discussion about interval representation of interval graphs and their properties are presented in Section2.

1.3. Motivation of the work

Due to wide range of applications, L(h, k)-labelling problems has been widely studied over the lase two decades. In the algorithmic point of view the problem is NP-complete for general graphs. In case of interval graph, L(0, 1)-labelling problem is polynomially solvable [10] and the complexity is still open for L(2, 1)-labelling problem [11]. But, there is no such algorithm for L(1, labelling of interval graph. Motivated from these we studied L(1, 1)-labelling problem on interval graphs. To solve the problem we find the square of the given graph. Square of a graph play an important role in the field of graph theory. Note that the square of an interval graph is also an interval graph [12]. Thus designing a simple linear time algorithm to compute square of graphs is also the motivation of our work.

1.4. Our contribution

To the best of our knowledge there is no algorithm is available to compute the interval representation of G2from an interval representation of G. In this paper, a linear time algorithm is designed to compute interval representation of G2. Also, a linear time algorithm is presented to compute all maximal cliques of G2. A good relationship is established between L(1, 1)-labelling of a graph and colouring of square of graph. By using this relation we prove that L(1, 1)-labelling of interval graphs can be computed in linear time.

(3)

Fig. 1. An interval representation and the corresponding interval graph G.

2. Preliminaries

The graphs used in this work are connected, simple, i.e. without self loop or multiple edges. Let G = (V, E) be a graph with vertex set V and edge set E . d(vi, vj) be denote the distance between vi and vj in a graph G,

which is the length of the shortest path joiningvi andvj. N1(vi) = {vj ∈ V :(vi, vj) ∈ E} denotes the set of one

neighbours (or nbd) called the open neighbourhood of the vertexvi. The set N1[vi] =N1(vi)∪{vi}denotes the closed

neighbourhood ofvi. Similarly, 2-nbd vertices of x is denoted by N2(x) and is defined as N2(x) = {y|d(x, y) = 2}.

deg(vi) represents the degree of the vertex vi. Number of edges and vertices of a graph G is denoted by m and n

respectively. A set C ⊆ V is called a clique if for every pair of vertices of C has an edge. The number of vertices of the clique represents its size. A clique C of a graph G is called maximal if there is no clique of G which properly contains C as a subset. Again, a clique with r -vertices is called r -clique. A clique is called maximum if there is no clique of G of larger cardinality. The number of vertices of the maximum clique of G is denoted byω(G) and is called the clique number of G.

The definition of interval graph is given below.

Definition 2 (Interval Graph). An undirected graph G = (V, E) is an interval graph if the vertex set V can be put into one-to-one correspondence with a set of intervals I on the real line R such that two vertices are adjacent in G if and only if their corresponding intervals have non-empty intersection.

Here, we assume that the input graph is given by an interval representation I which is the set of n sorted intervals labelled by 1, 2, . . . , n.

Let I = {I1, I2, . . . , In}, where Ij = [aj, bj], j = 1, 2, . . . , n; be the interval representation of the given interval

graph G = (V, E), V = {v1, v2, . . . , vn}, aj and bj are respectively the left and the right endpoints of the interval

Ij. Without any loss of generality, we assume that each interval contains both its endpoints and that no two intervals

share a common endpoint. Also, we assume that the intervals in I are indexed by increasing right endpoints, that is, b1< b2< · · · < bn. This indexing is known as IG ordering.

Let us define an array e = {e1, e2, . . . , e2n}which contains the 2n end points on n intervals of an interval graph

Gon real line R in increasing order. That is, the array e is the collection of all aj’s and bj’s for all j = 1, 2, . . . , n.

For example, for the graph ofFig. 1, e = {a1, a3, b1, a5, . . . , b11}, i.e. e1=a1, e2=a3, e3=b1and so on. For each

element ei of e, three fields, ei.val, ei.int and ei.type are define as follows.

ei.val = value of the real line of the ith endpoint ei,

ei.int = k if ei is the endpoint of the interval Ik,

ei.type =

a, if the endpoint e

ileft endpoint

b, if the endpoint eiright endpoint

For the graph G, we assume that the difference between any two consecutive ei.val is one unit on R.

InFig. 1, a set of n intervals and their interval representation are given. In this figure, for i = 1, e1.val = 1, e1.int = 1 and e1.type = a.

(4)

For i = 2,

e2.val = 2, e2.int = 3 and e2.type = a.

For i = 21,

e21.val = 21, e21.int = 10 and e21.type = b.

For i = 22,

e22.val = 22, e22.int = 11 and e22.type = b.

Interval graphs and many of its applications are discussed extensively in [13–20]. This graph satisfies lot of intersecting properties. We just point out some of them.

Lemma 1 ([21]). The graph G is an interval graph if and only if there exist an ordering of its verticesv1 < v2 <

v3< · · · < vnsuch thatvi < vj < vl and(vi, vl) ∈ E then (vj, vl) ∈ E.

Lemma 2 ([13]). The maximal clique of an interval graph G can be linearly ordered such that for every vertex vi ∈G, the maximal clique containingvi occurs consecutively.

2.1. Notation

Here we present some notations which are necessary for the rest of the paper.

For each vertexvj, m(vj) represents the highest number vertex of N1(vj). That is, m(vj) = max N1(vj), j =

1, 2, . . . , n − 1 and m(vn) = vn, where n is the number of vertices.

Let M represent the set of vertices m(vj), j = 1, 2, . . . , n,

i.e. M = {m(vj), j = 1, 2, . . . , n}.

The vertices are ordered according to the increasing values of right endpoints (b’s) on real line. We can also say that the vertices are ordered according to the increasing value of ei.val where ei.type = b.

Let ei be the right endpoint of the interval Ijcorresponding to the vertexvj. Thus,

ei.val = value of ith endpoint on real line,

ei.int = j and

ei.type = b.

For each interval Ij, j = 1, 2, . . . , n corresponding to the vertex vj, we define the followings:

bmj: is the right endpoint of the interval corresponding to the vertex m(vj), j = 1, 2, . . . , n and

a∗j: is the nearest left endpoint from bmj such that bmj < a∗j.

For some vertexvj (or interval Ij), a∗j may not be exist. In this case we consider a ∗ j =0.

For each ei.type = b and ei.int = j, let us define an array em which contains the value of bmj, j = 1, 2, . . . , n on

real line. Thus,

eim.val = value of bmj endpoint on real line, and eim.type = b.

Again, for each ei.type = b and ei.int = j, we define an array e∗which contains the value of a∗j, j = 1, 2, . . . , n

on real line. Thus,

ei∗.val = value of a∗j endpoint on real line, and eim.type = a.

If a∗j for some j ∈ {1, 2, . . . , n} does not exist (i.e. a∗j =0) then we call that the corresponding e∗i does not exist. In this case, we set a very large value (say L) for e∗i.val. Thus, if a∗j =0 then e∗i.val = L (where L tends to infinity on R).

For the graph ofFig. 1, for each ei.type = b, eim, ei∗and e∗i.val are shown inTable 1.

Now, we define an array E = {E1, E2, . . . , E2n}, where Ei is the i th endpoint of the graph G2. Like ei, Ei also

contain three fields, say Ei.val, Ei.int, and Ei.type.

Lemma 3. If vi, vj ∈V andvi < vjthen m(vi) ≤ m(vj).

Proof. From the definition of m(vi), vi < m(vi) and the equality sign hold only when i = n. Thus, vi ≤m(vi) and

(5)

Table 1

The value of emi and e∗i.

ei.type = b emi e ∗

i e

∗ i.val e3.type = b em3 =e8 e∗3=e9 e∗3.val = e9.val e6.type = b em6 =e11 e∗6=e12 e∗6.val = e12.val e8.type = b em8 =e11 e∗8=e12 e∗8.val = e12.val e10.type = b em10=e18 e∗10=e19 e∗10.val = e19.val e11.type = b em11=e18 e∗11=e19 e∗11.val = e19.val e14.type = b em14=e21 e∗14does not exist e∗14.val = L e16.type = b em16=e21 e∗16does not exist e

∗ 16.val = L e18.type = b em18=e21 e∗18does not exist e∗18.val = L e20.type = b em20=e22 e∗20does not exist e∗20.val = L e21.type = b em21=e22 e∗21does not exist e

∗ 21.val = L e22.type = b em22=e22 e∗22does not exist e∗22.val = L

Case 1. Whenvi < vj < m(vi).

From the definition of m(vi), it is clear that there is an edge between vi and m(vi). Thus, from Lemma 1,

d(vj, m(vi)) = 1. Therefore the set N1(vj) must contain the vertex m(vi). So, m(vi) ≤ max N1(vj). That is,

m(vi) ≤ m(vj). Therefore, in this case vi < vj implies m(vi) ≤ m(vj).

Case 2. Whenvi < m(vi) < vj.

We have the result vj ≤ m(vj). So, vi < m(vi) < vj ≤ m(vj). Therefore, in this case vi < vj implies

m(vi) < m(vj).

Thus, from both the cases, we conclude thatvi < vj implies m(vi) ≤ m(vj). 

3. Square of an interval graph

Definition of square of an interval graph is stated below.

Definition 3. Let G =(V, E), where V = {v1, v2, . . . , vn}be an interval graph. The square of G denoted by G2of

Gis a graph having the same vertex set as G and having an edge connectingvi tovj if and only ifvi tovj are at

distance at most two in G.

In [12], Raychaudhuri shown that interval graph classes are closed under power. Thus we conclude the following lemma.

Lemma 4. If G is an interval graph then Gk is also an interval graph.

Here we present a linear time algorithm to find G2of an interval graph G. 3.1. Algorithm to compute G2

We assume that the distance between any two consecutive ej, j = 1, 2, . . . , n (for the input graph G) is one unit on

R. Our main aim is to compute the array E from e by adjusting the value of ejon real line. Since there are uncountable

number of points between two consecutive ej’s. Therefore, we can increase the value of ej(i.e. ej.val) and set ej.val

between two consecutive ej.val’s with there proper position to compute the graph G2. We call the new value of ej.val

as e′j.val. Finally, we set Ei, i = 1, 2, . . . , 2n for the ith endpoints of the interval representation of G2.

Since bj is the right endpoint of the interval corresponding to vj, bmj is the right endpoint of the interval

corresponding to the vertex m(vj) and a∗j is the nearest left endpoint of an interval (say Ik, i.e. a∗j =ak) from bmj such

that bmj < a∗j. Thus, in G2, the interval Ij (corresponding to the vertexvi) not intersect the interval Ik. Therefore, to

compute G2we have to increased the value of bj on R in such a way that the new value of bj is less than the value of

a∗j on R. Let ei′.val is the new value of bjin the interval representation of G2and ei∗.val is the value of a ∗

j. Again, let

ek.val and e∗i.val (where ek.val < e∗i.val) be the values of two consecutive endpoints of the interval representation

(6)

we set e′i.val = e∗i.val − ϵi. Therefore, if ϵi < 1 then the above condition hold. So, ϵ < i. Again, i takes the value from 1 to 2n. Thus, we setϵ < 1.

The algorithm is discussed below.

Algorithm IG2

Input: The array e = {e1, e2, . . . , e2n}of an interval graph G.

Output: The array E = {E1, E2, . . . , E2n}of an interval graph G2.

Initialization: Setϵ = 0.9 // We choose ϵ in such a way that ϵ < 1.// Step 1. for i = 1, 2, . . . , 2n

if ei.type = a then

set e′i.type = ei.type,

e′i.int = ei.int and

e′i.val = ei.val

end if;

Step 2. if ei.type = b then

set e′i.type = ei.type,

e′i.int = ei.int

Step 2.1: find e∗i.val Step 2.2: if e∗i.val = L then

set e′i.val = e2n.val + i.ϵ

else // if ei∗.val ̸= L // set e′i.val = ei∗.val −ϵi end if;

end if; end for;

Step 3. For each i th endpoint, we set Ei in such a way that if e′k

(for some k ∈ {1, 2, . . . , 2n}) be the ith endpoint of G2then Ei.type = e′k.type,

Ei.int = e′k.int and

Ei.val = ek′.val

end IG2.

3.2. Analysis of the algorithm

Some results related to the algorithm is discussed below. Lemma 5. G2maintain the same ordering of the vertices of G.

Proof. Since the vertices of an interval graph G are ordered by increasing right endpoints of the intervals. Thus, v1 < v2 < · · · < vn implies b1 < b2 < · · · < bn and vice-versa. Now we shown that algorithm IG2 maintain the

same ordering of vertices of G. That is, b1< b2< · · · < bnalso hold for G2.

Since the array e contain 2n endpoints on the real line R. Let bl =eiand bm =ejbe two right endpoints of G such

that bl < bm. Obviously, i < j. That is, ei.val < ej.val on R. Now, fromLemma 3, ifvi < vj then m(vi) ≤ m(vj).

That is, ei < ej implies eim≤emj and e∗i ≤e∗j. Different cases arise.

Case 1. When e∗i < e∗jfor i < j.

In this case, e∗i.val < e∗j.val and we set e′j.val as ei∗.val −ϵi. Now, i < j

i.e. −ϵ

i < −ϵj asϵ is constant

or, e∗i.val −ϵi < e∗j.val −ϵj this gives e′i.val < e′j.val

(7)

Case 2. When e∗i =e∗j for i < j.

In this case, e∗i.val = e∗j.val and we set ei′.val as e∗i.val −ϵi. Now, i < j

i.e. −ϵ

i < −ϵj asϵ is constant

or, e∗i.val −ϵi < e∗j.val −ϵj this gives e′i.val < e′j.val

finally bl < bm (for G2).

Case 3. When e∗ i and e

j does not exist (i.e. e ∗ i =e

j =L) for i < j.

In this case, we set e′i.val as e2n.val + i.ϵ.

Now, i < j

i.e. i.ϵ < j.ϵ as ϵ is constant or, e2n.val + i.ϵ < e2n.val + j.ϵ

this gives e′i.val < e′j.val finally bl < bm (for G2).

Thus, from all the cases we conclude that if bl < bmin G then it also true for the graph G2. Hence the lemma. 

Proof of correctness of algorithm IG2 is given below.

Theorem 1. Algorithm IG2 correctly compute the graph G2from G.

Proof. From the definition of G2, we have d(vi, vj) = 1 in G2if and only ifvi andvj are at distance at most two

in G. Thus all the 2-nbd vertices ofvj ∈V(G) with index greater than j must be adjacent to m(vj). Since bj is the

right endpoint of the interval corresponding tovj, bmj is the right endpoint of the interval corresponding to the vertex

m(vj) and a∗j is the nearest left endpoint of an interval (say Ik, i.e. a∗j =ak) from bmj such that bmj < a∗j. Thus, in

G2, the interval Ij (corresponding to the vertexvi) not intersect the interval Ik. Therefore, to compute G2we have to

increased the value of bj on R in such a way that the new value of bj is less than the value of a∗j on R. Thus, in Step

2.2, we set ei′.val = e∗i.val −ϵi, where ei∗.val is the value of a∗j on R. Here we choose ϵ in such a way that e′i.val lie between two consecutive ei.val’s in G. Now the distance between two consecutive ei.val’s (for the graph G) is one

unit on R. Therefore, if we set ϵ < 1 (since i = 1, 2, . . . , 2n) then the above condition hold.

Now, letvj ∈ V(G) such that a∗j =0. That is, in G2,vj is adjacent to all the vertices with index greater than j .

Thus, we can say that there is no vertexvk (>vj) in G2such that d(vk, vj) = 2 in G2. Therefore, in this case we

increase the right endpoint of Ij, i.e. bj and set the new value of bj after bn(i.e. e2n.val). Thus, in Step 2.2, we set

e′i.val = e2n.val + i.ϵ. Hence from the above discussion, we conclude that algorithm IG2 follow the definition of G2

and inLemma 5, we proved that algorithm IG2 follow the same vertex ordering of G. Therefore, we conclude that algorithm IG2 correctly compute the graph G2from a given interval graph G. 

Theorem 2. Time complexity of the algorithm is O(m + n).

Proof. In Step 1, for each ei, i = 1, 2, . . . , 2n, we have to check ei.val, ei.int and ei.type. Thus, for each ei, Step 1

take constant time. In Step 2, for each ei.type = b, we set e′i.type = ei.type, e′i.int = ei.int. So, this computation

also takes constant time. In Step 2.1, we have to find the value of e∗i.val. To compute e∗i.val, first we have to compute emi .val, which is the value bmj on R. Now, bmj can be computed by finding the vertex m(vj). So, eim.val can be

computed in O(deg(vj)) time. Now, to find e∗i.val, we have to scan the array e from emi .val to right. Since the graph

is connected, so there exist an interval (say Ip) which contains both the endpoints bmj and a∗j. Therefore, to compute

a∗j, it again take O(deg(vp)) time. Now, e∗i.val is the value of a∗j on R. So, to find e∗i.val, it take O(deg(vp))

time. In Step 2.2, to set e′i.val, it take constant time. Step 3. take O(n) time. Thus the overall time complexity is O( 1) + O( deg(vj)) + O( deg(vp)) + O( 1) + O(n), i.e. O(m + n) as O( deg(vj)) = O(m). Hence

(8)

Fig. 2. Interval representation of G2of the graph ofFig. 1computed by Algorithm IG2.

3.3. An example

We consider an interval graph (G) of 11 vertices (seeFig. 1) and compute the interval representation of G2(see

Fig. 2) by Algorithm IG2. For the graph ofFig. 1, ei.type = a hold for i = 1, 2, 4, 5, 7, 9, 12, 13, 15, 17, 19.

In this case ei′.type = ei.type = a, e′i.val = ei.val and e′i.int = ei.int.

Now, ei.type = b hold for i = 3, 6, 8, 10, 11, 14, 16, 18, 20, 21, 22.

In this case, e′i.type = b and e′i.int = ei.int.

Now, we find e′i.val for i = 3, 6, 8, 10, 11, 14, 16, 18, 20, 21, 22. For i = 3,

e3′.val = e∗3.val −ϵ3(see Table 1)

= e9.val −03.9 = 9 − 0.3 = 8.7 For i = 6, e6′.val = e∗6.val −ϵ6 = 11.85.

Similarly, e8′.val = 11.89, e′10.val = 18.91, e′11.val = 18.92. Now, for i = 14

e14′ .val = e22.val + i.ϵ (as e∗14.val = L)

= 22 + 14 × 0.9 = 34.6.

Similarly, e16′ .val = 36.4, e′18.val = 38.2, e20′ .val = 40, e′21.val = 40.9 and e22′ .val = 41.8. 4. Algorithm to compute all maximal cliques of G2

In this section, we design a linear time algorithm to find all the maximal cliques of G2when an interval graph G is given. There is an algorithm to compute all maximal cliques of an interval graph [22]. Thus, using the algorithm of [22], all maximal cliques can be computed in O(n +γ ) time for G2, as it is an interval graph, whereγ is the sum of the size of all cliques. In the following algorithm we find all the maximal cliques of G2without computing the graph G2.

Lemma 6. For each vertexvi ∈V in G, N1[m(vi)] form a clique in G2.

Proof. From the definition of m(vi), it is the highest number adjacent vertex of vi. That is, m(vi) is an adjacent vertex

ofvi with maximum right end point (b’s). Thus all the 2-neighbourhood vertices ofviwith index greater than i must

be adjacent to m(vi).

For somevi ∈V, let N1[m(vi)] is of the form.

N1[m(vi)] = {vi, vi1, vi2, . . . , m(vi), . . . , vik}.

Since N1[m(vi)] is a closed neighbourhood of m(vi), so it contains viand m(vi) both. Thus in G, distance between

any two vertices of N1[m(vi)] is at most 2. Again, G2contains the same vertex set of V having an edge connecting

(9)

The algorithm is as follows.

Algorithm MCG2

Input: Interval representation of an interval graph G =(V, E) Output: Maximal cliques of G2, i.e. Ci’s of G2.

Step 1. Find m(vi), i = 1, 2, . . . , n.

Step 2. Compute the set M. Let it be M = {v′ 1, v ′ 2, . . . v ′ k} Step 3. for j = 1 to k Step 3.1 Cj =N1[v′j]

Step 3.2 mark the vertices of Cj in V(G)

if all the vertices of V are marked then stop.

else

set j ← j + 1 and goto Step 3.1 end if;

end for; end MCG2.

In the next theorem a proof of correctness and the time complexity of Algorithm MCG2 is given. Theorem 3. Algorithm MCG2 correctly computes all maximal cliques (C’s) in O(m + n) time. Proof. In Step 3.1 of Algorithm MCG2, we compute Cj = N1[v′j], wherev

j ∈ M. Again, fromLemma 6, N1[v′j]

form a clique in G2. Now our aim is to show that the cliques are linearly ordered and the cliques are maximal. The elements of the set M are in increasing ordered and any two consecutive elements of M are adjacent. Letv′j andv′j +1be two consecutive elements of M. So, d(v′j, v′j +1) = 1. Therefore, v′j, v′j +1∈ N1[v′j]and N1[v′j +1]. That

is,v′j, v′j +1 ∈ Cj, Cj +1. Therefore Cj ∩Cj +1 ̸=φ and there common intersection contain at least two elements.

Therefore, the cliques are in linearly ordered. Now, in Step 3.2, mark the vertices of Cj in the list V and the process

will continue until all the vertices of V are marked. Within this computation, we now shown that all the cliques are maximal.

Suppose, for a vertexvi ∈ V in G, let m(vi) = v′j. So, N1[v′j]form a clique (by Lemma 6). If possible, let

N1[v′j] ∪ {vk}, wherevi < vkandvk ̸∈ N1[v′j]also form a clique in G2. Thus the distance betweenvi andvk is at

most 2 in G. So,vk must be adjacent tov′j as the right end point ofv ′

j is maximum among all the adjacent vertices

ifvi. Butvk ̸∈ N1[v′j], which contradict our assumption that d(vi, vk) ≤ 2. Therefore, d(vi.vk) > 2 in G. Hence

N1[v′j] ∪ {vk}does not form a clique and N1[v′j]is a maximal clique.

In Step 1, computation of m(vi) takes (deg(vi)) i.e. O(m) time. In Step 2, to compute the set M, takes O(n) time.

Cj is the closed nbd ofv′j, wherev′j ∈ M. Thus Step 3.1 take O(deg(v′j)) i.e. O(m) time. Similarly, Step 3.2 also

take O(m) time. Therefore, the overall time complexity of Algorithm MCG2 is O(m + n).  4.1. An example

We consider an interval graph(G) of 11 vertices (seeFig. 1) and compute all maximal cliques of G2by Algorithm MCG2.

By Step 1, m(v1) = v3, m(v2) = v5, m(v3) = v5, m(v4) = v8, m(v5) = v8, m(v6) = v10, m(v7) =

v10, m(v8) = v10, m(v9) = v11, m(v10) = v11and m(v11) = v11.

Now, in Step 2, the set M = {v3, v5, v8, v10, v11}.

By Step 3.1, C1=N1[v3] = {v1, v2, v3, v4, v5}.

By Step 3.2, marked vertices of V arev1, v2, v3, v4andv5.

Again, C2=N1[v5] = {v2, v3, v4, v5, v8}.

Therefore the marked vertices arev1, v2, v3, v4, v5andv8.

Now, C3=N1[v8] = {v4, v5, v6, v7, v8, v9, v10}.

So, the marked vertices arev1, v2, v3, v4, v5, v6, v7andv8.

(10)

Here, the marked vertices are v1, v2, v3, v4, v5, v6, v7, v8, v9, v10 andv11. So, all the vertices of V are marked.

Therefore, in this step the procedure is stopped. Hence the maximal cliques of G2are C1, C2, C3and C4.

5. L(1, 1)-labelling of interval graphs

Graph colouring problem is one of the key topics in the field of graph theory. Graph colouring are motivated by problems like channel assignment in wireless communications, traffic phasing, task assignment, fleet maintenance, etc. In vertex colouring of graph there is only one restriction on the adjacent vertices. L(h, k)-labelling problem is the generalization of vertex colouring problem where the adjacent vertices and the vertices at distance two are to be labelled. This labelling is also known as distance two labelling. Specially L(2, 1), L(0, 1) and L(1, 1)-labelling of graphs have been studied for their wide range of applications. Paul et al. [10] have shown that L(0, 1)-labelling

problem is polynomially solvable for interval graphs. We [11] also investigated L(2, 1)-labelling problem on interval graphs and find a good upper bound for these classes of graphs. In this article, we have shown that L(1, 1)-labelling problem on interval graph can be solved in linear time. The definition of L(1, 1)-labelling is as follows.

Definition 4. L(1, 1)-labelling of a graph G = (V, E) is a function f from V to the set of non-negative integers {0, 1, . . . , λ} such that | f (x) − f (y)| ≥ 1 if d(x, y) = 1 and | f (x) − f (y)| ≥ 1 if d(x, y) = 2, where d(x, y) is the length of the shortest path (i.e. the number of edges) between the vertices x and y.

The span of L(1, 1)-labelling is the difference between largest and smallest used labels. The minimum span over all possible labelling functions is denoted byλ1,1(G).

Some important results are discussed below.

Theorem 4. L(1, 1)-labelling problem of an interval graph G is equivalent to the vertex colouring problem of G2. Proof. In L(1, 1)-labelling, the label difference of two vertices is at least 1 if the vertices are adjacent and the label difference of two vertices is also at least one if the vertices are at distance two. Now in G2, d(vi, vj) = 1 if and only

ifvi andvj are at distance at most two in G. Thus, for the graph G2there is no restriction for distance two vertices

as d(vi, vj) = 2 in G converted to d(vi, vj) = 1 in G2. Therefore, L(1, 1)-labelling problem of G converted to

L(1, 0)-labelling problem of G2. In L(1, 0)-labelling problem there is no restriction for distance two vertices and if two vertices are adjacent then there label difference is at least one. Thus L(1, 0)-labelling problem is nothing but a simple vertex colouring problem. Hence the result. 

Since interval graphs are perfect [13]. Thus, the number colours needed to colour an interval graph G isω(G), whereω(G) is the clique number of G. Again, L(1, 0)-labelling problem is equivalent to graph colouring problem. Thus,λ1,0(G) = χ(G) = ω(G), where χ is the chromatic number of G. Pal et al. [21] have designed a linear time

algorithm to colour an interval graph. To do this, they use the interval representation of interval graph. Hence we conclude the following lemma.

Lemma 7 ([21]). An interval graph G can be labelled by L(1, 0)-labelling (or colouring) in O(n) time and λ1,0(G) = χ(G) = ω(G).

We recall that if G is an interval graph then G2is also an interval graph as interval graph classes are closed under power [12]. Therefore, we conclude the following result.

Theorem 5. An interval graph G can be labelled by L(1, 1)-labelling in O(m + n) time and λ1,1(G) = ω(G2).

Proof. From Theorem 4, L(1, 1)-labelling problem is equivalent to L(1, 0)-labelling problem of G2. Again, to compute the graph G2, O(m + n)-time is required (fromTheorem 2). Now, to label the graph G2, O(n)-time is required (fromLemma 7) as G2is an interval graph. It is well known thatλ1,0(G2) = χ(G2) = ω(G2). Therefore, λ1,1(G) = λ1,0(G2) = ω(G2). Thus, the overall time complexity to label an interval graph G by L(1, 1)-labelling is

(11)

6. Conclusion

L(1, 1)-labelling problem has been widely studied over last two decades. The problem is NP-complete for general graph. There are only few classes of graphs for which they have efficient algorithms. In this paper, we have shown that the problem is polynomially solvable for interval graph. Also a linear time algorithm is designed to compute the square of an interval graph. It would be interesting to design a linear time algorithm to compute the square of permutation and trapezoid graphs as they are the super classes of interval graphs.

References

[1] G. Agnarsson, M.M. Halld´orsson, Coloring powers of planar graphs, in: Proc. 11th Ann. SIAM Symp. on Discrete Algorithms, ACM-SIAM, 2000, pp. 654–662.

[2] G. Agnarsson, R. Greenlaw, M.M. Halldorsson, On powers of chordal graphs and their colorings, Congr. Numer. 100 (2000) 41–65.

[3] A. Jiang, M. Cook, J. Bruck, Optimal t -interleaving on tori, in: Proc. IEEE Int’l Symposium on Information Theory, ISIT’04, 2004, pp. 22–31. [4] G.H. Conway, N.J.A. Sloane, SpherePacking: Lattices and Groups, Springer-Verlag, 1988.

[5] N. Linial, D. Peleg, Y. Rabinovich, M. Saks, Sphere packing and local majorities in graphs, in: Proc. 2nd ISTCS, 1993, pp. 141–149. [6] T. Calamoneri, The L(h, k)-labelling problem: An updated survey and annotated bibliography, Comput. J. 54 (8) (2011) 1344–1371. [7] F.S. Roberts, T-Colorings of graphs: recent results and open problems, Discrete Math. 93 (1991) 229–245.

[8] J. Griggs, R.K. Yeh, Labeling graphs with a condition at distance two, SIAM J. Discrete Math. 5 (1992) 586–595.

[9] A.A. Bertossi, M.A. Bonuccelli, Code assignment for hidden terminal interference avoidance in multihop packet radio networks, IEEE/ACM Trans. Netw. 3 (1995) 441–449.

[10] S. Paul, M. Pal, A. Pal, An efficient algorithm to solve L(0, 1)-labelling problem on interval graphs, Advanced Modeling and Optimization 15 (1) (2013) 31–43.

[11] S. Paul, M. Pal, A. Pal, L(2, 1)-labeling of interval graphs, J. Appl. Math. Comput. 49 (1–2) (2015) 419–432.

[12] A. Raychaudhuri, On powers of interval and unit interval graphs, Congr. Numer. 59 (1987) 235–242.

[13] M.C. Golumbic, Algorithmic Graph Theory and Perfect Graphs, second ed., Elsevier, 2004.

[14] S. Olariu, An optimal greedy heuristic to color interval graphs, Inform. Process. Lett. 37 (1991) 21–25.

[15] M. Pal, G.P. Bhattacharjee, A sequential algorithm for finding a maximum weight k-independent set on interval graphs, Int. J. Comput. Math. 60 (1996) 205–214.

[16] M. Pal, S. Mondal, D. Bera, T.K. Pal, An optimal parallel algorithm for computing cut vertices and blocks on interval graphs, Intern. J. Computer Mathematics 75 (1) (2000) 59–70.

[17] A. Rana, A. Pal, M. Pal, The conditional covering problem on unweighted interval graphs with nonuniform coverage radius, Math. Comput. Sci. 6 (2012) 33–41.

[18] A. Saha, M. Pal, T.K. Pal, An optimal parallel algorithm to find 3-tree spanner of interval graph, Int. J. Comput. Math. 82 (3) (2005) 259–274.

[19] A. Saha, M. Pal, T.K. Pal, An optimal parallel algorithm to find all-pairs shortest paths on circular-arc graphs, J. Appl. Math. Comput. 17 (1–2) (2005) 1–23.

[20] A. Saha, M. Pal, T.K. Pal, Selection of programme slots of television channels for giving advertisement: A graph theoretic approach, Inform. Sci. 177 (12) (2007) 2480–2492.

[21] M. Pal, G.P. Bhattacharjee, An optimal parallel algorithm to color an interval graph, Parallel Process. Lett. 6 (1996) 439–449.

[22] M. Pal, G.P. Bhattacharjee, An optimal parallel algorithm for computing all maximal cliques of an interval graph and its applications, J. Inst. Eng. (India) 76 (1995) 29–33.

References

Related documents

This is exactly where the FibeAir IP-10 integrated and protected networking functions become useful as its 1+1 configuration may also include a license for an

Participants were able to identify support programs for international students offered by their universities, including tutoring, conversation clubs, social events, and

Look at Apple’s iPod, one of the sexiest gadgets you’ll ever feast your eyes on (I wouldn’t dream of traveling without mine). Sure, keeping 10,000 songs in your back pocket

This page intentionally left blank... This page intentionally

Por ende, este artículo presenta los resultados de una investigación que buscó evidenciar y comprender por qué el recreo siendo un espacio escolar en el que se manifiestan

These diatom data are evaluated alongside high-resolution environmental monitoring data to determine the relative discrete and combined contributions of land use, the seasonality

Chapter 1 Introduction Establishing the Need for Research Scope and Limitations of This Study Aims of the Study Epistemological Considerations Paradigmatic Assumptions Definitions