A Parallel Algorithm for the Spanning Forest Problem on Proper Circle Graphs

Show more

1. Introduction

Given a simple connected graph G with n vertices, the spanning tree problem is to find a tree that connects all the vertices of G. Generally, there exist a number of different spanning trees in a connected graph. Let T be a tree with n vertices. Then the following statements are equivalent [1] :

1) T contains no cycles, and has $n-1$ edges;

2) T is connected, and has $n-1$ edges;

3) T is connected, and each edge is a bridge;

4) Any two vertices of T are connected by exactly one path;

5)T contains no cycles, but the addition of any new edge creates exactly one cycle.

Given a simple graph G with n vertices and k components, the spanning forest problem is to find a spanning tree for each component of G. The spanning forest F has $n-k$ edges. This problem has applications, such as electric power systems, computer network design and circuit analysis [1] . A spanning tree can be found in $O\left(n+m\right)$ time using, for example, the depth-first search or breadth-first search. In recent years, a large number of studies have been made to parallelize known sequential algorithms. For simple graphs, Chin et al. presented that the spanning forest can be found in $O\left(lo{g}^{2}n\right)$ time using $O\left({n}^{2}/lo{g}^{2}n\right)$ processors [2] . Moreover, for a connected graph, Klein and Stein demonstrated that a spanning tree can be found in $O\left(logn\right)$ time with $O\left(n+m\right)$ processors on the CRCW (Concurrent Read Concurrent Write) PRAM (Parallel Random Access Machine) [3] .

In general, it is known that more efficient algorithms can be developed by restricting classes of graphs. For instance, Wang et al. proposed an optimal parallel algorithm for constructing a spanning tree on permutation graphs that runs in $O\left(logn\right)$ time using $O\left(n/\mathrm{log}n\right)$ processors on the EREW (Exclusive Read Exclusive Write) PRAM [4] . Wang et al. proposed optimal parallel algorithms for some problems including the spanning tree problem on interval graphs that can be executed in $O\left(logn\right)$ time with $O\left(n/\mathrm{log}n\right)$ processors on the EREW PRAM [5] . Bera et al. presented an optimal parallel algorithms for finding a spanning tree on trapezoid graphs that takes in $O\left(logn\right)$ time using $O\left(n/\mathrm{log}n\right)$ processors on the EREW PRAM [6] . In addition, Honma et al. developed parallel algorithms for finding a spanning tree on circular permutation graphs [7] and circular trapezoid graphs [8] . Both of them take in $O\left(logn\right)$ time using $O\left(n/\mathrm{log}n\right)$ processors on the EREW PRAM.

Let $F$ be a family of nonempty sets. A simple graph G is the intersection graph of $F$ if there exists a one-to-one correspondence between the vertices of G and the sets in $F$ , such that two vertices in G are adjacent if and only if their corresponding sets have a nonempty intersection. A circle graph is an undirected graph isomorphic to the intersection graph of a finite set of chords in a circle. It is not difficult to show that the class of circle graphs contains all the complete bipartite graphs. Circle graphs have been introduced by Even and Itai in [9] in connection with algorithms that sort permutations by using stacks. This aspect is detailed in the book by Golumbic [10] . Polynomial time algorithms for recognizing graphs in this class appear in [11] [12] . Applications of circle graphs are diverse, and without trying to be exhaustive, we can cite container ship stowage [13] and reconstruction of long DNA strings from short subsequences [14] . The best algorithms for recognizing circle graphs and constructing chord diagrams are by Gabor et al. [12] taking time O(mn) where n is the number of vertices and m the number of edges, and by Spinrad [15] taking time $O\left({n}^{2}\right)$ . Gavril [16] presented a $O\left({n}^{3}\right)$ time algorithm for finding a maximum independent set of a circle graph. $O\left({n}^{2}\right)$ time algorithms were developed by other researchers [17] [18] . Valiente [19] solved the problem in $O\left(nd\right)$ time and only $O\left(n\right)$ space, where d is a parameter known as the density of the circle graph. Other problems that are NP-complete for general graphs can also be solved in polynomial time for circle graphs, for example Tiskin [20] has shown an $O\left(nlo{g}^{2}d\right)$ time algorithm for the maximum clique problem. There are also problems that are NP-complete for both circle graphs and general graphs, such as minimum dominating set [21] .

In this study, we define proper circle graphs that are subclass of circle graphs. We propose a parallel algorithm for spanning forest problem on a proper circle graphs. It can run in $O\left(logn\right)$ time with $O\left(n/\mathrm{log}n\right)$ processors on the EREW PRAM.

2. Preliminaries

2.1. Proper Circle Graphs

We first illustrate the chord diagram before defining the circle graph. There is a unit circle C such that the consecutive integer $i$ , $1\le i\le 2n$ are assigned clockwise on the circumference (n is the number of chords). A chord i is the line in a circle C that connects two points ${a}_{i}$ and ${b}_{i}$ $\left({a}_{i}<{b}_{i}\right)$ on C and is denoted by $\left[{a}_{i}\mathrm{,}{b}_{i}\right]$ . Without loss of generality, each chord i has two terminal points ${a}_{i}$ and ${b}_{i}$ , and all terminal points are distinct. We assume that chords are labeled in increasing order of their corner points ${b}_{i}$ ’s, i.e., $i<j$ if ${b}_{i}<{b}_{j}$ . The geometric representation described above is called the chord diagram. We next introduce the circle graphs. An undirected graph ${G}_{c}$ is a circle graph if it can be represented by the following chord diagram; each vertex of the graph corresponds to a chord in the chord diagram, and two vertices are adjacent in ${G}_{c}$ if and only if their chords intersect.

In the following, we define proper circle graphs. If ${a}_{i}<{a}_{j}$ for any two chords i and j $\left(i<j\right)$ in the chord diagram, such chord diagram is called “proper.” The proper circle graph is a graph that is constructed by a proper chord diagram. Figure 1(a) illustrates an example of a proper chord diagram D with 12 chords. Figure 1(b) illustrates a proper circle graph G corresponding to D shown in Figure 1(a). Table 1 shows the details of the CD D of Figure 1.

2.2. Expanded Chord Diagram

In the following, we introduce the expanded chord diagram constructed from a chord diagram for solving the problem easier. An expanded chord diagram can be constructed by transforming chord $\left[{a}_{i}\mathrm{,}{b}_{i}\right]$ in chord diagram to a horizontal line segment such that left and right endpoints have values ${a}_{i}$ and ${b}_{i}$ , respectively. Figure 2 shows the expanded chord diagram ED constructed from the proper chord diagram D illustrated in Figure 1.

3. Property of Proper Circle Graph

We describe some properties on the proper circle graph which are useful for constructing the algorithm for spanning forest problem. For two chords i and j $\left(i<j\right)$ in the (normal) chord diagram, we say chords i and j are disjoint if ${b}_{i}<{a}_{j}$ . Moreover, we say chord j contain i if ${a}_{j}<{a}_{i}$ . Figure 3 shows examples of the cases of disjoint and contain.

The following Lemma 1 is well known [22] .

Figure 1. Proper chord diagram and circle graph: (a) Proper chord diagram D; (b) Proper circle graph G.

Figure 2. Expanded chord diagram ED.

Figure 3. Examples of disjoint and contain: (a) Chords i and j are disjoint; (b) Chord j contains i.

Table 1. Details of proper chord diagram D.

Lemma 1. Let D be chord diagram and ${G}_{c}$ be a circle graph corresponding to D. Moreover, let ED be an expanded chord diagram constructed from D. Then, vertices i and j $\left(i<j\right)$ are adjacent in ${G}_{c}$ if and only if chord i and j are not disjoint and i does not contains j in ED.

We can establish the following lemma using Lemma 1.

Lemma 2. Let D be proper chord diagram and G be a proper circle graph corresponding to D. Moreover, let ED be an expanded chord diagram constructed from D. Then, vertices i and j $\left(i<j\right)$ are adjacent in G if ${a}_{j}<{b}_{i}$ for two chords i and j in ED.

(Proof) By Lemma 1, vertices ${v}_{i}$ and ${v}_{j}$ $\left(i<j\right)$ are adjacent in ${G}_{c}$ if and only if chord i and j are not disjoint and i does not contains j in ED. By the definition of proper circle graph, ${a}_{i}<{a}_{j}$ for any two chords i and j $\left(i<j\right)$ in the chord diagram. Therefore, ${a}_{j}<{a}_{i}$ (that is, contain) never occur in proper chord diagram. Then, vertices i and j $\left(i<j\right)$ are adjacent in G if ${a}_{j}<{b}_{i}$ for two chords i and j in ED. □

4. Parallel Algorithm for Spanning Forest Problem

4.1. Algorithm CSF

In this section we propose a parallel algorithm for constructing a spanning forest F of a given proper circle graph G. The spanning forest F is constructed from proper chord diagram D corresponding to G. Input of the algorithm is each chord terminal points ${a}_{i}$ and ${b}_{i}$ of D. All chords have been sorted by corner point ${b}_{i}$ in increasing order. Instead of using a sophisticated technique, we propose simple parallel algorithms using only the parallel prefix computation [23] and Brent’s scheduling principle [24] . After executing Step 3, F consists of the spanning forest of proper circle graph G.

Lemma 3. After executing Step 3 of Algorithm CSF, F consists of the spanning forest of proper circle graph G.

(Proof) In Step 2 of Algorithm CSF, we compute an array $M\left(i\right)$ for $1\le i\le n$ . $M\left(i\right)$ is the largest chord number that intersects chord i. This means $\left(i\mathrm{,}M\left(i\right)\right)$ is an edge in proper circle graph G and $M\left(i\right)$ is the largest vertex adjacent to i.

In Step 3 of Algorithm CSF, we add an edge in G if $i>M\left[i\right]$ . A graph that adds just one edge to a vertex larger than itself from each vertex is connected. Moreover, $M\left(i\right)$ of root vertices have same value as themselves. Then, after executing Step 3, each component in G is connected and has ${n}^{\prime}$ vertices and ${n}^{\prime}-1$ edges. By the properties of tree, F is a spanning forest of G. □

Table 2 and Figure 4 show details of arrays executing Step 3 and constructed F.

4.2. Analysis of Algorithm CSF

We analyze the complexity of Algorithm CSF. In Step 1, we initialize F and $M\left[i\right]$ . This step can be implemented in $O\left(logn\right)$ time using $O\left(n/\mathrm{log}n\right)$ processors by applying Brent’s scheduling principle [24] . In Steps 2, $M\left[i\right]$ is

Table 2. Details of $M\left(i\right)$ .

Figure 4. A spanning forest of G.

computed in $O\left(logn\right)$ time using $O\left(n/\mathrm{log}n\right)$ processors by applying parallel prefix computation [23] . In Step 3, we obtain a spanning forest of G. This step can be done in $O\left(logn\right)$ time using $O\left(n/\mathrm{log}n\right)$ processors by applying Brent’s scheduling principle. These steps can be implemented in $O\left(logn\right)$ time using $O\left(n/\mathrm{log}n\right)$ processors by applying Brent’s scheduling principle. In addition, neither concurrent read nor concurrent write is caused anywhere, and the same edges are not written more than once. Hence, Algorithm CSF can be executed on EREW PRAM. We have the following theorem.

Theorem 4. Algorithm CSF constructs a spanning forest of trapezoid graph G in $O\left(logn\right)$ time with $O\left(n/\mathrm{log}n\right)$ processors on EREW PRAM.

5. Concluding Remarks

In this paper, we presented a parallel algorithm to solve the spanning forest problem on proper circle graphs. This algorithm can be implemented in $O\left(logn\right)$ time with $O\left(n/\mathrm{log}n\right)$ processors on an EREW PRAM computation model using only parallel prefix computation [23] and Brent’s scheduling principle [24] without using a sophisticated technique. Solutions to the spanning problem have applications in electrical power provision, computer network design, circuit analysis, among others. For this reason, we think this paper is also worthy from both a theoretical and algorithmic point of view. In the future, we will continue this research by extending the results to other classes of graphs.

Acknowledgements

We express many thanks to anonymous referees for their valuable advices on the theory of our attacks and their helpful editorial comments. This work was supported by JSPS KAKENHI Grant Number 25330019 and 17K00324 both.

References

[1] Wilson, R.J. (1996) Introduction to Graph Theory. Prentice Hall, London.

[2] Chin, F.Y., Lam, J. and Chen, I. (1982) Efficient Parallel Algorithms for Some Graph Problems. Communications of the ACM, 25, 659-665.

https://doi.org/10.1145/358628.358650

[3] Klein, P. and Stein, C. (1990) A Parallel Algorithm for Eliminating Cycle in Undirected Graphs. Information Processing Letters, 34, 307-312.

https://doi.org/10.1016/0020-0190(90)90015-P

[4] Wang, Y.L., Chen, H.C. and Lee, C.Y. (1995) An Parallel Algorithm for Constructing a Spanning Tree on Permutation Graphs. Information Processing Letters, 58, 83-87.

[5] Wang, Y.L., Chiang, K.C. and Yu, M.S. (1998) Optimal Algorithms for Interval Graphs. Journal of Information Science and Engineering, 14, 449-459.

[6] Bera, D., Pal, M. and Pal, T.K. (2003) An Optimal PRAM Algorithm for a Spanning Tree on Trapezoid Graphs. Journal of Applied Mathematics and Computing, 1-2, 21-29.

https://doi.org/10.1007/BF02936178

[7] Honma, H., Honma, S. and Masuyama, S. (2009) An Optimal Parallel Algorithm for Constructing a Spanning Tree on Circular Permutation Graphs. IEICE Transactions on Information and Systems, E92.D, 141-148.

https://doi.org/10.1587/transinf.E92.D.141

[8] Honma, H., Nakajima, Y., Igarashi, Y. and Masuyama, S. (2014) Algorithm for Finding Maximum Detour Hinge Vertices of Interval Graphs. IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences, E97.A, 1365-1369.

https://doi.org/10.1587/transfun.E97.A.1365

[9] Even, S. and Itai, A. (1971) Theory of Machines and Computations. Academic Press, New York.

[10] Golumbic, M.C. (2004) Algorithmic Graph Theory and Perfect Graphs, Volume 57. 2nd Edition, Elsevier, New York.

[11] Bouchet, A. (1987) Reducing Prime Graphs and Recognizing Circle Graphs. Combinatorica, 7, 243-254.

https://doi.org/10.1007/BF02579301

[12] Gabor, C.P., Supowit, K.J. and Hsu, W.L. (1989) Recognizing Circle Graphs in Polynomial Time. Journal of the ACM, 36, 435-473.

https://doi.org/10.1145/65950.65951

[13] Avriel, M., Penn, M. and Shpirer, N. (2000) Container Ship Stowage Problem: Complexity and Connection to the Coloring of Circle Graphs. Discrete Applied Mathematics, 103, 271-279.

https://doi.org/10.1016/S0166-218X(99)00245-0

[14] Arratia, R., Bollobas, B., Coppersmith, D. and Sorkin, G.B. (2000) Euler Circuits and DNA Sequencing by Hybridization. Discrete Applied Mathematics, 104, 63-96.

https://doi.org/10.1016/S0166-218X(00)00190-6

[15] Spinrad, J. (1994) Recognition of Circle Graphs. Journal of Algorithms, 16, 264-282.

https://doi.org/10.1006/jagm.1994.1012

[16] Gavril, F. (1973) Algorithms for a Maximum Clique and a Maximum Independent Set of a Circle Graph. Networks, 3, 261-273.

https://doi.org/10.1002/net.3230030305

[17] Asano, T., Imai, H. and Mukaiyama, A. (1991) Finding a Maximum Weight Independent Set of a Circle Graph. IEICE Transactions on Fundamentals, E74A, 681-683.

[18] O.Goldschmidt, A.T. (1994) An Efficient Algorithm for Finding a Maximum Weight Independent Set of a Circle Graph. IEICE Transactions on Fundamentals, E77A, 1672-1674.

[19] Valiente, G. (2003) A New Simple Algorithm for the Maximum-Weight Independent Set Problem on Circle Graphs, ISAAC. In: Lecture Notes in Computer Science, Vol. 2906, Springer, Berlin, 129-137.

[20] Tiskin, A. (2008) Semi-Local String Comparison: Algorithmic Techniques and Applications. Mathematics in Computer Science, 1, 571-603.

https://doi.org/10.1007/s11786-007-0033-3

[21] Keil, J.M. (1993) The Complexity of Domination Problems in Circle Graphs. Discrete Applied Mathematics, 42, 51-63.

https://doi.org/10.1016/0166-218X(93)90178-Q

[22] Ageev, A.A. (1999) Every Circle Graph of Girth at Least 5 Is 3-Colourable. Discrete Mathematics, 195, 229-233.

https://doi.org/10.1016/S0012-365X(98)00192-7

[23] Gibbons, A. and Rytter, W. (1988) Efficient Parallel Algorithms. Cambridge University Press, Cambridge.

[24] Brent, R.P. (1974) The Parallel Evaluation of General Arithmetic Expressions. Journal of the ACM, 21, 201-206.

https://doi.org/10.1145/321812.321815