ELSEVIER
Information
Processing
Letters 58 ( 1996) 55-58
A simple NC-algorithm for a maximal independent set in a hypergraph of poly-log arboricity Oscar Garrido a,‘, Pierre Kelsen b*2,Andrzej Lingas a,*,3 a Department of Computer Science, Lund University, Box 118, S-221 00 Lund. Sweden b Max-Plank-Institutfr
Informatik, 66123 Saarbriicken, Germany
Received 8 February
1995; revised 26 February Communicated by M.J. Atallah
1996
Abstract The first NC-algorithm
for finding a maximal independent
set in a hypergraph of low arboricity is presented.
Keywords: Maximal independent set; Hypergraph; Parallel algorithms
1. Introduction
A hypergraph H = (v!E) is a natural generalization of a graph. The set E of edges of H consists of some nonempty subsets of the finite vertex set V of H. For a vertex u in V, the degree deg (u) of u in H is the number of edges in E it belongs to. The maximum degree of a vertex in V is called the valence of H, and the maximum cardinality of an edge in E is called the dimension of H. A hypergraph of dimension 2 is simply an undirected graph (if singletons are neglected). An independent set of H is a subset of V which doesn’t include any edge in E. A maximal independent set (MIS, for short) of H is an independent set which is not a proper subset of any other independent set of H.
* Corresponding author. ’ Email:
[email protected]. Supported by TFR. * Email:
[email protected]. Supported by the European Commission under a research fellowship of the Human Capital and Mobility (HCM) programme. 3 Email:
[email protected]. Supported by TFR. 0020.0190/96/$12.00 PII SOO20-0 I90(
@ 1996 Elsevier Science B.V. All rights reserved 96) 00040-3
A MIS of a hypergraph can be trivially computed in polynomial time by a greedy method. The parallel complexity status of finding a MIS of an arbitrary hypergraph is regarded as a major open problem in parallel complexity theory [ 61. When no restrictions on dimension are assumed the only nontrivial upper bound follows from a parallel randomized search method due to Karp, U fal and Wigderson [ 71. Their method yields an 0( /- 1VI log( 1VI + IEl ) ) expected time bound on finding a MIS of a hypergraph H = (YE) in the EREW PRAM model with 0( 1VI 1El ) processors (see [ 91) . For hypergraphs of constant dimension, Kelsen has recently proved a parallel randomized algorithm due to Beame and Luby to run in poly-logarithmic time using a linear number of processors [ 93. Thus, the so restricted problem is in RNC. By derandomizing the aforementioned algorithm Kelsen has also shown that a MIS for a hypergraph of constant dimension can be found in time nE, for any given E > 0. For hypergraphs of dimension 2, i.e., for graphs, several NC-algorithms for MIS are known [4,8,10]. The first of them is due to Karp and
56
0. Garrido et al. /Information
Wigderson [ 81, the simplest is due to Luby [ lo], and the most efficient is due to Goldberg and Spencer [ 41. The latter algorithm has been recently generalized to include hypergraphs of dimension 3 independently by Dahlhaus, Karpinski and Kelsen [ 21. In this way, the membership of the MIS problem for hypergraphs of dimension 3 in NC has been established. It seems that the dimension 3 is a limit for the method due to Goldberg and Spencer [ 21. In [ 91 Kelsen concludes that a new approach has to be found in order to derive efficient parallel algorithms for MIS in hypergraphs of nonconstant dimension. In this paper we consider hypergraphs of arbitrary dimension that are hereditary sparse. To formalize the sparsity property we extend the known concept of graph arboricity to include hypergraphs. Recall that the arboricity T(G) of a graph G is the minimum number of forests the edges of G can be partitioned into. For example, graphs of bounded genus and partial ktrees have constant arboricity. Analogously, we define the arboricity ‘7’(H) of a hypergraph H as the minimum number of acyclic hypergraphs (see Section 2) the edges of H can be divided into. We show that a maximal independent set in a hypergraph H on n vertices can be found in time 0( ‘7’(H)2 log 7’( H) log2 n) on an EREW PRAM with 0( n?‘( H) ) processors, or in time O(T( H) log4 n) on a CREW PRAM with O( nY( H)) processors. Thus, if H is of poly-log arboricity, i.e., 7’(H) = 0( logk n) for some integer constant k, then a maximal independent set in H can be found in polylogarithmic time using a polynomial number of processors. Also, if H is of constant arboricity, i.e., T(H) = 0( 1), then a maximal independent set in H can be constructed in time O( log2 n) on an EREW PRAM with O(n) processors.
2. Hypergraph
arhoricity
A hypergraph is acyclic if it doesn’t contain any alternating chain ~0, ea, . . . , u&l, ek_1 of vertices and edges such that all the vertices ~0,. . . , u&l and all the edgeseo,..., ek-t aredistinctandfori=O,...,k-1, } is in ei [ I]. The following characteriza{Ui,‘-‘i+lmodk tion of acyclic hypergraphs will be useful [ 1, Proposition 4, p. 3921.
Processing Letters 58 (I 996) 55-58
Lemma 1. A hypergraph H = (YE) with n vertices and p connected components is acyclic ifl C(ie/
- 1) = n -p.
eEE
For simplicity, we shall denote the set of restrictions of edges in a set E to a vertex subset U, i.e., {e II U 1 e E E}, by En U throughout the paper. Also, we shall say that a hypergraph F = (U, D) is a subhypergraph of a hypergraph H = ( YE) if U c V, and D c En U. It follows easily that for any subhypergraph F of a hypergraph H, the inequality 7’(F) < T(H) holds. Hence, we obtain the following theorem by Lemma 1. Theorem 2. For any subhypergraph F = (U, D) of a hypergruph H, the inequality CeED ( (e( - 1) < !Y(H) x IUI holds. In particular, the number of nonsingleton edges of F is smaller than T(H) x IUI. Thus, the notion of hypergraph or graph arboricity corresponds to the notion of hereditary or inherent sparsity. By the size of a hypergruph we shall mean the sum of cardinalities of its edges and the number of its vertices. Corollary 3. For any hypergraph H on n vertices, the size of H is smaller than 2( T( H) + 1)n.
3. The algorithm Fix a hypergraph H with vertex set V and edge set E. Our algorithm for finding a maximal independent set in H, denoted by IVISA (H), has the following simple high-level structure. It may be viewed as an NC Turing reduction to the problem of computing a large independent set in a hypergraph. We denote the procedure that finds a large independent set by IS(H) . Algorithm MZS,J(H). Input: A hypergraph H = (YE). Output: A maximal independent set in H. Method: Remove vertices in singleton edges from V; if [VI < 1 then output 0 and stop; S +- IS(H);
0. Garrido
et al./hformation
return ( S U MISA ( H’) ) where H’ has vertex set V-SandedgesetEn(V-S); end MISA The partial correctness of this algorithm follows from the observation that a set A4 containing S is a maximal independent set in H = (YE) if and only if M - S is a maximal independent set in H’ = (V -
s,En (v- s)).
For algorithm MZSA to be efficient, we need IS(H) to return a large independent set in H. This is made precise in the following lemma. Lemma 4. Let t : N t N be a monotone function satisfying t(r) > log r for any r E N, and let H be an arbitrary hypergraph of size m on n vertices. Assume IS(H) computes an independent set in H of size at least cn (c < 1) in time t(m) on an EREW PRAM with O(m) processors. Algorithm MISA computes a maximal independent set in H in time 0( t(m) (logn)/c) on an EREW PRAM with O(m) processors. Proof. The first recursive call MZSA(H’) is performed on a hypergraph with at most n - cn = ( 1 - c)n vertices. Thus the recursion depth is 0( (log n) /c). The hypergraph H’ can be easily constructed in time O( log m) using an EREW PRAM with O(m) processors by using standard parallel techniques [ 61. Hence, each level of the recursion takes time 0( t( m) ) on an 0 EREW PRAM with O(m) processors. We can reduce the problem of finding a large independent set in a hypergraph to the corresponding problem for graphs as follows: replace each edge e in H by an edge (u, v) where {u, U} 2 e (u # u). (Note that after step 1 of MZSA all edges of H have size at least 2.) Call the resulting edge set E’. Let G denote the graph with vertex set V and edge set E’. We remark that any independent set of G is also an independent set in H. Furthermore G has arboricity at most T(H). Thus IE’I < T(H) . n by Theorem 2. The average degree of a vertex in G is thus at most 27‘(H) and at least half of the vertices in G have degree at most 47’(H) , Let G’ denote the subgraph of G induced by the vertices in G of degree at most 4Y( H). Note that G’ has at least n/2 vertices and that any independent set in G’ is independent in G and hence in H. Clearly, G’ can be constructed in time logarithmic in the size
Processing
Letters
51
58 (1996) 55-58
of H using an EREW PRAM with a linear number of processors. Goldberg, Plotkin and Shannon [3] describe two algorithms for coloring a graph of maximum degree A on n vertices in time O(logA( A2 + log* n)) and time 0( A log A log n) respectively, using an EREW PRAM with O(nA) processors. We can construct an independent set of size Ck(n/A) by simply selecting the largest color class. The selection adds an 0( log n) factor to both time bounds in the EREW PRAM model. Set y(H) = min{n, r( H)}. The maximum degree of G’ is 0( y( H) ) . Thus, we can compute an independent set in G’ (and hence in H) of size R (n/y (H) ) in time 0(min{(logy(H))(y(H)2 y(H)(logy(H))
+ log* n), logn} + logn),
i.e.,O(y(H)(logy(H))min{y(H)+(logn)/y(H),
logn}), using a linear number of processors. By Corollary 3, the linear number of processors can be expressed as 0( y( H)n). From this discussion and Lemma 4 we obtain the following result. Theorem 5. Let H be a hypergraph on n vertices and A maximal independent set y(H) = min{n, T(H)}. in H can be computed in time 0(y(H)2(logy(H)) min{y(H) + (logn)/y(H),logn}logn) using an EREW PRAM with 0( nZ’( H) ) processors. Note that the running time is always 0( T( H)* log T(H) log2 n) andfor T( H) = 0( 1) it is 0(log2 n). We can improve on this result for larger values of T(H) by considering a randomized algorithm for finding a large independent set in G’. Let A denote the maximum degree of G’. Each vertex u marks itself with probability l/( 24). Each edge both of whose endpoints have been marked unmarks its endpoints. The independent set consists of the vertices that are still marked. Note that a vertex has a marked neighbor with probability at most l/2. Thus the expected size of the independent set is at least n/ (44). The computation can be performed in time 0( 1) using a CRCW PRAM with a linear number of processors. Hence, it can be done in time O(log(y(H)n)), i.e., O(logn), using an EREW PRAM with a linear processor [ 61. Together with Lemma 4 we get the following theorem.
58
0. Garrido et al. /Inform&on Processing Letters 58 (1996) 55-58
Theorem 6. A maximal independent set in a hypergraph H on n vertices can be computed in expected time O(min{n, Y(H)} log* n) using a probabilistic EREW PRAM with O( nT’( H) ) processors.
The expected time bound can be converted into a high probability bound using standard techniques [5]. Because the lower bound for the expected size of the independent set only requires pairwise independence among the random choices, we can now apply directly the results of [ 11, Section 3.41 to derandomize the probabilistic procedure for IS, obtaining a deterministic algorithm running in time O(log3 n) using a CREW PRAM with a linear number of processors. Again by applying Lemma 4, we obtain the final result of this paper: Theorem 7. A maximal independent set in a hypet-graph H on n vertices can be computed in time O(min{n, Y’(H)} log4 n) using a CREW PRAM with 0( n’?‘( H) ) processors.
4. Final remark The presented time bounds can be slightly improved in the CRCW PRAM model.
References [II C. Berge, Graphs and Hypergraphs (Hermann, Paris, 1970). 121 E. Dahlhaus, M. Karpinski and P Kelsen, An efficient parallel algorithm for computing a maximal independent set in a hypergraph of dimension 3, Inform. Process. Len. 42 ( 1992) 309-313. I31 A.V. Goldberg, S.A. Plotkin and GE. Shannon, Parallel symmetry-breaking in sparse graphs, SIAM J. Discrete Math. 1 (1988). [41 M. Goldberg and T. Spencer, Constructing a maximal independent set in parallel, S/AM J. Discrete Math. 2 ( 1989) 322-328.
[51 R.M.
Karp,
Probabilistic
recurrence
relations,
in:
Proceedings 23rh Annual ACM Symposium on Theory of Computing (1991) 190-197.
161 R.M. Karp and V. Ramachandran, Parallel algorithms for shared-memory machines, in: J. van Lceuwen, ed., Handbook Vol. A (North-Holland, Amsterdam, 1990) 869-94 I.
of Theoretical Computer Science
[71 R.M. Karp, E. Upfal and A. Wigderson,
The complexity of parallel search, J. Compur. Sysrem Sci. 36 ( 1988) 225-253. I81 R.M. Karp and A. Wigderson, A fast parallel algorithm for the maximal independent set problem, in: Proceedings 16rh Annual ACM Symposium on Theory of Compuring,
Washington, DC ( 1984). [91 I? Kelsen, On the parallel complexity of computing a maximal independent set in a hypergraph, in: Proceedings
[ to1
[ItI
24th Annual ACM Symposium on Theory of Computing (1992). M. Luby, A simple parallel algorithm for the maximal independent set problem, SIAM J. Compur. 15 ( 1986) lO361053. M. Luby, Removing randomness in parallel computation without a processor penalty, J. Compur. System Sci. 47 (1993) 250-286.