Information and Computation 264 (2019) 1–11
Contents lists available at ScienceDirect
Information and Computation www.elsevier.com/locate/yinco
On blockwise symmetric matchgate signatures and higher domain #CSP Zhiguo Fu ∗ , Fengqin Yang, Minghao Yin School of Computer Science & Information Technology, Northeast Normal University, Changchun, China
a r t i c l e
i n f o
Article history: Received 29 April 2018 Received in revised form 31 August 2018 Available online 18 September 2018 Keywords: Blockwise symmetry Matchgate Holographic transformation #CSP
a b s t r a c t For any n ≥ 3 and q ≥ 3, we prove that the Equality function (=n ) on n variables over a domain of size q cannot be realized by matchgates under holographic transformations. This is a consequence of our theorem on the structure of blockwise symmetric matchgate signatures. This has the implication that the standard holographic algorithms based on matchgates, a methodology known to be universal for #CSP over the Boolean domain, cannot produce P-time algorithms for planar #CSP over any higher domain q ≥ 3. © 2018 Elsevier Inc. All rights reserved.
1. Introduction Half a century ago, the Fisher–Kasteleyn–Temperley (FKT) algorithm was discovered [19,16,17]. The FKT algorithm can count the number of perfect matchings (dimers) over planar graphs in polynomial time. This is a milestone in the long history in statistical physics and combinatorial algorithms. But the case over general graphs is different. In 1979 L. Valiant [25] defined the class #P for counting problems. Most counting problems of a combinatorial nature, Sum-of-Product computations such as partition functions studied in physics, and counting Constraint Satisfaction Problems (#CSP) are all included in #P (or more precisely in FP#P as the output may be non-integers). In particular, counting perfect matchings in general graphs is #P-complete [20]. In two seminal papers [21,24], L. Valiant introduced matchgates and holographic algorithms. Computation in holographic algorithms based on matchgates is expressed and interpreted through a choice of linear basis vectors in an exponential “holographic” mix. Then the actual computation is carried out, via the Holant Theorem, by the FKT algorithm for counting the number of perfect matchings in a planar graph. This methodology has produced polynomial time algorithms for a variety of problems ranging from restrictive versions of Satisfiability, Vertex Cover, to other graph problems such as edge orientation and node/edge deletion. No polynomial time algorithms were known for any of these problems, and some minor variations are known to be NP-hard. In the past decade significant progress was made in the understanding of these remarkable algorithms [3,5,6,10,13,18, 22,24,23]. In an interesting twist, it turns out that the idea of a holographic transformable is not only a powerful technique to design unexpected algorithms (tractability), but also an indispensable tool to prove intractability and then to prove classification theorems. Furthermore, in a self-referential twist, it has proved to be a crucial tool to understand the limit and scope of the newly introduced holographic algorithms themselves [9,12,15,14,5,13,3]. This study has produced a number of
*
Corresponding author. E-mail addresses:
[email protected] (Z. Fu),
[email protected] (F. Yang),
[email protected] (M. Yin).
https://doi.org/10.1016/j.ic.2018.09.012 0890-5401/© 2018 Elsevier Inc. All rights reserved.
2
Z. Fu et al. / Information and Computation 264 (2019) 1–11
complexity dichotomy theorems. These classify every problem expressible in a framework as either solvable in P-time or being #P-hard, with nothing in between. One such framework is called (weighted) #CSP problems. Let [q] = {0, 1, · · · , q − 1} denote a domain of size q. A #CSP problem over the domain [q] (for q = 2, it is the Boolean domain) is specified by a fixed finite set F of local constraint functions. Each function f ∈ F has an arity k, and maps [q]k → C. (Unweighted #CSP problems are defined by 0–1 valued constraint functions.) An instance of #CSP(F ) is specified by a finite set of variables X = {x1 , x2 , . . . , xn }, and a finite sequence of constraints S from F , each applied to an ordered sequence of variables from X . The output of this instance is σ f ∈S ( f |σ ), a sum over all σ : X → [q ], of products of all constraints in S evaluated according to σ . #CSP is a very expressive framework for locally specified counting problems. E.g., all spin systems are special cases where F consists of a single binary constraint, and possibly some unary constraints when there are “external fields”. For an instance of #CSP(F ), by creating a node for each variable and each constraint function, and connecting a variable node to a constraint node if the variable appears in the constraint function, we get a bipartite graph G. Then we say the instance is over the graph G. The following classification theorem for #CSP on the Boolean domain is proved in gradually increasing generalities [10,13,2], reaching full generality in [2]: Theorem 1.1. For any finite set of constraint functions F over Boolean variables, each taking (algebraic) complex values and not necessarily symmetric, #CSP(F ) belongs to exactly one of three categories according to F : (1) It is P-time solvable; (2) It is P-time solvable over planar graphs but #P-hard over general graphs; (3) It is #P-hard over planar graphs. Moreover, category (2) consists precisely of those problems that are holographically reducible to the FKT algorithm, whereby all constraint functions in F and Equality functions of all arities are transformed to matchgate signatures. Theorem 1.1 shows that holographic algorithms with matchgates form a universal strategy, that applies a holographic transformation whereby we transform all Equality functions to matchgates, for all problems in this framework that are #P-hard in general but solvable in polynomial time on planar graphs. But for #CSP over higher domains, the situation is different. Over the general domain of size q ≥ 3, there are only a few holographic algorithms with matchgates [26,1]. But it can be argued that they are problems that actually get transformed to a Boolean domain #CSP problems. What is the role of holographic algorithms with matchgates for #CSP over higher domain is an interesting open problem. In the present paper, we prove the following theorem: Theorem 1.2. For any n ≥ 3 and q ≥ 3, there is no q × 2 matrix M of rank q such that the transformed Equality function (=n ) M ⊗n by M can be realized by a matchgate signature, where (=n ) is the Equality function on n variables over the domain [q]. This result has the consequence that the standard strategy that is universal for #CSP on the Boolean domain, cannot work in any higher domain [q], where q ≥ 3. In the proof of Theorem 1.2, a main tool is the use of Matchgate Identities (MGI). These are a set of polynomial equations on the entries of a matchgate realizable constraint function (signature) and they have deep relations to some branches of mathematics and complexity theory. In [7,11,27], MGI were used to prove the basis collapse theorems and many techniques were developed. In the present paper, we contribute some new techniques to use MGI. Theorem 1.2 is a part of our effort to achieve a full structural characterization of blockwise symmetric matchgate signatures. This improves upon the work by Cai and Lu [8]. Our characterization theorem will be stated in Theorem 4.2, after we have defined all the necessary terminology. Compared to the theorem in [8] we eliminate a non-vanishing condition and improve the characterization to all arity n ≥ 3. This improvement makes Theorem 1.2 above possible. We also give a counter example to indicate that Theorem 4.2 cannot be further improved to n = 2. So we have achieved a complete characterization of the structure of blockwise symmetric matchgate signatures. Beyond #CSP, there is a framework called Holant problems for locally specified counting problems, of which #CSP is a special case. In [3], it is proved that, the analogous universality statement for Holant problems over the Boolean domain is not true: In addition to holographic reductions to matchgates, there is another set of problems (expressible in the Holant framework but not in #CSP) that is #P-hard in general but P-time tractable over planar graphs. Moreover they cannot be transformed to matchgates, and the P-time algorithm is not the type discussed in this paper. Thus the present paper also highlights the distinction and importance of Holant problems, beyond #CSP. It is an open question how to classify Holant problems for higher domains, especially those problems that are #P-hard in general but P-time tractable over planar graphs. The paper is organized as follows: In Section 2, we briefly give the background, some notations and lemmas. In Section 3, we prove that the matrix form of a blockwise symmetric matchgate signature has rank less than 3. This shows that holographic algorithms with matchgates cannot work for #CSP on higher domain. In Section 4, we gave a complete characterization for the structure of blockwise symmetric matchgate signatures. 2. Preliminaries In the following, we always use e i to denote the string with 1 in the i-th bit and 0 elsewhere (of some length n) and use 0 to denote the n-bit string 00 · · · 0.
Z. Fu et al. / Information and Computation 264 (2019) 1–11
3
Let G = ( V , E , W ) be a weighted undirected planar graph. A matchgate is a tuple (G , X ) where X ⊆ V is a set of external nodes, ordered counterclockwise on the external face. is called an odd (resp. even) matchgate if it has an odd (resp. even) number of nodes. Each matchgate with n external nodes is assigned a matchgate signature (α )α ∈{0,1}n with 2n entries,
i 1 i 2 ···in = PerfMatch(G − Z ) =
wij,
M (i , j )∈ M
where the sum is over all perfect matchings M of G − Z , and Z ⊆ X is a subset of external nodes having the characteristic sequence χ Z = i 1 i 2 · · · in and G − Z is obtained from G by removing Z and its incident edges. An entry α is called an even (resp. odd) entry if the Hamming weight wt(α ) is even (resp. odd). It was proved in [4] that matchgate signatures are characterized by the following two sets of conditions. (1) The parity requirements: either all even entries are 0 or all odd entries are 0. This is due to perfect matchings. (2) A set of Matchgate Identities (MGI) defined as follows: For any α ∈ {0, 1}n and any position vector P = { p 1 , p 2 , · · · , p }, where p 1 < p 2 < · · · < p , also denoted by the bit string with 1 in the p i -th bits for 1 ≤ i ≤ and 0 elsewhere, (−1)i α +e pi α + P +e pi = 0
(2.1)
i =1
(alternating sum by flipping in sequence the bits p i and the bits in P \ { p i }), where α + β denotes the XOR of α and β . Actually in [4] it is shown that MGI implies the Parity Condition. But in practice, it is easier to apply the Parity Condition first. We use M to denote the set of matchgate signatures. For an instance of #CSP(F ) over [q], an n-ary function f in F can be represented as a qn vector
( f 0···00 , f 0···01 , · · · , f 0···0(q−1) , · · · , f i 1 ···in−1 in , · · · , f (q−1)···(q−1)(q−1) ). We use f T denote the transpose of f . Note that the Equality function (=n ) is a qn vector that takes the value 1 when all the variables are equal and 0 elsewhere. Let M be a q × 2 matrix of rank q, where ∈ Z+ and 2 ≥ q, then by linear ˆ such that M M ˆ = I q . Valiant’s holographic algorithm for #CSP is to find a pair of M algebra, there exists a 2 × q matrix M ˆ such that and M
ˆ )arit y ( f ) f T ∈ M (=n ) M ⊗n ∈ M , ( M
(2.2)
for each n ≥ 1 and for each f ∈ F , then the problem #CSP(F ) can be transformed to compute the weighted perfect matchings of a graph, where (2.2) is the holographic transformation. Moreover, if the constraint graph of #CSP(F ) is planar, then #CSP(F ) can be computed in polynomial time by the FKT-algorithm. In particular, Theorem 1.1 shows that this is a universal strategy for #CSP over Boolean domain and planar graphs. In the present paper, we will prove that for n ≥ 3 and q ≥ 3, there are no matrices M such that (=n ) M ⊗n ∈ M . Thus Valiant’s strategy can not work for #CSP(F ) on higher domains. More details about holographic algorithms can be found in [24]. Definition 2.1. A function f = ( f i 1 i 2 ···in ), where each i j ∈ [q], is symmetric if f is invariant under any permutation of {i 1 , i 2 , · · · , in } i.e., f i 1 i 2 ···in = f i σ (1) i σ (2) ···i σ (n) for any permutation σ of {1, 2 · · · , n}. For example, the Equality functions are symmetric. Definition 2.2. For an n-ary symmetric function f = ( f i 1 i 2 ···in ) over domain [q], its matrix form M ( f ) is a q × qn−1 matrix, where the rows are indexed by i 1 and its columns are indexed by i 2 i 3 · · · in . For example, the matrix form of the Equality function (=3 ) over domain {0, 1, 2} is the following matrix
M (=3 ) =
(=3 )000 (=3 )001 (=3 )002 (=3 )010 (=3 )011 (=3 )012 (=3 )020 (=3 )021 (=3 )022 (=3 )100 (=3 )101 (=3 )102 (=3 )110 (=3 )111 (=3 )112 (=3 )120 (=3 )121 (=3 )122 (=3 )200 (=3 )201 (=3 )202 (=3 )210 (=3 )211 (=3 )212 (=3 )220 (=3 )221 (=3 )222
Note that M (=n ) has rank n. Let α ∈ {0, 1}n be a string of length n. We write it as the blockwise form (in size-) of α .
=
100000000 000010000 000000001
.
α = α1 α2 . . . αn , where each αi ∈ {0, 1} has length , and call it
Definition 2.3. An n-ary signature over the Boolean domain is blockwise symmetric in size- if = (α1 α2 ···αn ), where each αi ∈ {0, 1} , is invariant under any permutation of {α1 , α2 , · · · , αn } i.e., α1 α2 ···αn = ασ (1) ασ (2) ···ασ (n) for any permutation σ of {1, 2 · · · , n}. In particular, if = 1, we say is bitwise symmetric.
4
Z. Fu et al. / Information and Computation 264 (2019) 1–11
Definition 2.4. The matrix form M () of the blockwise symmetric signature = (α1 α2 ···αn ) of arity n is a 2 × 2(n−1) matrix. Its rows are indexed by α1 and its columns are indexed by α2 · · · αn .
⎛
0000 0100 α α 1 2 ⎝ ), where n = 2, = 2, then M () = For example, let = ( 1000 1100 by M ()α for α ∈ {0, 1} .
0001 0101 1001 1101
0010 0110 1010 1110
⎞
0011 0111 ⎠ . We denote the 1011 1111
α -th row of M ()
The following is a simple lemma from Linear Algebra. Lemma 2.5. Let A , B , C be m × n, n × s, s × t matrices respectively, where rank( A ) = n, rank(C ) = s, then rank( A B ) = rank( B ), rank( BC ) = rank( B ). The following lemma shows that after a holographic transformation, a symmetric function becomes a blockwise symmetric signature. Lemma 2.6. Let f be an n-ary symmetric function on the domain [q], M be a q × 2 matrix and = f M ⊗n , then = (α1 α2 ···αn ) is blockwise symmetric, where αi ∈ {0, 1} for 1 ≤ i ≤ n.
α ∈ {0, 1} is the index of columns. From = f M ⊗n , we have · · · M in . Then for any permutation σ of {1, 2, · · · , n}, we have
Proof. Let M = ( M iα ), where i ∈ [q] is the index of rows and
α1 α2 ···αn =
f
i 1 i 2 ···in
i 1 ,i 2 ,··· ,in ∈[q]
α1
α2
1
2
Mi Mi
ασ (1) ασ (2) ···ασ (n) =
αn
ασ (1)
f i σ (1) i σ (2) ···i σ (n) M i
i σ (1) ,i σ (2) ,··· ,i σ (n) ∈[q]
σ (1)
ασ (2)
Mi
σ (2)
α
· · · M i σσ(n(n) ) .
Note that f i σ (1) i σ (2) ···i σ (n) = f i 1 i 2 ···in since f is symmetric. Moreover, we have α
α
αn
1
2
n
Mi 1 Mi 2 · · · Mi α σ (1 )
since { M i
σ (1 )
α
α
α
= M i σσ(1(1) ) M i σσ(2(2) ) · · · M i σσ(n(n) )
α
α
, M i σσ(2(2) ) , · · · , M i σσ(n(n) ) } is just a permutation of { M iα11 , M iα22 , · · · , M iαnn }. Thus
α1 α2 ···αn = ασ (1) ασ (2) ···ασ (n) . This implies that is blockwise symmetric.
2
Moreover, for the matrix forms of f , in Lemma 2.6, we have the following lemma. Lemma 2.7. (Lemma 2.2 of [1]) If f M ⊗n = , then M () = M T M ( f ) M ⊗(n−1) , where M T is the transpose of M. 3. Equality (=n ) with n ≥ 3 on domain size ≥ 3 cannot be realized by matchgates For a string α ∈ {0, 1}n , we use wt(α ) to denote the Hamming weight of α . Let = (α1 α2 ···αn ), where αi ∈ {0, 1} for 1 ≤ i ≤ n, be a blockwise symmetric matchgate signature and M () be the matrix form of . If rank( M ()) ≥ 2, then there exist σ , τ ∈ {0, 1} that satisfy the following conditions:
• M ()σ and M ()τ are linearly independent, • wt(σ + τ ) = min {wt(u + v ) | M ()u and M () v are linearly independent}, u , v ∈{0,1}
where
σ + τ is the XOR of the bit strings σ and τ . Moreover, for any β = α2 · · · αn ∈ {0, 1}(n−1) , let xβ =
σ α ···α 2 n . Then τ α2 ···αn
there exist ζ, η satisfy the following conditions:
• xζ and xη are linearly independent, • wt(ζ + η) = min {wt(u + v ) | xu and x v are linearly independent}. u , v ∈{0,1}(n−1)
For such
σ , τ , ζ, η, the following lemma is from Lemma 5.3 and Lemma 5.4 of [1] using Matchgate Identities.
Lemma 3.1. If rank( M ()) ≥ 2, then wt(σ + τ ) = 1 and wt(ζ + η) = 1.
Z. Fu et al. / Information and Computation 264 (2019) 1–11
5
For a blockwise symmetric matchgate signature = (α1 α2 ···αn ) of arity n, by Lemma 3.1 and the Parity Condition, if rank( M ()) ≥ 2, then M () has a full rank submatrix of the form (zeros are due to the Parity Constraint)
α1 α2 ···αn 0
0
(α1 +e s )(α2 +et )···αn
or
0
(α1 +e s )(α2 +et )···αn
α1 α2 ···αn 0
,
where e s , et ∈ {0, 1} . Moreover, let = (α1 α2 ···αn ) be a blockwise symmetric matchgate signature of arity n. If rank( M ()) ≥ 3, then there exist σ , τ ∈ {0, 1} satisfy the following conditions:
• wt(σ ) and wt(τ ) have the same parity, • M ()σ and M ()τ are linearly independent, • wt(σ + τ ) = min {wt(u + v ) | wt(u ) and wt( v ) have the same parity and M ()u , M () v are linearly independent}. u , v ∈{0,1}
Moreover, for any β = α2 · · · αn ∈ {0, 1}(n−1) , let xβ =
σ α ···α 2 n . Then there exist ζ, η satisfy the following condition: τ α2 ···αn
• xζ and xη are linearly independent, • wt(ζ + η) = min {wt(u + v ) | xu and x v are linearly independent}. u , v ∈{0,1}(n−1)
For such
σ , τ , ζ, η, the following Lemma is from Lemma 5.5 and Lemma 5.6 of [1] using Matchgate Identities.
Lemma 3.2. If rank( M ()) ≥ 3, then wt(σ + τ ) = 2, wt(ζ + η) = 2. For a blockwise symmetric matchgate signature = (α1 α2 ···αn ) of arity n, Lemma 3.2 implies that if rank( M ()) ≥ 3, then M () has a full rank submatrix of the form
α1 α2 α3 ···αn
(α1 +e i +e j )α2 α3 ···αn
or
α1 (α2 +e s +et )α3 ···αn
(3.3)
α1 α2 α3 ···αn
(α1 +e i +e j )α2 α3 ···αn
(α1 +e i +e j )(α2 +e s +et )α3 ···αn
α1 (α2 +e s )(α3 +et )···αn
(α1 +e i +e j )(α2 +e s )(α3 +et )···αn
(3.4)
,
where e i , e j , e s , et are in {0, 1} , and in both (3.3) and (3.4) we have i < j, while in (3.3) we have additionally s < t. But we will prove that the two matrices in (3.3) and (3.4) are both degenerate if is a blockwise symmetric matchgate signature in the following two lemmas. Thus rank( M ()) ≤ 2. This is the key result of this paper. Lemma 3.3. Let = (α1 α2 ···αn ) be a blockwise symmetric matchgate signature of arity n, where n ≥ 3. Then for any α1 α2 · · · αn ∈ {0, 1}n ,
A=
α1 α2 α3 ···αn
(α1 +e i +e j )α2 α3 ···αn
α1 (α2 +e s )(α3 +et )···αn
(α1 +e i +e j )(α2 +e s )(α3 +et )···αn
is degenerate, where e i , e j , e s , et ∈ {0, 1} and i < j. Proof. We will prove that det( A ) = 0 by applying Matchgate Identities (MGI). Let the pattern be (α1 + e i )α2 α3 · · · αn and the position vector be (e i + e j )(e s )(et )0 · · · 0. Then by MGI we have
α1 α2 α3 ···αn (α1 +ei +e j )(α2 +e s )(α3 +et )···αn − (α1 +ei +e j )α2 α3 ···αn α1 (α2 +e s )(α3 +et )···αn +(α1 +ei )(α2 +e s )α3 ···αn (α1 +e j )α2 (α3 +et )···αn − (α1 +ei )α2 (α3 +et )···αn (α1 +e j )(α2 +e s )α3 ···αn = 0.
(3.5)
This instantiation of MGI has 4 terms, each component flipping the bits at position i , j , s + , t + 2 respectively. Moreover, let the pattern be (α1 + e i )α3 α2 α4 · · · αn and the position vector be (e i + e j )(et )(e s )0 · · · 0. Then we have
α1 α3 α2 ···αn (α1 +ei +e j )(α3 +et )(α2 +e s )···αn − (α1 +ei +e j )α3 α2 ···αn α1 (α3 +et )(α2 +e s )···αn +(α1 +ei )(α3 +et )α2 ···αn (α1 +e j )α3 (α2 +e s )···αn − (α1 +ei )α3 (α2 +e s )···αn (α1 +e j )(α3 +et )α2 ···αn = 0.
(3.6)
Since is blockwise symmetric, (3.6) can be rewritten as the following form:
α1 α2 α3 ···αn (α1 +ei +e j )(α2 +e s )(α3 +et )···αn − (α1 +ei +e j )α2 α3 ···αn α1 (α2 +e s )(α3 +et )···αn +(α1 +ei )α2 (α3 +et )···αn (α1 +e j )(α2 +e s )α3 ···αn − (α1 +ei )(α2 +e s )α3 ···αn (α1 +e j )α2 (α3 +et )···αn = 0.
(3.7)
6
Z. Fu et al. / Information and Computation 264 (2019) 1–11
Note that the first, second terms of (3.5) are equal to the first, second terms of (3.7) respectively. But the third term of (3.5) is equal to the fourth term of (3.7) and the fourth term of (3.5) is equal to the third term of (3.7). Thus by adding (3.5) to (3.7), the third, fourth terms cancel and we have
α1 α2 α3 ···αn (α1 +ei +e j )(α2 +e s )(α3 +et )···αn − (α1 +ei +e j )α2 α3 ···αn α1 (α2 +e s )(α3 +et )···αn = 0.
(3.8) implies that the determinant of the matrix
2
proof.
α1 α2 α3 ···αn (α1 +e i +e j )α2 α3 ···αn
α1 (α2 +e s )(α3 +et )···αn (α1 +e i +e j )(α2 +e s )(α3 +et )···αn
(3.8) is zero. This finishes the
By (3.8), we have the following corollary. Corollary 1. For a blockwise symmetric matchgate signature = (α1 α2 ···αn ) and any 1 ≤ s , t ≤ ,
α1 α2 α3 ···αn
and
(α1 +e i +e j )α2 α3 ···αn
α1 α2 · · · αn ∈ {0, 1}n and 1 ≤ i < j ≤ ,
α1 (α2 +e s )(α3 +et )···αn
(α1 +e i +e j )(α2 +e s )(α3 +et )···αn
are linearly dependent. Lemma 3.4. Let = (α1 α2 ···αn ) be a blockwise symmetric matchgate signature of arity n, where n ≥ 3. Then for any α1 α2 · · · αn ∈ {0, 1}n ,
B=
α1 α2 α3 ···αn
(α1 +e i +e j )α2 α3 ···αn
α1 (α2 +e s +et )α3 ···αn
(α1 +e i +e j )(α2 +e s +et )α3 ···αn
,
is degenerate, where e i , e j , e s , et ∈ {0, 1} and i < j, s < t. Proof. We prove that det( B ) = 0, i.e.,
α1 α2 α3 ···αn (α1 +ei +e j )(α2 +e s +et )α3 ···αn − (α1 +ei +e j )α2 α3 ···αn α1 (α2 +e s +et )α3 ···αn = 0. For a contradiction, we assume instead det( B ) = 0. Firstly, we claim that
(α1 +e j )(α3 +eu )(α2 +e s +et )···αn = (α1 +ei )α2 (α3 +e v )···αn = 0 for any 1 ≤ u , v ≤ . If there is u such that
(α1 +e j )(α3 +eu )(α2 +e s +et )···αn = 0, then (α2 +e s +et )(α1 +e j )(α3 +e u )···αn = 0 since is blockwise symmetric. Thus
α2 (α1 +e j )(α3 +e u )···αn
(3.9)
(α2 +e s +et )(α1 +e j )(α3 +e u )···αn
is not a zero vector. Since
α2 α1 α3 ···αn
and
(α2 +e s +et )α1 α3 ···αn
α2 (α1 +e i +e j )α3 ···αn
(α2 +e s +et )(α1 +e j )(α3 +e u )···αn
and
(α2 +e s +et )(α1 +e i +e j )α3 ···αn
α2 (α1 +e j )(α3 +e u )···αn
,
α2 (α1 +e j )(α3 +e u )···αn
(α2 +e s +et )(α1 +e j )(α3 +e u )···αn
are linearly dependent respectively by Corollary 1 and the nonzero vector in (3.9) appears as the second vector in both cases. Thus
α2 α1 α3 ···αn
(α2 +e s +et )α1 α3 ···αn
and
α2 (α1 +e i +e j )α3 ···αn
(α2 +e s +et )(α1 +e i +e j )α3 ···αn
are linearly dependent. This contradicts that det( B ) = 0. Thus (α1 +e j )(α3 +e u )(α2 +e s +et )···αn = 0 for any 1 ≤ u ≤ . By replacing α2 + e s + et with α2 , replacing α1 + e j with α1 + e i and replacing α3 + e u with α3 + e v respectively, we can prove that (α1 +ei )(α3 +e v )α2 ···αn = 0 for any 1 ≤ v ≤ in the same way. Thus (α1 +ei )α2 (α3 +e v )···αn = 0 for any 1 ≤ v ≤ , i.e., we have
(α1 +e j )(α3 +eu )(α2 +e s +et )···αn = (α1 +ei )α2 (α3 +e v )···αn = 0 for any 1 ≤ u , v ≤ . This finishes the proof of the claim. Now we apply MGI again. Let the pattern be (α1 + e i )α2 α3 α4 · · · αn and the position vector be (e i + e j )(α2 + α3 )(α2 + α3 + e s + et )0 · · · 0 and S = {k|the k-th bit of α2 + α3 is 1}, T = {k|the k-th bit of α2 + α3 + e s + et is 1}, then by MGI we have
Z. Fu et al. / Information and Computation 264 (2019) 1–11
7
Fig. 1. The four nodes at the corner are external nodes and the other two nodes are internal nodes. The middle edge has weight −1 and all other edges have weight 1.
α1 α2 α3 ···αn (α1 +ei +e j )α3 (α2 +e s +et )···αn − (α1 +ei +e j )α2 α3 ···αn α1 α3 (α2 +e s +et )···αn + (±(α1 +ei )(α2 +eu )α3 ···αn (α1 +e j )(α3 +eu )(α2 +e s +et )···αn )
(3.10)
u∈ S
+
(α1 +e i )α2 (α3 +e v )···αn (α1 +e j )α3 (α2 +e s +et +e v )···αn
(±
) = 0.
v ∈T
Since (α1 +e j )(α3 +e u )(α2 +e s +et )···αn = (α1 +e i )α2 (α3 +e v )···αn = 0 for all 1 ≤ u , v ≤ , we have
α1 α2 α3 ···αn (α1 +ei +e j )α3 (α2 +e s +et )···αn − (α1 +ei +e j )α2 α3 ···αn α1 α3 (α2 +e s +et )···αn = 0
(3.11)
by (3.10). Since is blockwise symmetric, we have
α1 α2 α3 ···αn (α1 +ei +e j )(α2 +e s +et )α3 ···αn − (α1 +ei +e j )α2 α3 ···αn α1 (α2 +e s +et )α3 ···αn = 0 by (3.11), i.e., under the assumption that B is non-degenerate, we get det( B ) = 0. This is a contradiction.
2
Theorem 3.5. If = (α1 α2 ···αn ) is a blockwise symmetric matchgate signature of arity n, where n ≥ 3, then rank( M ()) ≤ 2. Proof. If rank( M ()) ≥ 3, by Lemma 3.2, then there is a full rank submatrix of M () of the following form
A=
α1 α2 α3 ···αn
(α1 +e i +e j )α2 α3 ···αn
α1 (α2 +e s )(α3 +et )···αn
(α1 +e i +e j )(α2 +e s )(α3 +et )···αn
or
B=
α1 α2 α3 ···αn
(α1 +e i +e j )α2 α3 ···αn
α1 (α2 +e s +et )α3 ···αn
(α1 +e i +e j )(α2 +e s +et )α3 ···αn
,
where e i , e j , e s , et ∈ {0, 1} and i < j and s < t. But by Lemma 3.3 and Lemma 3.4, we know both A and B are degenerate. This is a contradiction. 2 Now we are ready to prove Theorem 1.2. Proof. Let M (=n ) be the matrix form of the Equality function (=n ). Note that M (=n ) is a q × qn−1 matrix and rank( M (=n )) = q. For any q × 2 matrix with rank q, let = (=n ) M ⊗n , then is blockwise symmetric by Lemma 2.6 and M () = M T ( M (=n ) M ⊗n−1 by Lemma 2.7. Since rank( M (=n )) = q ≥ 3, rank( M T ) = q and rank( M ⊗n−1 ) = q(n−1) . We have
rank( M ()) ≥ 3 by Lemma 2.5. If is realized by a matchgate, i.e., is a matchgate signature, then by Theorem 3.5, rank( M ()) ≤ 2. This is a contradiction. 2 We remark that the condition n ≥ 3 is necessary in Theorem 3.5. For example, let = (α1 α2 ), where α1 , α2 ∈ {0, 1}2 , with 0000 = 0101 = 1010 = 1, 1111 = −1 and all other entries are zero. Note that is blockwise symmetric and is realized by the matchgate in Fig. 1. But rank( M ()) = 4. Theorem 1.2 implies that the Equalities functions (=n ) on the domain [q], where n ≥ 3, q ≥ 3, cannot be realized by matchgates under holographic transformation in (2.2). Thus there is no polynomial time algorithms for #CSP(F ) over planar graphs by transforming all signatures in F together with all Equalities to matchgate signatures and then apply the FKT algorithm, which is a universal strategy for #CSP(F ) over Boolean domain by Theorem 1.1. 4. The structure of blockwise symmetric matchgate signatures For an n-bit string
α ∈ {0, 1}n , we define p (α ) = 0 if wt(α ) is even and p (α ) = 1 if wt(α ) is odd.
8
Z. Fu et al. / Information and Computation 264 (2019) 1–11
Definition 4.1. For an even (resp. odd) matchgate with arity n, the condensed signature ( g α ) of is a vector of dimen¯
sion 2n−1 , and g α = αb (resp. g α = αb ), where by the matchgate .
α ∈ {0, 1}n−1 and b = p (α ), and we say the condensed signature g realized
In this section, we will prove the following theorem that characterizes the structure of blockwise symmetric matchgate signatures. Theorem 4.2. Let = (α1 α2 ···αn ) be a blockwise symmetric signature with arity n, where n ≥ 3. If is realized by a matchgate, then there exists a condensed signature ( g α )α ∈{0,1} that is realized by a matchgate with arity + 1, and a bitwise symmetric matchgate signature S that is realized by a matchgate with arity n such that
α1 α2 ···αn = g α1 g α2 · · · g αn S
p (α1 ) p (α2 )··· p (αn )
(4.12)
.
In [8], the following similar theorem was given. Theorem 4.3. Let = (α1 α2 ···αn ) be a blockwise symmetric signature with arity n, where n ≥ 4. If is realized by an even matchgate (resp. odd matchgate) and 00···0 = 0 (resp. e1 0···0 = 0), then there exists a condensed signature ( g α )α ∈{0,1} that is realized by a matchgate with arity + 1, and a bitwise symmetric matchgate signature S that is realized by a matchgate with arity n such that
α1 α2 ···αn = g α1 g α2 · · · g αn S
p (α1 ) p (α2 )··· p (αn )
.
Note that we improve Theorem 4.3 by removing the non-vanishing condition 00···0 = 0 (or e1 0···0 = 0), and improving n ≥ 4 to n ≥ 3. Moreover, the counterexample given by Fig. 1 in the end of Section 3 shows that the condition n ≥ 3 is necessary. For a blockwise symmetric matchgate signature = (α1 α2 ···αn ) with arity n, we have rank( M ()) = 0, 1 or 2 by Theorem 3.5. If rank( M ()) = 0, the proof is trivial. In the following, we prove Theorem 4.2 for rank( M ()) = 2. The proof for rank( M ()) = 1 is in Appendix.
Proof. By Lemma 3.1, M () has a full rank submatrix of the following form
θ γ2 ···γn 0
0 η(γ2 +et )···γn
or
0 θ γ2 ···γn η(γ2 +et )···γn 0
,
where θ, η, γ j ∈ {0, 1} for 2 ≤ j ≤ n and θ + η = e s , where e s , et ∈ {0, 1} . Note that p (θ) = p (η). Without loss of generality, we assume that p (θ) = 0 and p (η) = 1 in the following. Note that the rows M ()θ and M ()η are linearly independent. Then by rank( M ()) = 2, all the rows of M () are linear combinations of M ()θ and M ()η . Moreover, for any αi , α j ∈ {0, 1} , by the parity condition of , if p (αi ) = p (α j ), the nonzero entries of M ()αi and M ()α j are in disjoint column positions. So M ()αi and M ()α j are orthogonal. Thus for any α ∈ {0, 1} there exists g α such that M ()α = g α M ()θ if p (α ) = p (θ), and M ()α = g α M ()η if p (α ) = p (η). Up to a global nonzero scalar, we can assume that θ γ2 ···γn = 1 and η(γ2 +et )···γn = r, then for any α ∈ {0, 1} , g α = αγ 2 ···γn if p (α ) = p (θ), and g α = r −1 α (γ2 +et )···γn if p (α ) = p (η). Moreover, we define the n-ary signature S such that j j 2 ··· jn
S1
= α1 α2 ···αn ,
where αi ∈ {θ, η} and j i = p (αi ). Now for any α1 α2 · · · αn ∈ {0, 1}n , we prove (4.12) by induction on t, the number of αi from {α1 , α2 , · · · , αn } that do not j j ··· j belong to {θ, η}. Note that g θ = g η = 1. If all αi belong to {θ, η}, i.e., t = 0, we are done by the definition of S1 2 n and (4.12) is proved. Inductively we assume that (4.12) has been proved for t − 1 and there are t ≥ 1 blocks in {α1 , α2 , . . . , αn } that do not belong to {θ, η}. Then we pick one αi that do not belong to {θ, η}. If αi has the same parity as θ , then the αi -th row M ()αi = g αi M ()θ in
⎛ ···
··· ··· θ α1 ···αi −1 αi +1 ···αn ··· M () = ⎝ ··· ··· αi α1 ···αi −1 αi +1 ···αn ··· ···
··· ⎞ ··· ··· ⎠ . ··· ···
Thus
α1 α2 ···αn = αi α1 ···αi−1 αi+1 ···αn = g αi θ α1 ···αi−1 αi+1 ···αn .
(4.13)
Note that the number of blocks from {θ, α1 , · · · , αi −1 , αi +1 , · · · , αn } that do not belong to {θ, η} is t − 1. Thus we have
θ α1 ···αi−1 αi+1 ···αn = g α1 · · · g αi−1 g αi+1 · · · g αn S
p (θ ) p (α1 )··· p (αi −1 ) p (αi +1 )··· p (αn ) p (α1 ) p (α2 )··· p (αn )
= g α1 · · · g αi−1 g αi+1 · · · g αn S
(4.14)
Z. Fu et al. / Information and Computation 264 (2019) 1–11
9
Fig. 2. The matchgate realizing the condensed signature g. The dash lines and hollow circles exist or not depends on whether the corresponding bit of θ γ2 · · · γn is 1 or 0. If the t-th bit of γ2 is 0, we put the weight r −1 to the edge between v 1 and v 2 . Otherwise, we put the weight r −1 to the edge between v 2 and v 3 .
Fig. 3. The matchgate realizing S . The dash lines and hollow circles exist or not depends on whether the corresponding bit of θ is 1 or 0.
by induction, where the second equation is due to p (θ) = p (αi ) and S is bitwise symmetric. Then by (4.13) and (4.14), we have
α1 α2 ···αn = g α1 g α2 · · · g αn S
p (α1 ) p (α2 )··· p (αn )
.
If p (αi ) = p (η), the proof is similar and we omit it here. Now we finish the proof by proving that g is a condensed signature and S is a matchgate signature. Note that g = ( g α ) is the condensed signature of the matchgate in Fig. 2, which is constructed in the following way: Let G be a matchgate that realizes = (α1 α2 ···αn ). Note that G has n external nodes and we group the external nodes into n blocks of consecutive nodes each. Firstly, we connect a path L of length 2 to the ( + t )-th external node, i.e., the t-th node of the second block, of G. We denote the ( + t )-th external node of G, i.e., one endpoint of L, as v 1 , another endpoint of L as v 3 and the middle node of L as v 2 . If the ( + t )-th bit of θ γ2 · · · γn is 0, we give the edge between v 1 and v 2 weight r −1 and the edge between v 2 and v 3 weight 1. If the ( + t )-th bit of θ γ2 · · · γn is 1, we give the edge between v 1 and v 2 weight 1 and the edge between v 2 and v 3 weight r −1 , and view v 3 as an external node and v 1 , v 2 as internal nodes. We do nothing to the external nodes in the first block and still view them as external nodes. We view other external nodes, i.e., the external nodes that are not in the first block and not the ( + t )-th external node, as internal node and do the following operations to them: for + 1 ≤ i ≤ n and i = + t, if the i-th bit of θ γ2 · · · γn is 0, do nothing to G; if the i-th bit of θ γ2 · · · γn is 1, connect an edge with weight 1 to the i-th external node of G and view the new nodes as internal nodes. Then we get a new matchgate G with arity + 1 and g is the condensed signature of G (see the matchgate in Fig. 2). Now we construct the matchgate realizing S in Fig. 3. For every block of G, for 1 ≤ i ≤ , if the i-th bit of θ is 1 then we add an edge of weight 1 to the i-th external node, and the new node replaces it as an external node. If the i-th bit of θ is 0 then we do nothing to it. We get a new matchgate H . Note that all the bits of θ, η are the same except the s-th bit. Next, we define H from H : In each block of external nodes of H , we pick only the s-th external node as an external node j j ··· j of H ; all others are considered internal nodes of H . We denote the matchgate signature of H by S . Then S = ( S1 2 n ) j j 2 ··· jn
is a signature of arity n and S1
= α1 α2 ···αn , where αi ∈ {θ, η} and j i = p (αi ) (see the matchgate in Fig. 3). 2
Acknowledgments We thank the anonymous reviewers. We benefited greatly from their suggestions and ideas. The work described in this paper was supported by National Natural Science Foundation of China (Grant No. 61872076). Appendix A In this section, we prove Theorem 4.2 for rank( M ()) = 1. The next lemma shows that if rank( M ()) = 1, then for all nonzero entries, the indices of all blocks’ have the same parity. Lemma A.1. If rank( M ()) = 1 and there exist p (αi ) = p (β j ) for 1 ≤ i , j ≤ n.
α1 α2 · · · αn , β1 β2 · · · βn ∈ {0, 1}n such that α1 α2 ···αn = 0, β1 β2 ···βn = 0, then
Proof. Note that p (α1 α2 · · · αn ) = p (β1 β2 · · · βn ) by the parity condition of matchgate signatures. If there exist i , j such that p (αi ) = p (β j ), then
p (α1 · · · αi −1 αi +1 · · · αn ) = p (β1 · · · β j −1 β j +1 · · · βn ).
10
Z. Fu et al. / Information and Computation 264 (2019) 1–11
Fig. 4. The left node is the external node and the other node is the internal node. The edge has weight λ.
Thus there are two columns in
α α ···α α ···α i 1 i −1 i +1 n , 0
or
M ()αi M ()β j
of the following form:
0
β j β1 ···β j−1 β j+1 ···βn
β α ···β β ···β j 1 j −1 j +1 n , α α ··· α α ··· α n 1 i i − 1 i + 1 0 0
that are linearly independent. This implies that M () has a submatrix of rank 2. It contradicts the fact that rank( M ()) = 1. 2 Now we prove Theorem 4.2 for the case that rank( M ()) = 1. Proof. Since rank( M ()) = 1, there exists β1 β2 · · · βn ∈ {0, 1}n such that β1 β2 ···βn = 0. Thus p (β1 ) = p (β2 ) = · · · = p (βn ) by Lemma A.1. Without loss of generality, we assume that p (β1 ) = 0. After a global factor, we can assume that β1 β2 ···βn = 1. By β1 β2 ···βn = 0 we have the row M ()β1 = 0. Thus for any αi ∈ {0, 1} , there exists g αi such that M ()αi = g αi M ()β1 by rank( M (√ )) = 1. Note that g α = α β2 ···βn for any α ∈ {0, 1} . Moreover, if p (α ) = p (β1 ), then g α = 0 by Lemma A.1. n Let λ = β1 β1 ···β1 and S = (λ, 0)⊗n . Then for any α1 α2 · · · αn ∈ {0, 1}n , if there exists i ∈ [n] such that p (αi ) = 0, then α α ··· α n 1 2 = 0 by Lemma A.1 and we have
α1 α2 ···αn = g α1 g α2 · · · g α2 S
p (α1 ) p (α2 )··· p (αn )
= 0.
If p (α1 ) = p (α2 ) = · · · = p (αn ) = 0, we have
α1 α2 ···αn = g α1 β1 α2 ···αn = g α1 α2 β1 ···αn = g α1 g α2 β1 β1 ···αn = · · · = g α1 g α2 · · · g αn β1 β1 ···β1 ,
(A.15)
i.e., we have
α1 α2 ···αn = g α1 g α2 · · · g αn S
p (α1 ) p (α2 )··· p (αn )
.
In (A.15), the second equation is due to the blockwise symmetry of . Note that S is realized by n copies of the matchgate in Fig. 4. Let g = ( g α ). In the following we prove that g = ( g α ) is a condensed signature and then we finish the proof. Assume that = (α1 α2 ···αn ) is realized by the matchgate G with arity n. Note that G has n external nodes and we group the external nodes into n blocks of consecutive nodes each. We do nothing to the first block of G. For the i-th block, where 2 ≤ i ≤ n, if the j-th bit of βi is 0, do nothing to G; if the j-th bit of βi is 1, connect an edge with weight 1 to the j-th external node of the i-th block of G and take the new vertex as external node. Then we get a new matchgate G . For G , view the external nodes of the first block and the first external node of the second block as external nodes and all other nodes as internal nodes, then we get a new matchgate G
with arity + 1. Recall that g α = α β2 ···βn . Thus g is the condensed signature of G
. 2 References [1] Jin-Yi Cai, Zhiguo Fu, A collapse theorem for holographic algorithms with matchgates on domain size at most 4, Inf. Comput. 239 (2014) 149–169. [2] Jin-Yi Cai, Zhiguo Fu, Holographic algorithm with matchgates is universal for planar #CSP over Boolean domain, in: STOC 2017, 2017, pp. 842–855. [3] Jin-Yi Cai, Zhiguo Fu, Heng Guo, Tyson Williams, A Holant dichotomy: is the FKT algorithm universal?, in: FOCS 2015, 2015, pp. 1259–1276. The full version is available at arXiv:1505.02993. [4] Jin-Yi Cai, Aaron Gorenstein, Matchgates revisited, Theory Comput. 10 (2014) 167–197. [5] Jin-Yi Cai, Heng Guo, Tyson Williams, A complete dichotomy rises from the capture of vanishing signatures, SIAM J. Comput. 45 (5) (2016) 1671–1728. [6] Jin-Yi Cai, Pinyan Lu, Holographic algorithms: from art to science, in: STOC 2007, 2007, pp. 401–410. [7] Jin-yi Cai, Pinyan Lu, Holographic algorithms: the power of dimensionality resolved, Theor. Comput. Sci. 410 (18) (2009) 1618–1628. [8] Jin-Yi Cai, Pinyan Lu, On blockwise symmetric signatures for matchgates, Theor. Comput. Sci. 411 (2010) 739–750. [9] Jin-Yi Cai, Pinyan Lu, Mingji Xia, Holant problems and counting CSP, in: STOC 2009, 2009, pp. 715–724. [10] Jin-Yi Cai, Pinyan Lu, Mingji Xia, Holographic algorithms with matchgates capture precisely tractable planar #CSP, SIAM J. Comput. 46 (3) (2017) 853–889. [11] Sitan Chen, Basis collapse for holographic algorithms over all domain sizes, in: STOC 2016, 2016, pp. 776–789. [12] Heng Guo, Sangxia Huang, Pinyan Lu, Mingji Xia, The complexity of weighted Boolean #CSP modulo k, in: STACS 2011, 2011, pp. 249–260. [13] Heng Guo, Tyson Williams, The complexity of planar Boolean #CSP with complex weights, in: ICALP (1) 2013, 2013, pp. 516–527. [14] Heng Guo, Pinyan Lu, Leslie G. Valiant, The complexity of symmetric Boolean parity Holant problems, SIAM J. Comput. 42 (1) (2013) 324–356. [15] Sangxia Huang, Pinyan Lu, A dichotomy for real weighted Holant problems, Comput. Complex. 25 (1) (2016) 255–304.
Z. Fu et al. / Information and Computation 264 (2019) 1–11
[16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27]
11
P.W. Kasteleyn, The statistics of dimers on a lattice, Physica 27 (1961) 1209–1225. P.W. Kasteleyn, Graph theory and crystal physics, in: F. Harary (Ed.), Graph Theory and Theoretical Physics, Academic Press, London, 1967, pp. 43–110. J.M. Landsberg, Jason Morton, Serguei Norine, Holographic algorithms without matchgates, CoRR, arXiv:0904.0471, 2009. H.N.V. Temperley, M.E. Fisher, Dimer problem in statistical mechanics – an exact result, Philos. Mag. 6 (1961) 1061–1063. Leslie G. Valiant, The complexity of enumeration and reliability problems, SIAM J. Comput. 8 (3) (1979) 410–421. Leslie G. Valiant, Quantum circuits that can be simulated classically in polynomial time, SIAM J. Comput. 31 (4) (2002) 1229–1254. Leslie G. Valiant, Expressiveness of matchgates, Theor. Comput. Sci. 289 (1) (2002) 457–471. Leslie G. Valiant, Accidental algorithms, in: Proc. 47th Annual IEEE Symposium on Foundations of Computer Science, Oct. 22–24, Berkeley, CA, IEEE Press, 2006, pp. 509–517. Leslie G. Valiant, Holographic algorithms, SIAM J. Comput. 37 (5) (2008) 1565–1594. A preliminary version appeared in: FOCS 2004, 2004, pp. 306–315. Leslie G. Valiant, The complexity of computing the permanent, Theor. Comput. Sci. 8 (1979) 189–201. L.G. Valiant, Some observations on holographic algorithms, in: Proc. 9th Latin American Theoretical Informatics Symposium, LATIN 2010, in: LNCS, vol. 6034, Springer-Verlag, 2010, pp. 577–590. Mingji Xia, Base collapse of holographic algorithms, in: STOC 2016, 2016, pp. 790–799.