The complexity of testing whether a graph is a superconcentrator

The complexity of testing whether a graph is a superconcentrator

‘Volume 13, numbers 4,s INFORMATION PROCESSING LETTERS End 1981 THECOMPLEXITY OF TESTINGWHETHERA GRAPH IS A SUPERCONCENTRATOR M. BLUM *) R.M. KARP ...

497KB Sizes 0 Downloads 46 Views

‘Volume 13, numbers 4,s

INFORMATION PROCESSING LETTERS

End 1981

THECOMPLEXITY OF TESTINGWHETHERA GRAPH IS A SUPERCONCENTRATOR M. BLUM *) R.M. KARP ** and 0. VORNBERGER*** Universityof C@fomnirr, Berkeley, CA 94 720, U.S.A.

C.H. PAPADIMITRIOU$

,

MassachusettsInstituteof Technology, Cambridge,MA 02139, U.S.A.

M. YANNAKAIUS Bell Laboratories,MurrayHill, NJ, U.S.A. Received 29 May 1981; revised version received 16 September 1981 Concentrator, superconcentrator, NPcompleteness

1. Introduction Pinsker [7] and Val&t [8] defined an (m,n)-concentrator to be a directed acyclic graph G = (V,E) with m designated input nodes and n designated output nodes (m Z n) such that for each subset of n input nodes, there exist n vertex-disjoint paths from these input nodes to the output nodes. Concentrators have been used as building blocks for the construction of superconcentrators.A superconcentrator [8] is a directed acyclic graph G = (V,E) with n designated input nodes and n designated output nodes such that for any set S of m < n inputs and any set T of m outputs there exist m node-disjoint paths connecting S to T. A very surprising result due to Valiant [8] is the existence of superconcentrators with n inputs and O(n) edges. Valiant’s result relied on a non-constructive counting argument, and so did the subsequent refinement due to Pippenger [61. Until * Research supported by NSF grant MCS-79-03767. ** Supported by a MiUer Research Professorship and by NSF grants MCS-77-09906 and MCS-79-03767. *** Supported by the German Academic Exchange Service under grant 492402-503-1. * Supported by NSF grant MCS-79-08965. This research was partially conducted .when the author was visiting BeB Laboratories. 164

very recentlytherewas no known explicit construction of linearsuperconcentrators, althoughit followed from the resultsof Valiantand Pippengerthat almostall graphsin a certainclassarelinearsuperconcentrators(recentlyan explicit constructionof linearsu$erconcentrators was presentedin [2] ; see also [S]). This conundrum led to the following practicalsuggestionfor the constructionof superconcentratorsand concentrators(communicatedto the authorsby R.L. Rivestand S. Bhattin the spring of 1979). Pick at randoma graphin the appropriateclass (these aredefiled in [6-8] and areeasy to sample). Test to see whetherit is a superconcentrator (or concentrator).In the unlikely case that it is not, repeatthe processuntil successful, The questionis thereforeraised,how hardis it to decidewhethera graphis an (m, @-concentrator,or a superconcentrator?In this note we show that these problemsarecoNI%omplete[2,S]. In fact, tk:y are completeeven when restrictedto the important specialcaseof graphsof size linearin the numberof inputs.Wealso examine the (m&concentrator problemin the specialcase in which everynode is eitheran input node or an output node. Perhaps surprisingly,we show that this problemis a&able in polynomialtime by bipartitematchingtechniques.

Vohuncl13;

numb

4,s

INF@RMATION PROCESSINGLETTERS

2.Reductions A class of graphs called matchers (cf. 92,611will be useful in the development of our reductions. A ig(~bjjlOrtlfd~~hB~IV*,V?,E)with IV1I= &I a& that say subset S ofV, with 9S9= #IV*I ambematchedto ISInodeaof Vs. By Hall’s tite matchiq thh is equivalent 9S9for all s z vt with IS96 #9V19,wbere~S)isthe~ofSinB,f.e. {vEV~: [u,vlEEforsomeuES). Weshall be concerned with the following three decision problems.

#INI cart exist. Given (N, A) we construct the bipartite graphB=OI1,V,,E)asf~llows.V1 =NX (I,2 ,..., 2k). Vs contains the following nodes: (1) one node for each edge in A, (2) 9A9u-nodes ul, u2, ..-, uIA19 (3) for each n E N, c(n) nodes nl , ... . nctn) wh&e c(n) = 2k - degree(n). That is,

and

IV21= lAl+ /Al + 2k jNJ- ng degree(n) = 2k INI= IV, 9.

CONCEN’I‘RA~R. Given a directed acyclic graph

G=:(V,E)and1,OE?r,disSoint,itisthecasethat for all S !&I with IS9= 909there exist IS9node-disjoint pathsfromStoO? MATCHER.Given a bipartite graph B = (Vr , Vz , E), with9V19=9Va9=2M,Mtthecasethatforall S c VI, IS9= M, there exists a set T E V1, such that IT9= IS9and there is a matching between S and T ? supERCoNcIENTRAT0R. Given a directed acyclic graph C = (V, E) and I, 0 c V, disjoint, (I( = 901,is it thecasethatbetweenanyS~IandT~OwithIS~= ITI there exist 9SInodedisjoint paths? All three problems are in coNP. For example, a polynomial-length proof that a graph C = (V, E) is ltot a concentrator would be a cut C %V which separates a set of 161t 1 input nodes from the outputs. Meng& theorem 111tmplias that such a cut must exist if G is not a concentrator. We next prove the completeness results. TMorurn I. AlATU%R is cohJP+omplete.

To construct E, we connect each node (n, i) E VI, where n E N and 1 Q i 4 2k, tu the following nodes in v2: (1) every node representing an edge a such that n is incident upon a in (N, A), (2) the nodes ul, u2, ... . u(k) 2 -4

(3) all nodes nj for j = 1, .... c(n). We shall show that B is a matcher if and only if (N, A) does not have a clique of size k. As was noted in the introduction, the MATCHER property is violated iff, for some S E Vt such that ISI Q $15 I = 2k2, we have jr(S)1 < ISI, where I’(S) = (vEV~: [u,v]EEforsomeuES). Claim. There exists an S (I VI such that [Sj G 2k2 and ’ IT’(S)1 < ISI *(N,A) has a clique of size k. In preparation for proving this claim, and with it

the theorem, we make some calculations. Consider a subset S s VI with ISI G 2k2. Let us define N(S) = {n EN: (n, i) (ZS for some i). Then r(S)=

Prsoc,We&ail reduce to MATCHERthe complement of ths fallawingNP+omplete special case of CU~UE.

Given a graph (N, A), does it have a clique of size flN ? Wemay assume that 9N9is an even number, say 2k, and that /A9> (:“, since otherwise no clique of size

End 1981

{Ul,UZ,

-*vu

k (2)-ll

U

u na@S)

N,

. . . . nc(n))

U (a (5 A: a is incident upon N(S)). Thus ir(S)l

=

(t) -

1 + _5sj

(2k - degree(n))

+ 1{a E A: a is incident upon N(S)} I. 3 4e,ment set of nodes we Viewing each edge as a r-W 165

Volume 13, numbers4,s

INFORMATIONPROCESSINGLE’ITERS

have

II’(S)1= (i)

- 1 + Ck IN(S)1- 21( a E A: a C N(S)}! - /(aEA: lanN(S)I= 1)1)

+(l{aEA:

aGN(S))I

+ l{aEA: IanN(

= 111

= (;) - 1 + 2k IN(S)1 - l(aEA: acN(S))l). ((=) Let g be a clique of size lc. Take s=Rx (1,2,..., 2k).Then iI’(S)l=(t)- 1 +2k2 - (;) = 2k2 - 1 < {Sl. (*) Let S be such that II’(S)/< ISI.We show that N(S) is a clique of size k. CaseI. IN(S)/ 2k IN( > ISI.Thus, this case is impr\osible . CaseI’ IN( > k. Then IF(S)13 (i) - 1 + 2k IN(S)1- (INpi ). Since the functron (k) - 1 + 2kx -- (i) is stnctly increasing for x 6 2k, X’(S)/> (i) - 1 t 2k2 - (!j). Hence II’(S)12 2k” > 1Sl.This case is also impossible. Case III. IN( = k. Then IF(S)/ = (i) - 1 + 2k2 I (a E A: a s N(S)) I < 2k2. Hence I{a E A la E N(S)} I> (i) - 1, anal it follows that N(S) is a clique of size k. proof of clam.

Corollary 1. CONCENTRATORis CONPcomplete. Proof. We reduce MATCHERto CONCENTRATOR. Given the bipartite graph B = (VI, V2, Ii) where IV,! = IV2I = 2M, we define an acyclic bipartite directed graph G’ = (V’, E’), a set I of input nodes, and a set 0 of output nodes, as follows: I=&, 0 is a set of size M disjoint from Vr and Va , v’=vuo,

E’=EU(V2XO).

Then G is a concentrator if and only if B is a matcher. Corollary 2. SUPERCONCENTRATORis coNPcomplete. Proof. The proof of Corollary 1 is enough to show this result as well. Since the output nodes are all connected to the intermediate nodm, the choice of 166

B&d1981

output nodes (which makes the difference between the two problems) becomes immaterial. Coroil~y 3. There is a constant c > 0 such that the SUPERCONCENTRATORprobIemand the COlbsCENTRATORproblemsare~~~~Iete even when restrictedto with n input and output nodes, and total n edgts at most cn. Proof. In the constructionof Theorem1 and Corollary1 replacethe completebipartite linearsuperconcentrators, constructedas i explicit constructiongiven in [2] can be carriedout in logarithmicspace. 3. The directconcentratorptobkm By DIRECT CONCENTRATORwe denote the concentratorproblemin the is a b@urtiregraph(I, 0, E), whether thereis a matchingof everysubset of 101 input ncdes. Theorem2. DIRECT CONCENTRATORb in P. Proof. Givena bipartitegraphG = (I, 0, E) with I = (ir , . ... im) and 0 = (o ++An
st one of the

Proof of Lemma.(Only if) 5; concentrator.Then, by ofSofrCninputnodesofG,hasan in8 of fewer than Foutp

nality less than r. By IBUs Theorem,there is no conk plete matchingin GJ.

Ihhme 13,nmbm 4,s

INFORMATION PROCESSING LETTERS

(‘If)Suppose that Gj does not havea complete matching.By HaWsTheorem,in Gi some subsetS of

End 1981

questions answered here, in the spring of 1979. The presentsimple proof of Corollary 2 is due to Maria Klawe.

References

Theomn 2 now fotiows from the lemma.The concan be decided phs$,j = 1, . This can be done in

sting for the concentrator s of depth (Le., length of longest path) one. By the proof of Theorem1, the problemis coNP-completeeven for digraphsof depth two.

Ron Rivestand SandeepBhattfust defmed the concentratorproblem,and raisedthe complexity

111 L.R.Ford and D.R Fulkerson, Flows in Networks (Princeton University Press, Princeton, NJ, 1962). 1210. Gabber and 2. Gal& Explicit construction of linear size superconcentrators, Proc. 20th IEEE Symposium on Foundations of Computer Science (1979) pp. 364-370. [ 3) P. Hail, On representations of subsets, J. London Math. Sot. 10 (1935) 26-30. 14) I.E. Hopcroft and R.M. Karp, An n5’2 algorithm for maximum matchings in bipartite graphs, SIAM 3. Comput. 2 (1973) 225-231. (S] G.A. Margulis, Explicit construction of concentrators, Probferny Peredachi Informatsii 9 (4) (1973) 71-80. (English translation in: Problem: oEInformation Transmission (Plenum, New York, 1975.) (6 J N. Pippenger, Superconcentrators, SIAM J. Comput. 6 (1972) 298-304. 17) M.S. Pinsker, On the complexity of a concentrator, 7th International ‘Telegraphic Conference, Stockholm, June 1973.318~1-31814. [St L.C. Valiant, On nonlinear lower bounds in computational complexity, Proc. 7th Annual ACM Symposium on Theory of Computing, Albuquerque, NM (1975) pp. 45-53.

diPed

167