A Parallel Algorithm for the Spanning Forest Problem on Proper Circle Graphs ()
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
edges;
2) T is connected, and has
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
edges. This problem has applications, such as electric power systems, computer network design and circuit analysis [1] . A spanning tree can be found in
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
time using
processors [2] . Moreover, for a connected graph, Klein and Stein demonstrated that a spanning tree can be found in
time with
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
time using
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
time with
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
time using
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
time using
processors on the EREW PRAM.
Let
be a family of nonempty sets. A simple graph G is the intersection graph of
if there exists a one-to-one correspondence between the vertices of G and the sets in
, 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
. Gavril [16] presented a
time algorithm for finding a maximum independent set of a circle graph.
time algorithms were developed by other researchers [17] [18] . Valiente [19] solved the problem in
time and only
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
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
time with
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
,
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
and
on C and is denoted by
. Without loss of generality, each chord i has two terminal points
and
, and all terminal points are distinct. We assume that chords are labeled in increasing order of their corner points
’s, i.e.,
if
. The geometric representation described above is called the chord diagram. We next introduce the circle graphs. An undirected graph
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
if and only if their chords intersect.
In the following, we define proper circle graphs. If
for any two chords i and j
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
in chord diagram to a horizontal line segment such that left and right endpoints have values
and
, 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
in the (normal) chord diagram, we say chords i and j are disjoint if
. Moreover, we say chord j contain i if
. 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 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
be a circle graph corresponding to D. Moreover, let ED be an expanded chord diagram constructed from D. Then, vertices i and j
are adjacent in
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
are adjacent in G if
for two chords i and j in ED.
(Proof) By Lemma 1, vertices
and
are adjacent in
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,
for any two chords i and j
in the chord diagram. Therefore,
(that is, contain) never occur in proper chord diagram. Then, vertices i and j
are adjacent in G if
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
and
of D. All chords have been sorted by corner point
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
for
.
is the largest chord number that intersects chord i. This means
is an edge in proper circle graph G and
is the largest vertex adjacent to i.
In Step 3 of Algorithm CSF, we add an edge in G if
. A graph that adds just one edge to a vertex larger than itself from each vertex is connected. Moreover,
of root vertices have same value as themselves. Then, after executing Step 3, each component in G is connected and has
vertices and
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
. This step can be implemented in
time using
processors by applying Brent’s scheduling principle [24] . In Steps 2,
is
computed in
time using
processors by applying parallel prefix computation [23] . In Step 3, we obtain a spanning forest of G. This step can be done in
time using
processors by applying Brent’s scheduling principle. These steps can be implemented in
time using
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
time with
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
time with
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.