Eulerian Orientations and Hadamard Codes:
A Novel Connection via Counting
Abstract
We discover a novel connection between two classical mathematical notions, Eulerian orientations and Hadamard codes by studying the counting problem of Eulerian orientations (#EO) with local constraint functions imposed on vertices. We present two special classes of constraint functions and a chain reaction algorithm, and show that the #EO problem defined by each class alone is polynomial-time solvable by the algorithm. These tractable classes of functions are defined inductively, and quite remarkably the base level of these classes is characterized perfectly by the well-known Hadamard code. Thus, we establish a novel connection between counting Eulerian orientations and coding theory. We also prove a #P-hardness result for the #EO problem when constraint functions from the two tractable classes appear together.
Keywords and phrases:
Eulerian orientations, Hadamard codes, Counting problems, Tractable classesCopyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Mathematics of computing Graph theoryAcknowledgements:
The first author wants to thank Jin-Yi Cai and Zhiguo Fu for many valuable discussions. The authors want to thank anonymous reviewers for their helpful comments.Funding:
Supported by the Innovation Program for Quantum Science and Technology, 2021ZD0302901.Editors:
Raghu MekaSeries and Publisher:

1 Introduction
The notion of Eulerian orientations arises from the historically notable Seven Bridges of Königsberg problem, whose solution by Euler in 1736 [14] is considered to be the first result of graph theory. Given an undirected graph , an Eulerian orientation of is an assignment of a direction to each edge of such that at each vertex , the number of incoming edges is equal to the number of outgoing edges. A connected graph has an Eulerian orientation, called an Eulerian graph if and only if every vertex has even degree. This is the well-known Euler’s theorem, whose first complete proof was given back in the 1800s [3]. In terms of computational complexity, Euler’s theorem implies that the decision problem of Eulerian orientations of a graph is polynomial-time solvable (tractable). While for the counting problem, Mihail and Winkler showed that counting the number of Eulerian orientations of an undirected graph is #P-complete in 1996 [18], more than one hundred years later after Euler’s theorem. However, the counting problem becomes tractable when certain particular restrictions are imposed on edges. An intriguing example of such tractable problems comes from computing the partition function of the six-vertex model [19, 22, 20], one of the most intensively studied models in statistical physics. In this example, the graphs are 4 regular graphs and on each vertex exactly one edge incident to it is restricted to take the direction coming into the vertex. Then counting the number of Eulerian orientations obeying restrictions on these edges is proved to be tractable [7].
In this paper, we further study the counting restricted Eulerian orientations (#EO) problem, defined by constraint functions placed at each vertex that represent restrictions on edges incident to the vertex. We consider for which class of constraint functions, the #EO problem is tractable. Before we formally define the problem and describe our results, we first take a detour to another classical notion in coding theory, the Hadamard code. The Hadamard code is an error-correcting code used for error detection and correction when transmitting messages over very noisy or unreliable channels. Because of its plentiful mathematical properties, the Hadamard code is not only used in coding and communication, but also intensely studied in various areas of mathematics and theoretical computer science. However, it is not known how the Hadamard code can be related to Eulerian orientations, and particularly, how it can be used to carve out tractable classes for the #EO problem. Quite surprisingly, in this paper, we establish a novel connection between these two well-studied mathematical notions. We present new tractable classes for the #EO problem and a corresponding algorithm based on a chain reaction. These classes are defined inductively and the base levels of them, defined as kernels are characterized perfectly by the Hadamard code (or more precisely, the balanced Hadamard code).
Now we formally define the #EO problem. A 0-1 valued constraint function (or a signature) of arity is a map . The support of is . A signature of arity is an Eulerian orientation (EO) signature if for every , wt. The problem #EO() specified by a set of EO signatures is defined as follows. The input is a graph where each vertex of is associated with some function from . The incident edges to are totally ordered and correspond to input variables to . Each edge has two ends, and an orientation of the edge is denoted by assigning 0 to the head and 1 to the tail. Thus, locally at every vertex , a represents an incoming edge and a represents an outgoing edge. An Eulerian orientation corresponds to an assignment to each edge ( or ) where the numbers of 0’s and 1’s at each are equal. Then, the local constraint function takes value if the restriction imposed by are satisfied by the local assignment on edges incident to . Otherwise, . Since every is an EO signature, it takes value only if the numbers of input 0’s and 1’s are equal. Thus, only Eulerian orientations can contribute value . An Eulerian orientation contributes value if for every vertex . The #EO problem outputs the number of Eulerian orientations contributing value .
Example 1.
Let where . Then #EO counts the total number of all Eulerian orientations of the input graph, which is #P-hard.
Example 2.
Let be a signature of arity with support . Then, #EO computes the partition function of a six-vertex model which is tractable. The reason for naming this function will be explained in Section 4.
The #EO problem has an intrinsic significance in counting problems. In [5], the framework of #EO problems is formally introduced and is showed to be expressive enough to encompass all Boolean counting constraint satisfaction problems (#CSP) [12, 13, 4, 10] with arbitrary constraint functions that are not necessarily supported on half weighted inputs, although the #EO problem itself requires all constraint functions to be supported on half weighted inputs. Also, the #EO problem encompasses many natural problems from statistical physics and combinatorics, such as the partition function of the six-vertex model and the evaluation of the Tutte polynomial at the point [15]. Cai, Fu and Xia proved a complexity classification of the partition function of the six-vertex model on general 4-regular graphs [7].
Besides these interesting concrete problems expressible as #EO problems, the study of the #EO framework plays a crucial role in a broader picture, the complexity classification program for a much more expressive counting framework, the Holant problem. Significant progress has been made in the complexity classification of Holant problems [9, 8, 1, 11, 2, 16, 6], and a full complexity dichotomy for all real-valued Holant problems is achieved [21]. This dichotomy is crucially based on a complexity dichotomy for the #EO problem [5] with complex-valued signatures assuming a physical symmetry called arrow reversal symmetry (ARS) since under a suitable holographic transformation, the ARS property corresponds to precisely real-valued signatures. In this paper, we consider the 0-1 valued #EO problem without assuming ARS, which may serve as a building block for the ultimate classification for all complex-valued Holant problems. For this problem, we give new tractable classes that are not covered by all the previously known tractable classes for Holant problems.
We use to denote the arity of , and to denote the indices of variables of . We use and to denote the unary signatures where and respectively. Pinning the -th variable of to gives the signature of arity , denoted by . Similarly, we define . Let and be two signatures of support size and respectively. Suppose and . Then the tensor product of and is the signature where . Note that when we take a tensor product of the functions, the variables need not be in the same order of the product. A nonzero signature is a factor of , denoted by , if there is a signature such that or there is a constant such that . Otherwise, is not factor of , denoted by . In the following, we first state the definition of affine signatures, which are known to be tractable for the #EO problem. Then we give the new tractable classes.
Definition 3 (Affine).
A signature of arity is affine, denoted by if , where and is a matrix over . Note that when , is called a zero signature.
Definition 4 (-affine and -affine).
An EO signature is -affine, denoted by if for some where for every , . Symmetrically, an EO signature is -affine, denoted by if for some where for every , .
For example, the 4-ary signature in Example 2 is an -affine signature. Note that (or ) does not encompass , since an affine signature may not have a (or ) factor. Thus, our tractable classes are and , rather than and .
Theorem 5.
#EO() and #EO() are tractable.
The tractability result is established via a chain reaction algorithm, in which the presence of a or signature plays a role similar to a neutron in a nuclear chain reaction which initializes the reaction and generates a new neutron (a or signature respectively) by propagation which makes the chain reaction continue. Eventually, the chain reaction terminates when a stable state (a tractable instance of ) is reached.
Although the reaction algorithm works for -affine signatures or -affine signatures alone, it does not work when both of them appear. This is because when both -affine signatures and -affine signatures appear, by connecting and using , both of them are killed by each other and no new or are generated. Thus, the chain reaction is unsustainable. This is somewhat similar to the phenomenon of electron–positron annihilation in nuclear physics. In fact, we can show that the #EO problem is #P-hard when they both appear.
Theorem 6.
#EO() is #P-hard.
Since the classes and are defined inductively, it is not an easy task to get explicit expressions for them in a form similar to other known tractable classes for counting problems such as affine signatures. Note that the tractability of or is obtained by eventually reducing the problem into a problem where all signatures are affine signatures. Thus, we focus on -affine (or -affine) signatures from which by pinning an arbitrary variable to (or respectively), we always get an affine signature. In other words, these -affine (or -affine) signatures are at the first level of the inductive hierarchy. We define them as kernels.
Definition 7 (-affine and -affine kernel).
An EO signature is a -affine kernel, denoted by if it satisfies the following two properties:
-
1.
, for some where is a signature of positive arity, and ;
-
2.
for every , .
Symmetrically, we define -affine kernels denoted by by switching and everywhere. Notice that implies . Thus, -affine and -affine kernels are not affine.
A main technical contribution of the paper is a complete characterization of -affine and -affine kernels using the Hadamard code. The Hadamard code refers to the code based on Sylvester’s construction of Hadamard matrices. A Hadamard matrix is a square matrix of size such that all its entries are in and . Sylvester’s construction gives Hadamard matrices of size for all , where and . The Hadamard code derived from the Hadamard matrices by Sylvester’s construction is a code over the binary alphabet of which the codewords are rows of where the entry of is mapped to and the entry is mapped to . Symmetrically, we can also get the Hadamard code by mapping the entry to and to . Note that contains an all- codeword and contains an all- codeword. We call the former the 1-Hadamard code and the latter the 0-Hadamard code. In standard coding theory notation for block codes, and are -code, which is a binary linear code having block length , message length , and minimum Hamming distance . By removing the all- codeword from , we get a balanced code, i.e., each codeword has Hamming weight , half of its block length. We call it the balanced 1-Hadamard code, denoted by . Symmetrically, we can get the balanced 0-Hadamard code, denoted by . A binary code of block length can be viewed equivalently as a 0-1 valued constraint function of arity by taking the support to be . An -multiple of the code is a code of block length , each codeword of which is obtained from a codeword of by taking the concatenation of copies of .
Theorem 8.
An EO signature is a -affine kernel if and only if is an -multiple of a balanced 1-Hadamard code for some and , or and .
A symmetric statement holds for the -affine kernel by switching and everywhere.
Due to the existence of newly discovered non-trivial tractable classes corresponding to the Hadamard code in the #EO problem without assuming ARS, the complexity classification for the complex-valued Holant problem is much more challenging. It’s hard to imagine how many more tractable classes with remarkable properties are yet to be discovered. The results in this paper are a tiny step towards an ambitious goal. Very recently, independent of this work, Meng, Wang and Xia discover new larger tractable classes for the #EO problem [17]. In addition, we note that the presented result in this paper is not the first time that a tractable class for counting problems is found to be related to coding theory. Even in the classification of real-valued Holant problems, a tractable family called local affine [11] was already discovered using the well-known Hamming code. Are there other interesting tractable classes for counting problems that can be carved out with the help of coding theory? In the other direction, it is also worth pursuing whether these new tractability results for counting problems can be applied back to coding theory? We leave the questions in both directions for further study.
The paper is organized as follows. In Section 2, we give some definitions and notations. In Section 3, we give a chain reaction algorithm which establishes the tractability result (Theorem 5) for -affine and -affine signatures. In Section 4, we prove the characterization theorem (Theorem 8) for -affine and -affine kernels. In Section 5, we prove the hardness result Theorem 6. In fact, the proof of the hardness result highly depends on the characterization of -affine and -affine kernels. Omitted proofs can be founded in the full version.
2 Preliminaries
A 0-1 valued signature is determined by its support . In the paper, we use and interchangeably. We can also view as a binary code of block length where each is a codeword. We say (or equivalently ) has a constant Hamming weight if for every . For simplicity, we say is -weighted or constant-weighted in general. The following fact can be easily checked. Any factor of a constant-weighted signature is still constant-weighted. If a vertex in a graph is labeled by a signature , we can replace the vertex by two vertices and and label with the factor and with , respectively. The incident edges of become incident edges of and respectively according to the partition of variables of in the tensor product of and . This does not affect the evaluation of the instance. We represent or by a matrix which lists all vectors in by its rows. All matrices that are equal up to a permutation of rows and columns represent the same signature. Normally, the columns indexing variables are ordered from the smallest index to the largest, and are omitted for convenience when the context is clear. For example, the signature can be written as .
For , we use and to denote the number of s and s respectively in the -th column of . The complement of a signature , denoted by is the signature with the support where is the standard complement of , i.e., . Let . Then, . Similarly, let . Then . We use to denote the binary disequality signature . Connecting with the -th variable of using is equivalent to pinning the -th variable of to , which gives the signature . Extracting the -th variable of to gives the signature of arity , denoted by . Clearly . Similarly we define and . We use to denote the signature for distinct and any . The signature is defined to be which can be obtained by connecting the -th and -th variables of using . For a signature , we define its -multiple, denoted by to be the signature where is obtained from by taking the concatenation of copies of .
Now we give some basic properties of affine signatures. Equivalently, is affine if and only if it satisfies the property that for any , . One can also check that affine signatures are closed under pinning, extracting, tensor product and factoring. Also, if and only if for any .
Lemma 9.
If a signature is constant-weighted and , then for any . Moreover, is an EO signature.
Definition 10 (Pairwise opposite).
Let be a signature of arity . We say is pairwise opposite if we can partition the variables into pairs such that in , two variables of each pair always take opposite values.
Lemma 11 (Lemma 5.7 in [5]).
If is an affine EO signature, then is pairwise opposite.
3 A chain reaction algorithm
In the section, we show EO and EO are tractable by giving a chain reaction algorithm. We only consider EO, since the other case is symmetric. Given an instance of EO, we may assume that there is at least one vertex labelled by a -affine signature . Otherwise, all signatures in the instance are affine. Such an instance of EO is tractable.
Since is -affine, consider a factor of . This is connected to another variable of some signature (which may be itself) using . Then, the connected variable is pinned to . A key property that ensures our algorithm work is that after connecting to another variable no matter whether it is a variable of itself, an affine signature, or another -affine signature, either the resulting signature is affine, or we can realize another . In the later case, we call it a propagation step. After a propagation step, the new realized can be used to pin another variable to . Thus, we get a chain reaction, and it terminates when an instance of EO is reached. Note that, after each propagation step, the number of edges (total variables) in the instance is reduced by . Thus, the chain reaction terminates after at most many steps where is the edge set of the underlying graph in .
Lemma 12.
Suppose that is -affine and . For any variable of , by connecting it with of using , we can get a zero signature or a signature where for some .
Proof.
If , then is pairwise opposite by Lemma 11. Suppose is opposite to . Then pinning to 0 makes be a factor, i.e., , where . Otherwise . Suppose for some variable . If , then by connecting the factor of and of using , we get a zero signature. Now assume . Then since . In this case, we get , where .
Theorem 13.
#EO() and #EO() are tractable.
Proof.
We only prove #EO() is tractable, the other case is symmetric.
Consider an instance of #EO(). If all signatures in are affine, then we are done. Otherwise, there is a vertex in that is labeled by a -affine signature . Without loss of generality, we name the variable associated with after . Suppose that in , is connected to another variable of some labeling the vertex using .
-
If , i.e., and are labeled on the same vertex in , then by definition the resulting signature obtained from by connecting variables and is in . Then, the instance is reduced to a smaller instance with two fewer edges where is replaced by of smaller arity. Since , the reduced instance is still an instance of #EO().
-
Otherwise, and are labeled on two different vertices. By Lemma 12, connecting of with a variable of , we get a zero signature or a signature where for some . If a zero signature is realized, then clearly we are done. Otherwise, by renaming variables and decomposing into two parts and , again we can reduce the original instance to a smaller instance with two fewer edges where the edges incident to is changed and is replaced by of smaller arity. Still, since , the reduced instance is still an instance of #EO().
Thus, in both cases, the instance can be solved recursively and the number of recursions is bounded by where is the edge set of the underlying graph of .
4 Characterization of -affine -affine kernels
In this section, we prove the main characterization theorem for -affine and -affine kernels using the Hadamard code. We first give an equivalent definition for the -affine kernel. Note that in Definition 7 we require , while in the following lemma we require .
Lemma 14.
An EO signature if and only if it satisfies the following two properties:
-
1.
for some where is a signature of positive arity, ;
-
2.
for every , .
Note that the signature in Example 2 is a -affine kernel. Trivially, any EO signature of support size 3 with at least one factor and no factor is a -affine kernel, since any signature obtained from it by pinning a variable to has a support of size or , which is affine. We say (or ) is a trivial kernel if . Below, we prove the characterization theorem for non-trivial -affine and -affine kernels, which is essentially equivalent to Theorem 8.
Theorem 15.
An EO signature is a non-trivial -affine (or -affine) kernel if and only if is an -multiple of a balanced 1-Hadamard (or balanced 0-Hadamard respectively) code of size for some and .
We give a proof outline for this theorem. First, we prove -affine kernels admit certain arities and support sizes by carefully counting the number of 0s and 1s in each column of their supports. More specifically, we prove a non-trivial -affine kernel must have support size and arity , for some (Lemma 17). Then, we define basic -affine kernels (Definition 18) of support size and arity . We show every non-trivial -affine kernel is a multiple of some non-trivial basic kernel (Lemma 19). Finally, we characterize the basic -affine kernel by the balanced 1-Hadamard code . We define a special affine signature called butterfly (Definition 20), serving as a bridge connecting basic kernels and balanced Hadamard codes. We show (or ) is just a half of butterfly (Lemma 24). We also define left and right wings of butterfly (Definition 21) by removing the all-0 (or all-1) row from a half of butterfly. Notice (or ) is obtained by removing the all-0 (or all-1) codeword from . Thus, wings of butterfly coincide with and (Lemma 24). Finally, we prove basic kernels are precisely wings of butterfly (Lemma 26 and Lemma 28). Therefore, basic kernels, balanced Hadamard codes and wings of butterfly are precisely the same things.
Lemma 16.
Suppose . If for some , then .
Lemma 17.
Suppose that where , and . Then there exists some such that and . Moreover, we have and for every
Definition 18 (Basic -affine kernel).
A basic -affine kernel of order (or a -th basic -affine kernel) is a -affine kernel of arity and support size .
For example, the basic -affine kernel of order 1 is and the basic -affine kernel of order 2 is .
Lemma 19.
An EO signature of arity is a non-trivial -affine kernel if and only if it is an -multiple of a non-trivial basic -affine kernel of arity .
Proof.
First we assume is a non-trivial basic -affine kernel. Then . We want to show . Note that and . Pinning to the -th variable of one copy of in , each of the remaining copies contributes a factor. i.e, . Clearly since . It follows that .
Conversely, assume is a non-trivial -affine kernel, where . We want to show there exists a non-trivial basic -affine kernel such that . By Lemma 17, we have and for every . Fix any , consider . It is an affine EO signature of support size . By Lemma 17, . Factoring out in , we suppose , . At the same time, notice is constant-weighted. Thus, is an EO signature by Lemma 9. Since is also EO, we have .
On one hand, if is a variable taking constant in , then the values of and must be identical in , because the -th column already contributes many s in and the remaining rows must be all s. On the other, if is a variable of , then and are not identical in since they are not identical in . Therefore, there are exactly copies of the -th column in . Since is arbitrary, we have for some signature . Clearly since . Notice for every , , so and then . Therefore, is a basic -affine kernel and .
Below, we show balanced Hadamard codes characterize basic kernels via the bridge of butterfly.
Definition 20 (Butterfly).
Let . An affine signature of arity is a butterfly and denoted by , if it has exactly free (linearly independent) variables and any two different variables do not always take identical values in .
The butterfly is unique up to a permutation of variables. It is precisely the affine signature of free variables with the maximum arity, assuming any two different variables are not identical.
Definition 21 (Wings of butterfly).
We represent the butterfly by a matrix in the following way. Let be free variables of , and be constant . Moreover, let and for , where . Through a permutation of rows, we let the first row be .
Then, can be split into the left half and the right half, each of which consisting of columns. The left wing of , denoted by is the signature obtained form the left half of by removing the first row . Symmetrically, we define the right wing of denoted by .
Remark 22.
Recall that and are obtained from and by adding an all-0 or all-1 row respectively. They are the left and right halves of respectively which are affine. In fact, is precisely the affine signature of free variables with maximum arity, assuming every variable is a linear combination of free variables and any two variables are not identical. While is the complement of .
Example 23.
We give a butterfly with free variables . The other variables are decided by the following linear or affine linear combinations. .
The left and right wings of are and .
Lemma 24.
As a signature, the balanced 1-Hadamard (or 0-Hadamard) code is the right (or left) wing of butterfly up to a permutation of variables.
Proof.
We only need to prove is the left half of . Note that is a linear code, then it is affine as a signature. By the definition of Hadamard matrix and Hadamard code, every two different rows of do not take identical values. By Sylvester’s construction, is symmetic as a matrix. Thus, every two different variables of do not take identical values in its support. Because is of arity , support size , and has an all-0 vector in its support, it is precisely the affine signature of free variables with maximum arity, assuming every variable is a linear combination of free variables and any two variables are not identical. Therefore, is just removing the all-0 row of .
So far we show the equivalence of balanced Hadamard code and wings of butterfly. Next we focus on the relationship between basic kernels and wings of butterfly. For convenience, we only consider the basic -affine kernel and the right wing of butterfly in the following. The other case is symmetric.
Lemma 25.
Let and be the right wing of , then is an EO signature. Moreover, every two different rows (or columns) of do not take identical or opposite values.
Proof.
Because is an EO signature and every two different rows and columns do not take identical or opposite values, this lemma is true because by Lemma 24.
Lemma 26.
Let be the right wing of a butterfly. Then is the -th basic -affine kernel.
Proof.
For it can be checked by definition. Now we assume . First by Lemma 25 is EO. Then we show . Notice , and , since . Finally, because is of arity and support size , it is a basic -affine kernel of order .
Below, we prove the more complicated direction that a basic -affine kernel of order is just up to a permutation of variables. We prove this by induction. We first prove certain properties for the -th -affine kernel assuming the -th -affine kernel is unique up to a permutation of variables.
Lemma 27.
Suppose . If the -th basic -affine kernel is unique up to a permutation of variables, then any -th basic -affine kernel satisfies the following properties for every .
-
1.
up to a permutation of variables.
-
2.
up to a permutation of variables.
-
3.
Two variables and take opposite values in if and only if they take identical values in .
Lemma 28.
The -th basic -affine kernel is precisely up to a permutation of variables.
Proof.
For , we have and this lemma is clear. For , and this lemma is true by Example 23. Now assume this lemma holds for positive integers less or equal than . By Lemma 27, we know any -th -affine kernel satisfies the following three properties:
-
1.
Extracting any variable of to , up to a permutation of rows, the first rows of is butterfly .
-
2.
Extracting any variable of to , up to a permutation of rows, the last rows is . However, when we write the above butterfly into the specific form, we fix the order of columns. Then we denote the last rows by two , where up to a permutation of rows and columns.
-
3.
Every two different variables take identical values in if and only if they take opposite values in , .
Because every two different columns of (as well as ) do not take identical or opposite values by Lemma 25, we can easily check this proposition still holds for . Next we show the signature is affine. We first notice has the following properties, which holds for every :
-
1.
.
-
2.
, since is the right wing of by induction hypothesis, hence is the right half of , which is affine.
We prove by contradiction. If , there exists , such that . If there exists a position such that , assume without loss of generality. Then , where and . Because , we have . Then , contradiction! Similarly, if there exists a position such that , we also get a contradiction. Then, by enumerating all possible combinations of , we can show . Because contains an all-1 vector; ; and there is no identical pair in , is precisely the right wing of .
5 Hardness result
Recall that the binary disequality signature is . The symbol ”” stands for Turing reduction.
Definition 29 (ARS).
A signature satisfies ARS if for every .
First, we show that is always realizable from an EO signature not satisfying ARS.
Lemma 30.
If an EO signature does not satisfy ARS, then #EO #EO.
With the help of , we have the following reduction.
Lemma 31.
If an EO signature does not satisfy ARS, then #EO#EO for every .
Next we will prove #EO is #P-hard if and , which implies that #EO is #P-hard. We first consider a basic case where and are basic -affine and -affine kernels of order respectively.
Lemma 32.
Let and . Then #EO() is #P-hard.
Proof.
Connecting the variables and , and using respectively, we realize a signature of arity where It is known that #EO() is #P-hard by the complexity classification for the six-vertex model [7]. Then, #EO() is #P-hard.
This #P-hardness result can be generalized to any multiples of and .
Lemma 33.
Let , where . Then #EO is #P-hard.
Proof.
Connect and using block by block. That is, connect variables and using for , where are variables of one block and as denoted in Lemma 32.
If , it is the case in Lemma 32. If , we can realize which is also #P-hard by the complexity classification of the six vertex model.
If , we may assume without loss of generality. Then we can realize . Then connect and block by block and continue this process. We finally realize and where is computed by the Euclidean algorithm. Then it is reduced to the case .
This #P-hardness result can still be generalized to any basic -affine and -affine kernels of support size .
Lemma 34.
Let , and . Then #EO is #P-hard.
Theorem 35.
If , then #EO() is #P-hard.
Proof.
We first show we can realize a signature of support size 3 if . If , suppose by Lemma 19, where is the -affine kernel of order . we can extract 1 in some variable of by Lemma 31 and realize , which is a multiple of by Lemma 27. Continuing this process we can finally realize multiple of . If , suppose . Then there exists such that . We have . Repeating the process, either or it can realize a signature in of smaller support size. Finally we can realize of support size 3. Similarly, we can realize of support size 3. Then by Lemma 34 we prove #EO is #P-hard.
References
- [1] Miriam Backens. A new Holant dichotomy inspired by quantum computation. In Proceedings of the 44th International Colloquium on Automata, Languages, and Programming (ICALP 2017). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.ICALP.2017.16.
- [2] Miriam Backens. A complete dichotomy for complex-valued Holantc. In Proceedings of the 45th International Colloquium on Automata, Languages, and Programming (ICALP 2018). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPIcs.ICALP.2018.12.
- [3] Norman Biggs, E Keith Lloyd, and Robin J Wilson. Graph Theory, 1736-1936. Oxford University Press, 1986.
- [4] Andrei Bulatov, Martin Dyer, Leslie Ann Goldberg, Markus Jalsenius, and David Richerby. The complexity of weighted Boolean #CSP with mixed signs. Theoretical Computer Science, 410(38-40):3949–3961, 2009. doi:10.1016/J.TCS.2009.06.003.
- [5] Jin-Yi Cai, Zhiguo Fu, and Shuai Shao. Beyond #CSP: A dichotomy for counting weighted eulerian orientations with ars. Information and Computation, 275:104589, 2020. doi:10.1016/J.IC.2020.104589.
- [6] Jin-Yi Cai, Zhiguo Fu, and Shuai Shao. From Holant to quantum entanglement and back. In Proceedings of the 47th International Colloquium on Automata, Languages, and Programming (ICALP 2020). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ICALP.2020.22.
- [7] Jin-Yi Cai, Zhiguo Fu, and Mingji Xia. Complexity classification of the six-vertex model. Information and Computation, 259:130–141, 2018. doi:10.1016/J.IC.2018.01.003.
- [8] Jin-Yi Cai, Heng Guo, and Tyson Williams. A complete dichotomy rises from the capture of vanishing signatures. SIAM Journal on Computing, 45(5):1671–1728, 2016. doi:10.1137/15M1049798.
- [9] Jin-Yi Cai, Pinyan Lu, and Mingji Xia. Dichotomy for Holant∗ problems of Boolean domain. In Proceedings of the 22nd annual ACM-SIAM symposium on Discrete Algorithms, pages 1714–1728. SIAM, 2011.
- [10] Jin-Yi Cai, Pinyan Lu, and Mingji Xia. The complexity of complex weighted Boolean #CSP. Journal of Computer and System Sciences, 80(1):217–236, 2014. doi:10.1016/J.JCSS.2013.07.003.
- [11] Jin-Yi Cai, Pinyan Lu, and Mingji Xia. Dichotomy for real Holantc problems. In Proceedings of the 29th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1802–1821. SIAM, 2018. doi:10.1137/1.9781611975031.118.
- [12] Nadia Creignou and Miki Hermann. Complexity of generalized satisfiability counting problems. Information and computation, 125(1):1–12, 1996. doi:10.1006/INCO.1996.0016.
- [13] Martin Dyer, Leslie Ann Goldberg, and Mark Jerrum. The complexity of weighted Boolean #CSP. SIAM Journal on Computing, 38(5):1970–1986, 2009. doi:10.1137/070690201.
- [14] Leonhard Euler. Solutio problematis ad geometriam situs pertinentis. Commentarii academiae scientiarum Petropolitanae, pages 128–140, 1741.
- [15] Michel Las Vergnas. On the evaluation at (3, 3) of the Tutte polynomial of a graph. Journal of Combinatorial Theory, Series B, 45(3):367–372, 1988. doi:10.1016/0095-8956(88)90079-2.
- [16] Jiabao Lin and Hanpin Wang. The complexity of Boolean Holant problems with nonnegative weights. SIAM Journal on Computing, 47(3):798–828, 2018. doi:10.1137/17M113304X.
- [17] Boning Meng, Juqiu Wang, and Mingji Xia. P-time algorithms for typical #EO problems. arXiv preprint, 2024. doi:10.48550/arXiv.2410.11557.
- [18] Milena Mihail and Peter Winkler. On the number of Eulerian orientations of a graph. Algorithmica, 16(4-5):402–414, 1996. doi:10.1007/BF01940872.
- [19] Linus Pauling. The structure and entropy of ice and of other crystals with some randomness of atomic arrangement. Journal of the American Chemical Society, 57(12):2680–2684, 1935.
- [20] Franz Rys. Über ein zweidimensionales klassisches Konfigurationsmodell. In Helvetica Physica Acta, volume 36(5), page 537, 1963.
- [21] Shuai Shao and Jin-Yi Cai. A dichotomy for real Boolean Holant problems. In Proceedings of the 61st IEEE Annual Symposium on Foundations of Computer Science (FOCS 2020), pages 1091–1102. IEEE, 2020. doi:10.1109/FOCS46700.2020.00105.
- [22] John C Slater. Theory of the transition in . The Journal of Chemical Physics, 9(1):16–33, 1941.