6
Rainbow Colorings on Pyramid Networks Fu-Hsing Wang, Member, IAENG, and Cheng-Ju Hsu Abstract—An edge coloring graph G is rainbow connected if every two vertices are connected by a rainbow path, i.e., a path with all edges of different colors. An edge coloring under which G is rainbow connected is a rainbow coloring. Rainbow connection number of G is the minimum number of colors needed under a rainbow coloring. In this paper, we propose a lower bound to the size of the rainbow connection number of pyramid networks. We believe that our techniques used for the lower bound is useful to prove lower bounds in the class of pyramid-like networks. In this paper, we also give a linear-time algorithm for constructing a rainbow coloring on pyramid networks and thus get an upper bound to the rainbow connection number of pyramid networks. The result shows that although the ratio of the upper bound and the lower bound are associated with a proportional increase in the dimension of the networks, the resulting ratios are still bounded. Index Terms—rainbow connection number, rainbow coloring, rainbow path, pyramid networks. I. I NTRODUCTION I NTERCONNECTION networks have an enormous im- pact on the quality of communications between users and data transmissions. To address this issue, many re- search problems, including Hamiltonian connectivity [10], [11], k-path vertex cover [21], linear karboricity [20], for interconnection networks were widely discussed. A powerful and analytical tool in studying interconnection networks is graph theory because interconnection network usually can be modeled as a simple graph whose vertices represent process- ing nodes of the system and edges represent communication links. Let V (G) and E(G) denote the set of vertices and the set of edges, respectively, of a graph G. The order of G is |V (G)|. An edge coloring of a graph is a function from its edge set to the set of natural numbers. A path between two vertices u and v is called a u - v path. A u - v path in an edge colored graph with no two edges sharing the same color is called a rainbow u - v path. An edge-colored graph G is rainbow connected if any two vertices u and v are connected by a rainbow u - v path. In this case, the edge coloring of G is called a rainbow coloring of G. The rainbow connection number of a connected graph G, denoted by χ r (G), is the smallest number of colors that are needed to make G rainbow connected. A rainbow k-coloring of a graph is a rainbow coloring that uses k colors. The problem of rainbow coloring in graphs was introduced by Chartrand et al. in [3] and has application in secure trans- fer of classified information between various agencies which Manuscript received March 15, 2019; revised May 27, 2019. A preliminary version of this paper has appeared in: The 11th Inter- national Conference on Computer Modeling and Simulation. Melbourne, Australia, 2019 [19]. Fu-Hsing Wang is with the Department of Information Manage- ment, Chinese Culture University, Taipei, Taiwan, R.O.C. e-mail: [email protected]. Cheng-Ju Hsu is with the Department of Information Management, Chien Hsin University of Science and Technology, Taoyuan, Taiwan, R.O.C. e- mail: [email protected]. may have other agencies as intermediaries by assigning pass- words between agencies [8]. Every pair of agencies with one or more secure paths along with distinct passwords reveals the rainbow connection and is prohibitive to intruder [8]. The problem and its applications are intensively discussed in detail from the combinatorial perspective, with over 100 papers published (see good surveys [7], [13] and a book [14] for an overview). The rainbow connection number and rainbow coloring have been studied from both the algorithmic and graph- theoretic points of view. Chakraborty et al. showed that computing the rainbow connection number of a general graph is NP-hard [2]. In fact, even deciding whether χ r (G)=2 holds for a graph G is an NP-complete problem [2]. In [7], Eiben et al. gave an algorithm for deciding whether it is possible to obtain a rainbow coloring by saving a fixed number of colors. An easy observation that diam(G) χ r (G) ≤|V (G)|- 1, where the diameter diam(G) is the length of the longest shortest path in G. It is easy to verify that χ r (G)=1 if and only if G is a complete graph, and χ r (G)= |V (G)|-1 if and only if G is a tree. In [1], Caro et al. provided sufficient conditions that guarantee χ r (G)=2 and determined a threshold function for a random graph to have χ r (G)=2. Also notice that χ r (G) ≤|V (G)|- 1 for a general graph G, since one may color the edges of a given spanning tree with distinct colors (and color the remaining edges with one of the already used colors). Most recent research has been devoted to study the bounds of the rainbow connection numbers on random regular graphs [5], connected outerplanar graphs [6], triangular snake graphs [16], etc. Chartrand et al. computed the precise rainbow connection number for certain special graphs, e.g., Peterson graphs and complete multi-partite graphs [3]. We focus attention on the construction of rainbow color- ings of a given pyramid network. Pyramid networks have powerful architecture for many applications such as image processing, visualization, and data mining [4]. The major advantage of pyramid networks for image processing systems is hierarchical abstracting and transferring of the data from different directions and forward them toward the apex of a pyramid network [18]. Its features include the fault-tolerate properties such as fault diameter, ω-wide diameter [9]. Pyra- mid network also can be implemented with more efficient parallel algorithms than mesh connected networks for such problems as image processing and digital geometry [15], [17]. In this paper, we propose an efficient time algorithm for finding a rainbow path for any two vertices of a pyramid network. As far as we know, no rainbow path algorithm exists for pyramid networks. The rest of the article is structured as follows. Section II gives the definition of pyramid networks. In Section III, we give a simple and general lower bound argument which yields lower bounds to the size of the rainbow connection numbers in any pyramid-like graphs. An upper bound for pyramid IAENG International Journal of Computer Science, 46:3, IJCS_46_3_07 (Advance online publication: 12 August 2019) ______________________________________________________________________________________

Rainbow Colorings on Pyramid Networks - IAENG · graph theory because interconnection network usually can be modeled as a simple graph whose vertices represent process-ing nodes of

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Rainbow Colorings on Pyramid Networks - IAENG · graph theory because interconnection network usually can be modeled as a simple graph whose vertices represent process-ing nodes of

Rainbow Colorings on Pyramid NetworksFu-Hsing Wang, Member, IAENG, and Cheng-Ju Hsu

Abstract—An edge coloring graph G is rainbow connectedif every two vertices are connected by a rainbow path, i.e.,a path with all edges of different colors. An edge coloringunder which G is rainbow connected is a rainbow coloring.Rainbow connection number of G is the minimum numberof colors needed under a rainbow coloring. In this paper, wepropose a lower bound to the size of the rainbow connectionnumber of pyramid networks. We believe that our techniquesused for the lower bound is useful to prove lower bounds inthe class of pyramid-like networks. In this paper, we also givea linear-time algorithm for constructing a rainbow coloring onpyramid networks and thus get an upper bound to the rainbowconnection number of pyramid networks. The result shows thatalthough the ratio of the upper bound and the lower bound areassociated with a proportional increase in the dimension of thenetworks, the resulting ratios are still bounded.

Index Terms—rainbow connection number, rainbow coloring,rainbow path, pyramid networks.

I. INTRODUCTION

INTERCONNECTION networks have an enormous im-pact on the quality of communications between users

and data transmissions. To address this issue, many re-search problems, including Hamiltonian connectivity [10],[11], k−path vertex cover [21], linear karboricity [20], forinterconnection networks were widely discussed. A powerfuland analytical tool in studying interconnection networks isgraph theory because interconnection network usually can bemodeled as a simple graph whose vertices represent process-ing nodes of the system and edges represent communicationlinks. Let V (G) and E(G) denote the set of vertices and theset of edges, respectively, of a graph G. The order of G is|V (G)|. An edge coloring of a graph is a function from itsedge set to the set of natural numbers. A path between twovertices u and v is called a u− v path. A u− v path in anedge colored graph with no two edges sharing the same coloris called a rainbow u− v path. An edge-colored graph G israinbow connected if any two vertices u and v are connectedby a rainbow u−v path. In this case, the edge coloring of Gis called a rainbow coloring of G. The rainbow connectionnumber of a connected graph G, denoted by χr(G), is thesmallest number of colors that are needed to make G rainbowconnected. A rainbow k−coloring of a graph is a rainbowcoloring that uses k colors.

The problem of rainbow coloring in graphs was introducedby Chartrand et al. in [3] and has application in secure trans-fer of classified information between various agencies which

Manuscript received March 15, 2019; revised May 27, 2019.A preliminary version of this paper has appeared in: The 11th Inter-

national Conference on Computer Modeling and Simulation. Melbourne,Australia, 2019 [19].

Fu-Hsing Wang is with the Department of Information Manage-ment, Chinese Culture University, Taipei, Taiwan, R.O.C. e-mail:[email protected].

Cheng-Ju Hsu is with the Department of Information Management, ChienHsin University of Science and Technology, Taoyuan, Taiwan, R.O.C. e-mail: [email protected].

may have other agencies as intermediaries by assigning pass-words between agencies [8]. Every pair of agencies with oneor more secure paths along with distinct passwords revealsthe rainbow connection and is prohibitive to intruder [8].The problem and its applications are intensively discussedin detail from the combinatorial perspective, with over 100papers published (see good surveys [7], [13] and a book [14]for an overview).

The rainbow connection number and rainbow coloringhave been studied from both the algorithmic and graph-theoretic points of view. Chakraborty et al. showed thatcomputing the rainbow connection number of a general graphis NP-hard [2]. In fact, even deciding whether χr(G) = 2holds for a graph G is an NP-complete problem [2]. In[7], Eiben et al. gave an algorithm for deciding whether itis possible to obtain a rainbow coloring by saving a fixednumber of colors. An easy observation that diam(G) ≤χr(G) ≤ |V (G)| − 1, where the diameter diam(G) is thelength of the longest shortest path in G. It is easy to verifythat χr(G) = 1 if and only if G is a complete graph, andχr(G) = |V (G)|−1 if and only if G is a tree. In [1], Caro etal. provided sufficient conditions that guarantee χr(G) = 2and determined a threshold function for a random graph tohave χr(G) = 2. Also notice that χr(G) ≤ |V (G)|−1 for ageneral graph G, since one may color the edges of a givenspanning tree with distinct colors (and color the remainingedges with one of the already used colors). Most recentresearch has been devoted to study the bounds of the rainbowconnection numbers on random regular graphs [5], connectedouterplanar graphs [6], triangular snake graphs [16], etc.Chartrand et al. computed the precise rainbow connectionnumber for certain special graphs, e.g., Peterson graphs andcomplete multi-partite graphs [3].

We focus attention on the construction of rainbow color-ings of a given pyramid network. Pyramid networks havepowerful architecture for many applications such as imageprocessing, visualization, and data mining [4]. The majoradvantage of pyramid networks for image processing systemsis hierarchical abstracting and transferring of the data fromdifferent directions and forward them toward the apex of apyramid network [18]. Its features include the fault-tolerateproperties such as fault diameter, ω−wide diameter [9]. Pyra-mid network also can be implemented with more efficientparallel algorithms than mesh connected networks for suchproblems as image processing and digital geometry [15],[17]. In this paper, we propose an efficient time algorithmfor finding a rainbow path for any two vertices of a pyramidnetwork. As far as we know, no rainbow path algorithm existsfor pyramid networks.

The rest of the article is structured as follows. Section IIgives the definition of pyramid networks. In Section III, wegive a simple and general lower bound argument which yieldslower bounds to the size of the rainbow connection numbersin any pyramid-like graphs. An upper bound for pyramid

IAENG International Journal of Computer Science, 46:3, IJCS_46_3_07

(Advance online publication: 12 August 2019)

______________________________________________________________________________________

Page 2: Rainbow Colorings on Pyramid Networks - IAENG · graph theory because interconnection network usually can be modeled as a simple graph whose vertices represent process-ing nodes of

(2; 0, 3)(2; 0, 2)(2; 0, 1)(2; 0, 0)

(2; 1, 3)

(1; 0, 0)

(0; 0, 0)

(2; 1, 2)(2; 1, 1)(2; 1, 0)

(2; 2, 3)(2; 2, 2)(2; 2, 1)(2; 2, 0)

(2; 3, 2) (2; 3, 3)(2; 3, 1)(2; 3, 0)

(1; 1, 0) (1; 1, 1)

(1; 0, 1)

Fig. 1. A top view of the pyramid P2.

networks is presented in Section IV. Section V presentsalgorithms for finding a rainbow path on given two arbitraryvertices of a pyramid network. Finally, concluding remarksare given in the last section.

II. PRELIMINARIES

A square mesh Mk of order 2k × 2k has the vertex setV (Mk) = {(x, y) | 0 ≤ x, y ≤ 2k − 1} where any twovertices (x1, y1) and (x2, y2) are connected by an edge iff|x1 − x2|+ |y1 − y2| = 1.

Let Pn be an n-dimensional pyramid with the vertex setn⋃k=0

Vk, where Vk = {(k;x, y) | 0 ≤ x, y ≤ 2k−1}. We label

the vertex v of Vk as (k;x, y), where k, x and y are the layernumber, row number and column number, respectively, of v.The subgraph induced by Vk is connected as an Mk andcalled the layer k of Pn. For simplicity, we let Mk denotethe subgraph induced by Vk. In Mk, a subgraph induced bythe set of vertices with the same row number x (respectively,column number y) is called row x (respectively, column y).Vertex (k;x, y) has exactly four children (k+1; 2x, 2y), (k+1; 2x, 2y + 1), (k+ 1; 2x+ 1, 2y), (k+ 1; 2x+ 1, 2y + 1) inVk+1 and a parent vertex (k − 1; bx2 c, b

y2 c) in Vk−1, where

2 ≤ k ≤ n − 1. Let p(v) denote the parent vertex of v.Every vertex on the shortest path from v to (0; 0, 0) is anancestor of v. An edge [v, p(v)] incident on v and p(v) iscalled a layer edge, while every edge of an Mk is called amesh edge. Let Lk denote the set of layer edges betweenVk and Vk+1. The distance dG(u, v) between two vertices uand v of G is the minimum length of the u− v paths, whereevery vertex on a u−v path is a vertex in G. Figure 1 depictsan example of the 2-layered pyramid P2. The vertex (1; 0, 0)has four children (2; 0, 0), (2; 0, 1), (2; 1, 1) and (2; 1, 0). Incontrast the parent vertex of (2; 0, 0) is (1; 0, 0). Both vertices(0; 0, 0) and (1; 0, 0) are ancestors of the vertex (2; 0, 0). Thedash lines indicate layer edges, while the solid lines are meshedges. The layer edges connecting the vertex (1; 0, 0) and itsfour children are in L1. The distance dM2

((2; 0, 0), (2; 3, 3))is equal to 6, while dG((2; 0, 0), (2; 3, 3)) is equal to 4.

III. LOWER BOUND

In this section we present a simple argument useful toprove lower bounds in the class of pyramid-like networks.For simplicity of notation, we let χr be χr(Pn) in the

(c) (d)

(a) (b)

Fig. 2. Shapes of Sr for (a)χr = 8; (b)χr = 10; (c)χr = 7; (d)χr = 9.

remaining text of this section. Our proof is based on thefollowing observation.

Observation III.1. For any two vertices u, v of distancegreater than χr on Mi, 2 ≤ i ≤ n, every rainbow u−v pathcontains 2a layer edges in Li−1, where the integer a ≥ 1.

A maximal subgraph Sr of Mi, 1 ≤ i ≤ n, is called arainbow unit if any two vertices in Sr are of distance lessthan or equal to χr. Two rainbow units Sr1 and Sr2 are saidto be disjoint if V (Sr1) ∩ V (Sr2) = ∅.

Lemma III.1. |V (Sr)| ≤ χ2r+2χr+2

2 .

Proof: To be maximal, Sr has a shape as shown inFigure 2 depending on the parity of χr. For even χr, χr

2is either even or odd. If χr

2 is even (refer to Figure 2(a)),then

|V (Sr)| ≤ (χr2

+ 1)2 + 4(1 + 3 + · · ·+ (χr2− 1))

=χ2r + 2χr + 2

2.

When χr2 is odd (see Figure 2(b)).

|V (Sr)| ≤ (χr2

+ 1)2 + 4(2 + 4 + · · ·+ (χr2− 1))

=χ2r + 2χr

2.

Consider odd χr. Figure 2(c) and Figure 2(d) depict thesubcases even dχr2 e and odd dχr2 e, respectively. If dχr2 e iseven, then

|V (Sr)| ≤ (χr + 1

2)(χr + 3

2) + 2(1 + 3 + · · ·+ χr − 1

2)

+ 2(2 + 4 + · · ·+ χr − 3

2)

=χ2r + 2χr + 1

2.

IAENG International Journal of Computer Science, 46:3, IJCS_46_3_07

(Advance online publication: 12 August 2019)

______________________________________________________________________________________

Page 3: Rainbow Colorings on Pyramid Networks - IAENG · graph theory because interconnection network usually can be modeled as a simple graph whose vertices represent process-ing nodes of

Otherwise dχr2 e is odd.

|V (Sr)| ≤ (χr + 1

2)(χr + 3

2) + 2(1 + 3 + · · ·+ χr − 3

2)

+ 2(2 + 4 + · · ·+ χr − 1

2)

=χ2r + 2χr + 1

2.

We now establish a lower bound of χr as follows:

Theorem III.1. Any rainbow χr−coloring in Pn satisfiesthe inequality χr(χ2

r + 2χr + 2) ≥ 8(4n−1)3 .

Proof: For any two vertices u, v of distance greater thanχr on Mi, 1 ≤ i ≤ n, every rainbow u − v path, fromObservation III.1, contains at least two layer edges in Li−1.So there are at least 2i·2i

|Sr| disjoint rainbow units on Mi, 1 ≤i ≤ n. And the layer edges incident on any two disjointrainbow units must be assigned distinct colors. Then

χr ≥2n · 2n

|V (Sr)|+

2n−1 · 2n−1

|V (Sr)|+ · · ·+ 21 · 21

|V (Sr)|

=4n

|V (Sr)|+

4n−1

|V (Sr)|+ · · ·+ 41

|V (Sr)|

=4n

|V (Sr)|(1 +

1

4+

1

42+ · · ·+ 1

4n−1)

=4(4n − 1)

3|V (Sr)|.

Furthermore, since, by Lemma III.1, |V (Sr)| ≤ χ2r+2χr+2

2 ,we have χr(

χ2r+2χr+2

2 ) ≥ 4(4n−1)3 . Therefore,

χr(χ2r + 2χr + 2) ≥ 8(4n−1)

3 .

IV. UPPER BOUND

Wang and Hsu [19] gave the exact values of the rainbowconnection number χr(Pn) for n ≤ 3 as follows:

Theorem IV.1. [19] χr(P1) = 2, χr(P2) = 4 and χr(P3) =8.

In this paper, we further discuss χr(Pn) for n ≥ 4. Letϕ be an edge coloring on Pn and ϕ(e) be the color numberassigned to the edge e. We also let ϕ(E) =

⋃e∈E ϕ(e) for

an edge set E. Let τ = d 2n+logn3−13 e.

An Mk, k > 2(n − τ), can be partitioned into squaresubmeshes of order 2k+τ−n × 2k+τ−n, and each squaresubmesh is also called a cluster. Especially, every Mk, 1 ≤k ≤ 2(n− τ), is regarded as a cluster. In a cluster, the edgesof a row are assigned the color numbers in an ascendingorder from the leftmost edge to the rightmost edge of the row,while the edges of a column are assigned color numbers inan ascending order from the top edge to the bottom edge ofthe column under the edge coloring ϕ. In ϕ, all layer edgesincident on a cluster are assigned the same color number.The formal definition of ϕ is as follows:

Definition IV.1. Let ϕ be an edge coloring in Pn for n ≥ 4.

(1) ϕ([(k;x, y), (k;x, y + 1)]) =

y if 1 ≤ k < 2(n− τ),

(2τ − n)4n−τ + y if k = 2(n− τ),

y mod 2k+τ−n if 2(n− τ) < k ≤ n,where 0 ≤ x ≤ 2k − 1 and 0 ≤ y ≤ 2k − 2.

(2) ϕ([(k;x, y), (k;x+ 1, y)]) =x+ (2k − 1) if 1 ≤ k < 2(n− τ),

(2τ − n)4n−τ + (2k − 1) + x if k = 2(n− τ),

x mod 2k+τ−n + (2k+τ−n − 1) if 2(n− τ) < k ≤ n,where 0 ≤ x ≤ 2k − 2 and 0 ≤ y ≤ 2k − 1.

(3) ϕ([(k;x, y), p(k;x, y)]) =(2τ − n)4n−τ + 2(n− τ)− k if 1 ≤ k ≤ 2(n− τ),

(n− k)4n−τ + b x2k+τ−n

c2n−τ+b y

2k+τ−nc if 2(n− τ) < k ≤ n,

where 0 ≤ x, y ≤ 2k − 1.

Definition IV.1(1) and (2) are used to assign color numbersto the edges of a row and a column, respectively, on a cluster.Definition IV.1(3) assigns color numbers to all layer edges.From Definition IV.1(2), the color numbers of all edges ofa column in a cluster S on Mk, 1 ≤ k ≤ 2(n − τ), are(2k − 1) more than the color numbers of all edges of anyrow in S. For k > 2(n − τ), the color numbers of alledges of a column in S are (2k+τ−n − 1) more than thecolor numbers of all edges of any row. To ensure that alllayer edges incident on a cluster are assigned the same colornumber, we define ϕ([u, p(u)]) = ϕ([v, p(v)]) by dividing2k+τ−n on the column indexes and row indexes for any twovertices u, v of a cluster (see Definition IV.1(3)).

Figure 3 depicts the edge coloring of layer k, where 2(n−τ) < k ≤ n. Layer k is partitioned into 2n−τ×2n−τ clusters,and each cluster in layer k is of order 2k+τ−n× 2k+τ−n. Ineach cluster of layer k, the edges of a row are assigned thecolor numbers in {0, 1, . . . , 2k+τ−n − 2}, while the edgesof a column are assigned the color numbers in {2k+τ−n −1, 2k+τ−n, . . . , 2k+τ−n+1 − 3} under the edge coloring ϕ.The edge colorings on layers 1, 2, . . . , 2(n − τ) are similarto the edge coloring of a cluster on layer k.

Besides, we use Figure 4 as an example to illustratethe edge colorings on layers 3, 4 and 5 of P6. Note thatn = 6, τ = 4 and 2(n − τ) = 4. In Figure 4, layers 6and 5 are partitioned into 16 clusters. So, |ϕ(E(L5))| =|ϕ(E(L4))| = 16. Then ϕ(E(L5)) = {0, 1, . . . , 15} andϕ(E(L4)) = {16, 17, . . . , 31}. Since (2τ−n)4n−τ = 32, thecolor numbers of the edges on layer 4 are in {32, 33, . . . , 45}.

For a higher dimensional Pn, we use Table I and Table IIto demonstrate the range of values of ϕ(E(P10)) with τ = 7and 2(n− τ) = 6.

Lemma IV.1. If S is a cluster of Pn, then S is rainbowconnected under the edge coloring ϕ.

Proof: For any two distinct vertices s, t ∈ V (S), wewant to show that there is a rainbow s− t path under ϕ. Let

IAENG International Journal of Computer Science, 46:3, IJCS_46_3_07

(Advance online publication: 12 August 2019)

______________________________________________________________________________________

Page 4: Rainbow Colorings on Pyramid Networks - IAENG · graph theory because interconnection network usually can be modeled as a simple graph whose vertices represent process-ing nodes of

0 101

2k+τ -n

-1 2k-1

2k-1

2

2

2k+τ -n

-1

0 1 2k+τ -n

-2

2k+τ -n

-1

2k+τ -n

2k+τ -n+1

-3

0 1 2k+τ -n

-2

0 12

k+τ -n-2

2k+τ -n+1

-3

2k+τ -n

-1

2k+τ -n

0 1

0 1

2k+τ -n

-2

2k+τ -n

-2

2k+τ -n

-1

2k+τ -n+1

-3

2k+τ -n

2k+τ -n

-1

2k+τ -n+1

-3

2k+τ -n

2k+τ -n

-1

2k+τ -n+1

-3

2k+τ -n

Fig. 3. The edge coloring of layer k, where 2(n − τ) < k ≤ n. Everycluster is colored the same as shown in the bottom of the figure.

s = (k;x1, y1), t = (k;x2, y2) and v = (k;x2, y1), where1 ≤ k ≤ n and x1 ≤ x2. By Definition IV.1(2), the colornumbers of the edges incident on the vertices in column y1are in an ascending order from the edge [(k;x1, y1), (k;x1+1, y1)] to the edge [(k;x2−1, y1), (k;x2, y1)]. So there existsa rainbow s− v path P1. If y1 = y2, then v is t and hencecompletes the proof. Otherwise, by Definition IV.1(1), wealso have a rainbow v− t path P2. If 1 ≤ k ≤ 2(n− τ), thecolor numbers of the edges of P1, by Definition IV.1(1)-(2),are (2k − 1) more than the color numbers of the edges ofP2. Thus the concatenation of P1 and P2 is a rainbow a− tpath. When k > 2(n − τ). The color numbers of the edgesof P1, by Definition IV.1(1)-(2), are (2k+τ−n−1) more thanthe color numbers of the edges of P2. So the concatenationof P1 and P2 is a rainbow s− t path.

We now show that ϕ is a rainbow coloring of a pyramidnetwork.

0 1 6

7

8

13

0 1 6

0 1 6

7

8

0 1

0 1

6

6

7

13

8

7

8

7

7

13 13 13

32 33 38

39

40

45

32 33 38

32 33 38

39

40

32 33

32 33

38

38

39

45

40

39

40

39

40

45 45 45

Layer 3

Layer 4

Layer 5

32

0 1 6

7

8

13

0 1 6

0 1 6

7

8

0 1

0 1

6

6

7

13

8

7

8

7

7

13 13 13

0 1 6

7

8

13

0 1 6

0 1 6

7

8

0 1

0 1

6

6

7

13

8

7

8

7

7

13 13 13

0 1 6

7

8

13

0 1 6

0 1 6

7

8

0 1

0 1

6

6

7

13

8

7

8

7

7

13 13 13

16 17 31

Fig. 4. The edge colorings on layers 3, 4 and 5 of P6.

TABLE ITHE RANGE OF COLOR NUMBERS FOR THE MESH EDGES OF P10 .

mesh edges range of color numbersrow column

M1 0-0 1-1M2 0-2 3-5M3 0-6 7-13M4 0-14 15-29M5 0-30 31-60M6 256− 318 319− 381M7 0− 14 15− 29M8 0− 30 31− 60M9 0− 62 63− 125M10 0− 126 127− 253

Theorem IV.2. The edge coloring ϕ is a rainbow coloringon Pn.

Proof: Let s = (k1;x1, y1), t = (k2;x2, y2) ∈ V (Pn),where 0 ≤ k1 ≤ k2 ≤ n. If s and t are on the same cluster,then, by Lemma IV.1, there is clearly a rainbow s− t path.When s and t are on two different clusters, three cases areconsidered depending on the values of k1 and k2.

TABLE IITHE RANGE OF COLOR NUMBERS FOR THE LAYER EDGES OF P10 .

layer edges range of color numbersL0 261− 261L1 260− 260L2 259− 259L3 258− 258L4 257− 257L5 256− 256L6 192− 255L7 128− 191L8 64− 127L9 0− 63

IAENG International Journal of Computer Science, 46:3, IJCS_46_3_07

(Advance online publication: 12 August 2019)

______________________________________________________________________________________

Page 5: Rainbow Colorings on Pyramid Networks - IAENG · graph theory because interconnection network usually can be modeled as a simple graph whose vertices represent process-ing nodes of

Case 1. k1 = 0.Vertex s is indeed an ancestor of t. Let P be the s − tpath consisted only of layer edges. The edges of P , byDefinition IV.1(3), are assigned distinct color numbers.

Case 2. 1 ≤ k1 < 2(n− τ).Let at be the ancestor of t in Mk1 . By Definition IV.1(3),we have a rainbow t − at path P1 consisting only of layeredges. Since Mk1 is in fact a cluster, by Lemma IV.1, wehave a rainbow s−at path P2 consisting only of mesh edges.Clearly, the concatenation of the paths P1 and P2 constructa rainbow s− t path.

Case 3. 2(n− τ) ≤ k1 ≤ n.Let as, at ∈ V (M2(n−τ)) and as and at be the ancestorsof s and t, respectively. From Definition IV.1(3), we get arainbow s−as path P1 and a rainbow t−at path P2 consistedonly of layer edges. Notice that the color numbers of P1

and P2 are less than or equal to (2τ − n)4n−τ − 1. SinceM2(n−τ) is in fact a cluster, by Lemma IV.1, we have arainbow as−at path P3 and P3 are consisting only of meshedges. Because the color numbers of every mesh edge of P3,from Definition IV.1(2), is greater than the color number ofany layer edge in P1 and P2, it follows that the concatenationof the paths P1, P3 and P2 constructs a rainbow s− t path.

Clearly, the largest color number in ϕ(E(Pn)) gives anupper bound to the size of the rainbow connection numberon Pn. According to Definition IV.1, the largest color numberis assigned to the bottom edge of a column on layer 2(n−τ)or layer n. Let c1 = (2τ − n)4n−τ + (2k1 − 1) + x1 be thecolor number assigned to the bottom edge of any column onlayer 2(n − τ), where k1 = 2(n − τ) and x1 = 2k1 − 2.Let c2 = x2 mod 2k2+τ−n + (2k2+τ−n − 1) be the colornumber assigned to the bottom edge of any column on layern, where x2 = 2τ − 2 and k2 = n. Then

c1 = (2τ − n)4n−τ + 22(n−τ) + 22(n−τ) − 3

= (2τ − n+ 2)4n−τ − 3

and

c2 = (2τ − 2) mod 2n+τ−n + 2n+τ−n − 1

= 2τ+1 − 3.

Let max(c1, c2) denote the larger value of c1 and c2. Thenext theorem holds.

Theorem IV.3. χr(Pn) ≤ max((2τ−n+2)4n−τ−3, 2τ+1−3), where τ = d 2n+logn3−1

3 e.

V. RAINBOW PATH CONSTRUCTION

According to the rainbow coloring ϕ, we further designthe algorithm Rainbow Path for finding a rainbow s − tpath for any two distinct vertices s and t of Pn. AlgorithmRainbow Path is with time complexity O(n) because theamount of operations is bounded by the length of a rainbowpath.

Function Path-on-a-Cluster(u, v)Input: Vertices u = (k;x1, y1), v = (k;x2, y2).Output: A rainbow u− v path P .begin

The mesh edges connecting the starting vertex (k;x1, y1)to the destination vertex (k;x1, y2) in row x1 form thesubpath P1;The mesh edges connecting the starting vertex (k;x1, y2)to the destination vertex (k;x2, y2) in column y2 formthe subpath P2;return P = P1 + P2;

end

Function Path-Connecting-Layers(u, v)Input: Vertices u = (k1;x1, y1), v = (k2;x2, y2).Output: A rainbow u− v path P .begin

Iteratively add layer edges[w = (k2 − k; bx2

2kc, b y2

2kc), p(w)] to P , for each

k = 0, 1, . . . , k2 − k1 − 1;return P ;

end

VI. CONCLUDING REMARKS

In this paper, we establish a lower bound and an upperbound to the size of the rainbow connection number inan n-dimensional pyramid network Pn. To the best of ourknowledge, this is the first result for constructing rainbowcoloring in Pn. The ratio of the bounds is considered as aperformance metric in our algorithm. The resulting valuesare shown in Table III. The data are calculated on differentscenarios to see the lower bound and the upper bound fordifferent scales of pyramid networks. In Table III, the row“diam(Pn)” provides a trivial lower bound to χr(Pn), wheren is the dimension of the given network. The results ofan improved lower bound for χr(Pn) (from Theorem III.1)are given in the row “Our lower bound”. The row “Ourupper bound” reveals the largest color number that assignedto the edges of E(Pn) under the edge coloring ϕ. Therow “ratio 1” shows that χr(Pn) increase sharply on thegrowing n in spite of the tiny diameter. The row “ratio 2”demonstrates the proximity of our lower bound and upperbound. Although the ratio of the upper bound and the lowerbound are associated with a proportional increase in thedimension of the networks, the resulting values of ratio 2are still bounded by 4.58 even when the given network is ofdimension 80.

ACKNOWLEDGMENT

The author gratefully acknowledges the helpful commentsand suggestions of the reviewers, which have improved thepresentation and have strengthened the contribution.

REFERENCES

[1] Y. Caro, A. Lev, Y. Roditty, Z. Tuza and R. Yuster, “On rainbowconnection,” The Electronic Journal of Combinatorics, vol. 15, #R57,2008.

[2] S. Chakraborty, E. Fischer, A. Matsliah and R. Yuster, “Hardnessand algorithms for rainbow connection,” Journal of CombinatorialOptimization, vol. 213, pp. 330-347, 2011.

[3] G. Chartrand, G. L. Johns, K. A. McKeon and P. Zhang, “Rainbowconnection in graphs,” Mathematica Bohemica, vol. 1331, pp. 85-98,2008.

IAENG International Journal of Computer Science, 46:3, IJCS_46_3_07

(Advance online publication: 12 August 2019)

______________________________________________________________________________________

Page 6: Rainbow Colorings on Pyramid Networks - IAENG · graph theory because interconnection network usually can be modeled as a simple graph whose vertices represent process-ing nodes of

Algorithm Rainbow PathInput: Given vertices s = (k1;x1, y1), t = (k2;x2, y2),

where k1 ≤ k2.Output: A rainbow s− t path P .begin

if s and t are in the same clusterP =Path-on-a-Cluster(s, t);

elseCase k1 = 0:P =Path-Connecting-Layers(s, t);

Case 1 ≤ k1 < 2(n− τ):at = (k1; b x2

2k2−k1 c, by2

2k2−k1 c);P1 =Path-Connecting-Layers(at, t);P2 =Path-on-a-Cluster(s, at);P = P1 + P2;

Case 2(n− τ) ≤ k1 ≤ n:as = (2(n− τ); b x1

2k1−2(n−τ) c, b y12k1−2(n−τ) c);

at = (2(n− τ); b x2

2k2−2(n−τ) c, b y22k2−2(n−τ) c);

P1 =Path-Connecting-Layers(as, s);P2 =Path-Connecting-Layers(at, t);P3 =Path-on-a-Cluster(as, at);P = P1 + P2 + P3;

end

TABLE IIITHE TABLE OF RATIOS ON THE BOUNDS OF χr .

n (dimension)10 30 50 80

(a) diam(Pn) 20 60 100 160(b) Our lower bound 141 1454084 15007998106 1.57E+16(c) Our upper bound 381 4194301 68719476733 7.21E+16ratio 1= (b) / (a) 7.05 24234.73 1.50E+08 9.84E+13ratio 2= (c) / (b) 2.70 2.88 4.58 4.58

[4] D. E. Culler, J. P. Singh and A. Gupta, Parallel Computer Architecture:A Hardware/Software Approach, Morgan Kaufmann, San Francisco,CA, 1999.

[5] A. Dudek, A. M. Frieze and C. E. Tsourakakis, “Rainbow connection ofrandom regular graphs,” SIAM Journal on Discrete Mathematics, vol.29, pp. 2255-2266, 2015.

[6] X. C. Deng, H. Z. Li and G. Y. Yan, “Algorithm on rainbow connectionfor maximal outerplanar graphs,” Theoretical Computer Science, vol.651, pp. 76-86, 2016.

[7] E. Eiben, R. Ganian and J. Lauri, “On the complexity of rainbowcoloring problems,” Discrete Applied Mathematics, vol. 246, pp. 38-48, 2018.

[8] A. Ericksen, “A matter of security,” Graduating Engineer & ComputerCareers, pp. 24-28, 2007.

[9] H. J. Hsieh and D. R. Duh, “ω−wide diameters of enhanced pyramidnetworks,” Theoretical Computer Science, vol. 41229, pp. 3658-3675,2011.

[10] R. W. Hung, H. D. Chen and S. C. Zeng, “The Hamiltonicity andHamiltonian connectivity of some shaped supergrid graphs,” IAENGInternational Journal of Computer Science, vol. 44, no. 4, pp. 432-444,2017.

[11] R. W. Hung, F. Keshavarz-Kohjerdi, C. B. Lin and J. S. Chen,“The Hamiltonian connectivity of alphabet supergrid graphs,” IAENGInternational Journal of Applied Mathematics, vol. 49, no. 1, pp. 69-85, 2019.

[12] M. Krivelevich and R. Yuster, “The rainbow connection of a graph is(at most) reciprocal to its minimum degree,” Journal of Graph Theory,vol. 633, pp. 185-191, 2009.

[13] X. Li, Y. Shi and Y. Sun, “Rainbow connection of graphs: A survey,”Graphs and Combinatorics, vol. 291, pp. 1-38, 2013.

[14] X. Li and Y. Sun, Rainbow connections of graphs, Springer Briefs inMathematics, Springer, New York, 2012.

[15] R. Miller and Q. F. Stout, “Simulating essential pyramids,” IEEETransactions on Computers, vol. 3712, pp. 1642-1648, 1988.

[16] D. Parmar, P. V. Shah and B. Shah, “Rainbow connection numberof triangular snake graph,” Journal of Emerging Technologies andInnovative Research, vol. 9, pp. 339-343, 2019.

[17] Q. F. Stout, “Pyramid computer solutions of the closest pair problem,”Journal of Algorithms, vol. 6, pp. 200-212, 1985.

[18] H. S. Shahhoseini, E. S. Kandzi and M. Mollajafari, “Nonflat surfacelevel pyramid: a high connectivity multidimensional interconnectionnetwork,” The Journal of Supercomputing, vol. 671, pp. 31-46, 2014.

[19] F. H. Wang and C. J. Hsu, “Rainbow connection number in pyramidnetworks,” in The 11th International Conference on Computer Modelingand Simulation. Melbourne, Australia, 2019.

[20] L. Zuoy, S. He and R. Wang, “The linear 4-arboricity of balancedcomplete bipartite graphs,” IAENG International Journal of AppliedMathematics, vol. 45, no. 1, pp. 23-30, 2015.

[21] L. Zuo, B. Zhang and S. Zhang, “The k−path vertex cover in productgraphs of stars and complete graphs,” IAENG International Journal ofApplied Mathematics, vol. 46, no. 1, pp. 97-103, 2016.

Fu-Hsing Wang received his B.S. degree in com-puter science and information engineering fromFeng Chia University, Taichung, Taiwan in 1987,and M.S. degree in computer science and infor-mation engineering from National Chung ChengUniversity, Chiayi, Taiwan in 1992. He receivedhis Ph.D. degree in information management fromNational Taiwan University of Science and Tech-nology, Taipei, Taiwan in 2003. Now, he is a Pro-fessor in the Department of Information Manage-ment, Chinese Culture University, Taipei, Taiwan.

His current research interests include distributed and stabilizing algorithm,graph theory, and interconnection networks.

Cheng-Ju Hsu received the M.S. degree incomputer science and engineering from NationalOcean University, Taiwan, in 2002 and the Ph.D.degree in information management from NationalTaiwan University of Science and Technology in2009. She is currently an assistant professor in theDepartment of Information Management, ChienHsin University of Science and Technology, Tai-wan. Her research interests include graph theory,algorithm, and discrete mathematics.

IAENG International Journal of Computer Science, 46:3, IJCS_46_3_07

(Advance online publication: 12 August 2019)

______________________________________________________________________________________