• 沒有找到結果。

FINDING A MAXIMUM SET OF INDEPENDENT CHORDS IN A CIRCLE

N/A
N/A
Protected

Academic year: 2021

Share "FINDING A MAXIMUM SET OF INDEPENDENT CHORDS IN A CIRCLE"

Copied!
4
0
0

加載中.... (立即查看全文)

全文

(1)

Information Processing Letters 41 (1992) 99-102 North-Holland

14 February 1992

Finding a maximum set of independent

chords in a circle *

R.C. Chang

Institute of Computer and Information Science, National Chiao Tung University, Hsinchy Taiwan 30050, ROC

H.S. Lee

Institute of Computer Science and Information Engineering, National Chiao Tung lJniversi& Hsinchy Taiwan 30050, ROC

Communicated by K. Ikeda Received 26 October 1990 Revised 24 September 1991

Abstract

Chang, R.C. and H.S. Lee, Finding a maximum set of independent chords in a circle, Information Processing Letters 41 (1992) 99-102.

In this note we propose an O(nmI algorithm for finding a maximum independent set of m chords which are incident to n vertices on a circle. This result can be applied to improving the time complexity of the algorithm for partitioning simple polygons into a minimum number of uniformly monotone polygons.

Keywords: Circle graph, combinatorial problems, computational geometry, maximum independent set, polygon decomposi- tion

1. Introduction

Let C be a circle which has n vertices and m chords connecting these n vertices. Two chords are said to be independent if they do not inter- sect. The problem considered in this paper is to find a maximum set of independent chords (MSIC) in C. The problem is equivalent to find- ing an independent set with maximum cardinality in a circle graph. An independent set of a graph is a subset of its vertices where no two vertices are joined by an edge. A circle graph correspond- ing to the set of chords in a circle can be con- structed as follows. If there are chords sharing

* This research work was partially by the National Science Council of the Republic of China under grant No. NSCBO- 0408-EOO9-03.

the same end-point, we can expand the circle slightly so that no chords are sharing the same end-point. Every vertex in the circle graph corre- sponds to a chord in the circle and two vertices are connected if their corresponding chords inter- sect. There are m vertices in the circle graph constructed in this way.

Gavril 131 first proposed an O(m3) algorithm for finding a maximum independent set of a circle graph with m vertices. Buckingham [2], Read et al. [5] and Supowit [6] independently proposed various O(m*> algorithms for this prob- lem. Applying these O(m*) algorithms to the case where chords are allowed to have common end- points would result in a complexity of 0(n4) in the worst case. Liu and Ntafos [4] presented a dynamic programming approach to solve this problem in 0(n3). However, the time complexity

(2)

Volume 41, Number 2 INFORMATION PROCESSING LETTERS 14 February 1992

of Liu and Ntafos’ algorithm depends only on the number of vertices in a circle no matter how many chords there are. Later an O(nm> time and O(n) space algorithm was given by Asano et al.

[Il.

In this paper, we propose another O(nm> algo- rithm to find an MSIC in a circle with II vertices and m chords. But our algorithm is conceptually simpler than that of Asano et al.

2. The algorithm

Let E denote the set of chords in C, the set of vertices in C be numbered from u1 to u,, clock- wise, and e(i, j) denote the chord that connects ui and uj. Also define V(i, j) = (uk I i G k <j) and E(i, j) = {e(Z, m) I i =G f <m <j and e(l, m) E Ej. V(i, j) denotes the set of vertices between ui and cj, and E(i, j) denotes the set of chords connect- ing only vertices in V(i, j). Hence, E(1, n) = E.

Let C(i, j) denote an MSIC of E(i, j) and let

M(i, j> be the cardinality of C(i, j). It follows that Ccl, n) is an MSIC of E and C(i, j) = @ when j G i.

Our algorithm is also based on the principle of dynamic programming, which is stated in the fol- lowing lemma. Lemma 2.1. C(i, j) = max iGk<j-1, (C(i, j- l), C(i, k- 1) e(k, j)EE uC(k + 1, j - 1) u {e(k, j)}), where max(.> is a function to take the set with maximum cardinality in the argument list.

Proof. Since C(i, j) is an MSIC between u, and uj, it follows that all chords of C(i, j) do not intersect. C(i, j) must contain either one or none of e(k, j) E E for i G k <j - 1.

For the first case, assume that C(i, j) contains the chord e(k, j). Because the chords in C(i, j) do not intersect, the chords in C(i, j) except e(k, j) can be classified into two parts: chords of the first part connect only vertices in I%, k - 1) and chords of the second part connect only vertices in

V(k + 1, j - 1). Furthermore, these two parts are

100

MSICs of C(i, k - 1) and C(k + 1, j - 1) respec- tively. Hence, the MSIC of V(i, j) can be com- puted as follows:

C(i, j) =C(i, k-l) UC(k+l, j-l) U{e(k, j)}.

For the latter case in which C(i, j> contains none of e(k, j) E E for i <k <j - 1, chords in C(i, j) connect only vertices in V(i, j - 1). Vertex

L> can be discarded without affecting the MSIC

of V(i, j). Therefore, C(i, j) = C(i, j - 1).

From above, if C(i, k - 1) U C(k + 1, j - 1) U

{e(k, j)) is the largest set for all possible k

between i and j - 1, we can conclude that C(i, j) equals C(i, j - 1) or C(i, k - 1) U C(k + 1, j - 1)

u (e(k, j)} depending on which one is larger. 0

Ccl, n) an MSIC of E, can be computed according to the recurrence relation in Lemma 2.1 above. Based on Lemma 2.1, Algorithm MSIC works in a bottom-up manner. MSICs are con- structed incrementally along the circle. Once MSICs for smaller intervals have been computed, MSICs for larger intervals can be computed ac- cording to Lemma 2.1. Intervals to be computed are expanded incrementally until the interval contains all the vertices on C. Algorithm MSIC is stated in the following:

Algorithm MSIC For i = 1 to n Do C(i, i) = @; Forl=lton-1Do Fork=lton-IDo Begin j=i+Z; C(i, j) = C(i, j - 1);

For all e(k, j) E E where i < k G j - 1 Do if M(i, k - 1) + M(k + 1, j - 1) + 1 > M(i, j) then CG, j) = C(i, 1) u {e(k, dl End End of MSIC. k - 1) U C(k + 1, j -

(3)

Volume 41, Number 2 INFORMATION PROCESSING LETTERS 14 February 1992

An adjacent matrix A can be used to repre- sent E. Let a(i, j) denote an entry of A; a(i, j) is equal to 1 if e(i, j) E E and a(i, j> is equal to 0 otherwise. Since only those e(i, j>‘s that belong to e and satisfy that i <j are considered in Algo- rithm MSIC, entries above the diagonal of A would be sufficient. That is, we can leave the entries on and below the diagonal of A unde- fined. In order to implement the inmost loop in the Algorithm MSIC efficiently, a slight modifica- tion to A, however, is needed. Associate each entry of A above the diagonal with a pointer. As shown in Fig. 1, entries with 1 in a column are chained together, and entries with 0 in a column point to the first entry with 1 following them in the same column. For each entry in A, if there is no entry with 1 following it in the same column, the pointer of this entry is set to ground, that is, the diagonal entry on this column. For example, both 42, 6) and 43, 6) point to ~(5, 61 and ~(3, 5) points to ~(5, 51, the ground. With such modi- fication, the inmost loop can be executed effi- ciently because only entries with 1 are scanned. Note that A can be constructed in O(n*) time. The complexity of our algorithm is analyzed in the following theorem.

Theorem 2.2 Algorithm MSIC runs in O(nm) steps, wherem=IEl.

Proof. The complexity of Algorithm MSIC is equal to the number of entries with 1 in A scanned by Algorithm MSIC, and it is given by the following equation. n-l n-l i+l-1 C C C a(k,i+l) [cl i=l k=i n-l n j-l = C C C a(k, j) I=1 j=l+l k=j-1 n j-l j-l = C C C a(k, i) j=2[=1 k=j-1 n j-1 = C C k*a(k,j) j=2 k=l n j-l Qn C C a(k, j) j=2 k=l =nm. 0

Consider a restricted case in which V(1, n) can be divided into two parts, V(1, k) and V(k + 1, n) such that all chords of E connect one vertex in V(1, k) and another vertex in V(k + 1, n). In other words, E(1, k) = E(k + 1, n) = fl. We call this a bipartite case. For the bipartite case, we have the following corollary.

Fig. 1. (a) A circle with six vertices and five chords. (b) The variant adjacent matrix corresponding to the chord set in (a).

(4)

Volume 41, Number 2 INFORMATION PROCESSING LETTERS 14 February 1992

Corollary 2.3. For the bipartite case stated above, Algorithm MSZC can be improved to run in O(n’).

Proof. Assume that the set of chords E is in a bipartite case. Consider the inmost loop of Algo- rithm MSIC. Let K = {k I e(k, j) E E and i Q k < j - 1). Suppose k,, k, E K and k, <k,. We want

to show that

E(i, k, - 1) = E(i, k, - 1) = fl.

If E(i, k, - 1) # 6, then there exists a chord e E E(i, k,). However, there will be no such k’ that all chords in Ie(k, j)l k E K) U (e) connect one vertex in V(1, k’) and another vertex in V(k’ + 1, n). In other words, this is not a bipar- tite case. Hence E(i, k, - 1) = (d and E(i, k, - 1)

= fl similarly. We have C(i, k, - 1) = C(i, k, - 1) = @. Furthermore, M(k, + 1, j- 1) zM(k,+ 1, j- 1). It follows that max(C(i, k, - 1) U C( k, + 1, j - 1) u(e(k,, j)], C(i, k,-l)UC(k,+l, j-l) u {e(k~ j)} = C(i, k, - 1) u C(k, + 1, j - 1) U{e(k,, j)}; therefore,

C(i, j)=max(C(i, j-l),C(i, k-l)

uC(k+ I, j- 1) U {e(k, j)}), where k is the smallest integer in K. Since the inmost loop requires only one comparison, total time requires O(n*) steps. 0

3. Conclusion

Finding a maximum set of independent chords on a circle is a crucial step in partitioning simple polygons into the minimum number of uniformly monotone polygons in [4]. In this note, we have presented an O(nm) algorithm for this problem, which is faster than 0(n3) when m is less than O(n*). When applying the MSIC-finding algo- rithm to partitioning simple polygons into the minimum number of uniformly monotone poly- gons, we may find that the vertices on the circle are in a bipartite case. Then we can apply Corol- lary 2.3 to this bipartite case to obtain an O(n*> algorithm. As for the case where the vertices on the circle are not in a bipartite case, it remains open whether there exists an algorithm which has a time complexity better than O(nm) for the MSIC problem.

References

[l] T. Asano, H. Imai and A. Mukaiyama, A faster algorithm for finding a maximum weight independent set of a circle graph, Inform. Process. Sot. Japan SIGAL Report AL5-18 (1989) 133-138.

[2] M. Buckingham, Circle graphs, Ph.D. Dissertation, Courant Institute, Rept. NSO #21, October 1980. [3] F. Gavril, Algorithms for a maximum clique and a maxi-

mum independent set of a circle graph, Networks 3 (1973) 261-273.

[4] R. Liu and S. Ntafos, On decomposing polygons into uniformly monotone parts, Inform. Process. Lett. 27 (2) (1988) 85-89.

[S] R.C. Read. D. Rotem and Urrutia. Orientations of circle graphs, J. Graph Theory 6 (1982) 325-341.

[6] K.J. Supowit, Finding a maximum planar subsets of a set of nets in a channel, IEEE Trans. Computer-Aided Design 6 (1) (1989) 93-94.

參考文獻

相關文件

[This function is named after the electrical engineer Oliver Heaviside (1850–1925) and can be used to describe an electric current that is switched on at time t = 0.] Its graph

– Factorization is “harder than” calculating Euler’s phi function (see Lemma 51 on p. 404).. – So factorization is harder than calculating Euler’s phi function, which is

• If a graph contains a triangle, any independent set can contain at most one node of the triangle.. • We consider graphs whose nodes can be partitioned into m

What was more surprising, when the sides of the two equilateral polygons changed at a certain rate, the pattern of the generated graph would become a tessellation.. Then we could

If that circle is formed into a square so that the circumference of the original circle and the perimeter of the square are exactly the same, the sides of a pyramid constructed on

In this talk, we introduce a general iterative scheme for finding a common element of the set of solutions of variational inequality problem for an inverse-strongly monotone mapping

In this paper, we extended the entropy-like proximal algo- rithm proposed by Eggermont [12] for convex programming subject to nonnegative constraints and proposed a class of

We explicitly saw the dimensional reason for the occurrence of the magnetic catalysis on the basis of the scaling argument. However, the precise form of gap depends