Counting cocircuits and convex two-colourings is #P-complete

We prove that the problem of counting the number of colourings of the vertices of a graph with at most two colours, such that the colour classes induce connected subgraphs is #P-complete. We also show that the closely related problem of counting the …

Authors: Andrew J. Goodall, Steven D. Noble

Coun ting Co circuits and Con v ex Tw o-Colourings is #P-complete Andrew J. Go o dall ∗ Departmen t of Mathematics Univ ersit y W alk Univ ersit y o f Bristol Bristol, BS8 1TW United Kingdom Stev en D. Noble † Departmen t of Mathematical Sciences Brunel Univ ersit y Kingston Lane Uxbridge, UB8 3PH United Kingdom No v em b er 1, 2018 Abstract W e pro ve that t he p roblem of counting the num b er of colourings of the vertices of a graph wi th at most tw o colours, suc h that th e colour classes induce connected subgraphs is #P-complete. W e also sho w that the closely related problem of counting the num b er of cocircuits of a graph is #P-complete. 1 In tro duc tion A conv ex colouring of a g raph G is an a ssignment of colours to its vertices so that for each colour c the subgraph of G induced b y the vertices r eceiving colour c is connected. W e consider a gra ph with no vertices to b e connected. The purp ose of this pap er is to r esolve a question of Mako wsk y [3 ] by showing that count ing the num b er o f conv ex colourings using at most t wo colours is #P- complete. More precisely we show that the fo llowing problem is #P - complete. # Convex Two-Colourings Input: Graph G . Output: The n umber of f : V ( G ) → { 0 , 1 } such that both G : f − 1 (0) and G : f − 1 (1) are connected. ∗ Supported b y the H eilbronn Institute for Mathematical Research, Br istol, U.K . † Pa rtial ly supp orted b y the Heilbronn Institu te for M athematical Research, Bristol, U .K. 1 F or the definition o f the c omplexity class #P , see [2] or [4]. Note that the num ber of conv ex colouring s using at most tw o colo urs is equal to zer o if G has three or more connected c o mpo nents and eq ua l to tw o if G has exactly tw o connected comp onents. So we may restrict o ur attention to connected graphs. 2 Reductions All our gra phs will b e simple. W e b egin with a few definitions . Let X and Y be disjoint sets o f vertices of a g raph G . The set o f edges o f G that hav e o ne endpo int in X a nd the o ther in Y is denoted by δ ( X , Y ). Given a co nnected graph G , a cut is a pa rtition of V ( G ) in to tw o (non-empty) sets ca lled its shor es . The cr ossing set of a cut with shor e s X and Y is δ ( X, Y ). A cut is a c o cir cuit if no pr o p e r subset of its crossing set is the crossing set of a cut. Let G b e a connected gr aph. Then a c ut of G with cross ing s et A is a co circuit if and only if the graph G \ A obtained b y removing the edges in A from G has exactly t wo connected compo nents. Note that our terminology is s lightly at o dds with standard usage in the sense that the terms cut and c o circuit usually refer to what w e call the crossing set o f resp ectively a cut and a co circuit. Our us a ge prevents some cumbersome descriptions in the pro ofs. W e will how ever abuse our notation by saying that a c ut or co circuit ha s s ize k if its c r ossing set has size k . W e co nsider the complex ity o f the following pro blems. # Cocir cuits Input: Simple connected graph G . Output: The nu mber o f co cir cuits o f G . # Required Size Cocircuits Input: Simple connected graph G , strictly po sitive in tege r k . Output: The nu mber o f co cir cuits o f G of size k . # Max Cut Input: Simple connected graph G , strictly po sitive in tege r k . Output: The nu mber o f cuts o f G of size k . # Monotone 2-SA T Input: A Bo olean formula in conjuctive nor mal form in which each c lause contains tw o v ariables and there are no negated literals. Output: The nu mber o f sa tisfying a ssignments. It is ea sy to see tha t ea ch of these pr oblems is a member of #P . The following result is from V alia nt’s semina l pap er on #P [6]. Theorem 1. # Monotone 2-SA T is # P -c omplete. W e will establish the following reductio ns . # Monotone 2-SA T ∝ # Max Cut ∝ # Required S ize Cocircuits ∝ # Cocircuits ∝ # Conv ex Tw o-Colo urings . 2 Combining Theorem 1 with these reductions sho ws that each of the five problems that we have discussed is #P-co mplete. As far a s we ar e aw are, each of these reductions is new. W e hav e not b een able to find a refer ence showing tha t # Max Cut is # P complete. Perhaps it is correct to describ e this result as ‘folklore’. In an y cas e our first reductio n will establish this result. Some similar problems, but not exactly what we consider here, are shown to be # P complete in [5]. Lemma 1 . # Monotone 2-SA T ∝ # Max Cut . Pr o of. Supp ose we hav e an instance I o f # Monotone 2-SA T with v ar iables x 1 , . . . , x n and clauses C = { C 1 , . . . , C m } . W e co nstruct a corres po nding in- stance M ( I ) = ( G, k ) of # Max Cut by first defining a graph G with vertex set { x } ∪ { x 1 , . . . , x n } ∪ [ {{ c i, 1 , . . . , c i, 6 } : 1 ≤ i ≤ m } F or each clause we add nine edg es to G . Supp ose C j is x u ∨ x v . Then we add the edges xc j, 1 , c j, 1 c j, 2 , c j, 2 x u , x u c j, 3 , c j, 3 c j, 4 , c j, 4 x v , x v c j, 5 , c j, 5 c j, 6 , c j, 6 x. Distinct clauses cor r esp ond to pairwise edge-disjoint circuits, each of size 9 . Now let k = 8 |C | . Clea r ly M ( I ) may b e constructed in po lynomial time. W e claim that the num b er o f solutio ns of instance M ( I ) of # Max Cut is equal to 2 |C | times the n umber of satisfying assignments of I . Given a solution of I , let L 1 be the set of v ar iables assig ned the v alue true and L 0 the set of v ariables assigned false to g ether with x . Observe that for each clause C j = x u ∨ x v there ar e tw o choices of how to a dd the vertices c j, 1 , . . . , c j, 6 to either L 0 or L 1 so that exactly eight edges of the circuit corr e sp o nding to C j hav e one endpoint in L 0 and the other in L 1 . Cle a rly the choices fo r each clause are indep endent and distinct satisfying assignments r esult in distinct choices of L 0 and L 1 . Any of the choices of L 0 and L 1 constructed in this w ay may be taken as the shor es of a cut of size 8 |C | . Hence we hav e cons tr ucted 2 |C | solutions of M ( I ) cor resp onding to each satisfying a ssignment of I . In any graph the intersection o f a set of edges forming a circ uit and a cross ing set of a cut must a lwa ys ha ve even size. So in a solution of M ( I ) each of the edge- disjoint circuits mak ing up G and cor resp onding to clauses of I mu st contribute exactly eight edges to the cut. Supp ose U and V \ U ar e the s ho res of a cut of G of size 8 |C | . Then it ca n eas ily be verified that fo r any clause C = x u ∨ x v bo th U and V \ U must co nt ain at least o ne element from { x u , x v , x } . So it is stra ightforw ard to see that this solution of M ( I ) is one o f those constructed ab ov e corr esp onding to the satisfying assignment wher e a v aria ble is false if and only if the co rresp onding vertex is in the same s et as x . Lemma 2 . # Max Cut ∝ # Required Size Cocircuits . Pr o of. Supp ose ( G, k ) is a n instance of # Max Cut . W e cons tr uct an instance ( G ′ , k ′ ) of # Required Size Cocir cuits a s follo ws. Suppo s e G has n vertices. T o form G ′ add new vertices x, x ′ , x 1 , . . . , x n 2 to G . Now add an edge from x to every other vertex of G ′ except x ′ and similar ly a dd an edg e fro m x ′ to every other vertex o f G ′ except x . Let k ′ = n 2 + n + k . Clearly G ′ may be constructed in po lynomial time. F rom each solution of the # Max Cut instance ( G, k ) 3 we construct 2 n 2 +1 solutions of the # Required Size Cocircuits instance ( G ′ , k ′ ). Supp ose C = ( U, V ( G ) \ U ) is a solution of ( G, k ) then we may freely choose to a dd x, x ′ , x 1 , . . . , x n 2 to either U or V ( G ) \ U , with the sole proviso that x and x ′ are not b oth added to the same set, to o btain a cut in G ′ of size k ′ = n 2 + n + k . F urther mo re this cut is a co circuit b ecause both shores cont ain exactly one of x a nd x ′ and s o they induce c onnected s ubgraphs. Conv ersely supp os e C = ( U, V ( G ′ ) \ U ) is a coc ircuit in G ′ of size k ′ . Consider the pair of edges inc ide nt with x j . Note that the partitio n ( x j , V ( G ′ ) \ x j ) is a co cir c uit. So if b oth of the edges incident with x j are in the cro ssing set of C then beca use of its minimality we must hav e C = ( x j , V ( G ′ ) \ x j ) which is not p o ssible b ecause C w ould then hav e size 2 < k ′ . Now suppo se that neither edge inciden t with x j is in the cr ossing s et of C . Then b oth x and x ′ lie in the same blo ck of the partition constituting C . But sinc e G is a simple graph, the maximum p ossible size o f such a co cir cuit is at most 2 n +  n 2  < n 2 + n + k . Hence precisely o ne o f the edges adjacent to x j is in the cr ossing set. So x and x ′ are in different shores of C . Hence the cr ossing set of C contains: for each j precisely one edge incident to x j ( n 2 edges in total), for each v ∈ V ( G ) precisely one of edges v x and v x ′ ( n edges in total) and k other edges with b o th endpo in ts in V ( G ). So the partition C ′ = ( U ∩ V ( G ) , V ( G ) \ U ) is a cut of G of s ize k and hence C is one o f the c o circuits constructed in the first part of the pro o f. Consequently the n umber o f solutions of the instance ( G ′ , k ′ ) of # Required Size Cocircuits is 2 n 2 +1 m ultiplied b y the nu mber of solutions o f the instance ( G, k ) of # Max Cut . Lemma 3 . # Required Size Cocircuits ∝ # Cocircuits Pr o of. Given a graph G let N k ( G ) denote the num b er of co cir cuits of s ize k and N ( G ) denote the total nu mber o f co cir cuits. Let G l denote the l - stretch of G , that is, the graph formed from G by replacing each edge of G by a path with l edges. Let m = | E ( G ) | . Then we claim that N ( G l ) = m X k =1 l k N k ( G ) +  l 2  m. T o see this suppose that C is a co cir cuit of G k . If the crossing set of C contains tw o edges fro m one of the paths corresp o nding to an edge of G then by the minimality o f the cro s sing set of C we see that it contains precise ly these t wo edg es. The n umber of such co circuits is  l 2  m . Otherwise the crossing set C contains a t most one e dg e from e a ch path in G l corres p o nding to an edge of G . Suppose the cr ossing set of C co ntains k such edges . Let A denote the corresp o nding e dg es in G . Then A is the cr ossing set o f a co circuit in G of size k . F ro m each such c o circuit we ca n constuct l k co circuits of G l by c ho o sing one edge from each path co rresp onding to a n edg e in A . The claim then follows. If w e co mpute N ( G 1 ) , . . . , N ( G m ) then we may retrieve N 1 ( G ) , . . . , N m ( G ) by using Gaussian eliminatio n b ecause the matrix o f co efficients o f the linear equations is an inv er tible V andermonde matrix. The fact that the Gaussia n elimination may be ca rried out in p oly nomial time fo llows from [1]. Lemma 4 . # Cocir cuits ∝ # Convex Colo urings . 4 Pr o of. The lemma is eas ily proved using the following observ ation. When tw o colours are av a ilable, there are t wo co nv ex colour ings of a connected graph using just one colour a nd the n umber of con vex colour ings using b oth colours is equal to twice the n umber of co circ uits. The pr e ceding le mmas imply o ur main result. Theorem 2. # Convex Colourings is # P-har d. Ac kno wledgemen t W e thank Gr aham Brig ht w ell for use ful discus sions. References [1] J. Edmonds. Sys tems o f distinct r epresentativ es and linea r algebra. Journal of R ese ar ch of t he National Bur e au of Standar ds Se ction B 71B :241– 245, 1967 [2] M. R. Garey and D. S. Johnso n. Computers and I ntr actability . W. H. F ree- man, New Y or k, 197 9. [3] J. A. Makowsky . Problem p osed at the problem sessio n at “Building Bridges: a conference on mathematics and computer science in honour of Laci Lov´ asz”, B udap e st, 20 08. [4] C. H. Papadimitriou. Computational Complexity . Addison-W esley , Rea ding MA, 1994. [5] J. S. Prov an and M. O. Ball. The co mplexity of counting cuts and of comput- ing the pro bability that a gra ph is connected. SIAM Journ al on Computing 12 :777– 788, 1983 . [6] L. G. V alia nt. The complexity o f enumeration and relia bilit y problems. SIAM Journal on Computing 8 :410– 421, 19 79. 5

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment