---
title: Eulerian & Quasi-Eulerian Graph Orientations
url: https://www.emergentmind.com/topics/eulerian-and-quasi-eulerian-orientations
type: topic
---

# Eulerian & Quasi-Eulerian Graph Orientations

An Eulerian orientation of a finite undirected graph is an assignment of a direction to each edge such that each vertex is balanced: its in-degree equals its out-degree. Quasi-Eulerian orientations generalize this by allowing each vertex's in-degree and out-degree to differ by at most one. The enumeration of these objects—a partition function in statistical mechanics and central to ice-type models—involves sophisticated combinatorial, algebraic, and probabilistic tools. Both the exact and approximate counts of Eulerian and quasi-Eulerian orientations are \#P-hard in general, but recent progress has yielded asymptotic expansions for regular graphs, and closed-form summations for arbitrary degree-constrained orientation classes, notably via duality-type identities and cumulant expansions.

## 1. Definitions and Combinatorial Framework

Given a finite simple graph \(G = (V, E)\), an orientation \(\sigma\) assigns to each edge an ordered pair (i.e., chooses one end as source, the other as target). For a vertex \(i\), define:
\[
\deg^+_i(\sigma) = \#\{\,e\in E: e\text{ is oriented out of }i\}
\]
\[
\deg^-_i(\sigma) = \#\{\,e\in E: e\text{ is oriented into }i\}
\]

- **Eulerian orientation:** For every \(i\),
  \[
  \deg^+_i(\sigma) = \deg^-_i(\sigma)
  \]
  Only possible if all degrees \(d_i\) are even.
- **Quasi-Eulerian orientation:** For every \(i\),
  \[
  |\deg^+_i(\sigma) - \deg^-_i(\sigma)| \le 1
  \]
  Equivalently, out-degree belongs to \(\{\lfloor d_i/2 \rfloor, \lceil d_i/2 \rceil\}\).

Let \(\mathcal{E}(G)\) be the set of Eulerian orientations, and \(\mathcal{Q}(G)\) the set of quasi-Eulerian ones.

The enumeration of degree-constrained orientations of \(G\) can be written as follows. For each \(v \in V\), let \(\mathsf{P}_v \subset \mathbb{Z}\) be an admissible set of out-degrees. Then
\[
\mathcal{N}(G; \prod_{v\in V} \mathsf{P}_v) = \#\{\text{orientations } \sigma : \forall v,\, \deg^+_v(\sigma)\in \mathsf{P}_v\}
\]
For Eulerian orientations: \(\mathsf{P}_v = \{ d_v/2 \}\) (when \(d_v\) even). For quasi-Eulerian: \(\mathsf{P}_v = \{ \lfloor d_v/2\rfloor, \lceil d_v/2\rceil\}\).

## 2. Duality Formula and Closed-Form Enumeration

A general duality theorem expresses \(\mathcal{N}(G; \prod_{v\in V} \mathsf{P}_v)\) as an alternating sum over subgraphs, with each term factoring as a product of coefficient sums arising from local polynomials. Specifically [2504.12693]:

\[
\mathcal{N}(G; \prod_{v \in V} \mathsf{P}_v) = \sum_{F\subseteq E} (-1)^{|F|}\, 2^{|E|} \prod_{v\in V} \mathcal{C}\left((1-z)^{d_F(v)}(1+z)^{d_v-d_F(v)}; \mathsf{P}_v \right)
\]
where for univariate polynomial \(q(z)\),
\[
\mathcal{C}(q(z); \mathsf{P}) = \sum_{\ell\in \mathsf{P}} [z^\ell] q(z)
\]
and \(d_F(v)\) is the degree of \(v\) in subgraph \(F\).

For Eulerian orientations (\(\mathsf{P}_v = \{ d_v/2 \}\)), each term simplifies via binomial identities:
\[
\mathcal{C}\left((1-z)^k(1+z)^{d-k}; \{ d/2 \}\right) =
\begin{cases}
(-1)^{k/2} \binom{d}{d/2} \binom{d/2}{k/2} & k \text{ even} \\
0 & k \text{ odd}
\end{cases}
\]
Hence,
\[
|\mathcal{E}(G)| = \sum_{F\subseteq E} (-1)^{|F|} 2^{|E|} \prod_{v\in V} \left[(-1)^{d_F(v)/2} \binom{d_v}{d_v/2} \binom{d_v/2}{d_F(v)/2}\right]
\]
where all factors vanish unless every \(d_F(v)\) is even.

For quasi-Eulerian orientations (\(\mathsf{P}_v = \{\lfloor d_v/2\rfloor, \lceil d_v/2\rceil\}\)), the corresponding formula involves summing the coefficients for both allowable out-degrees:
\[
|\mathcal{Q}(G)| = \sum_{F\subseteq E} (-1)^{|F|}2^{|E|}
\prod_{v\in V}
\bigg(\sum_{j_1+j_2 = \lfloor d_v/2\rfloor} (-1)^{j_1}\binom{d_F(v)}{j_1}\binom{d_v-d_F(v)}{j_2}
+ \sum_{j_1+j_2 = \lceil d_v/2\rceil} (-1)^{j_1}\binom{d_F(v)}{j_1}\binom{d_v-d_F(v)}{j_2}\bigg)
\]

The table below presents the specialization of the duality formula for standard cases:

| Orientation Type      | Degree Constraint \(\mathsf{P}_v\)         | Summand for Vertex \(v\)                                             |
|----------------------|---------------------------------------------|-----------------------------------------------------------------------|
| Eulerian             | \(\{d_v/2\}\)                              | See closed form above (nonzero only if \(d_F(v)\) even)              |
| Quasi-Eulerian       | \(\{\lfloor d_v/2\rfloor, \lceil d_v/2\rceil\}\) | Sum of coefficients at both approximately balanced out-degrees      |

A plausible implication is that this single inclusion–exclusion expansion encompasses essentially all degree-constrained orientation counting problems for undirected graphs.

## 3. Cumulant Expansion and Asymptotic Enumeration

For graphs with good expansion properties and sufficiently high minimum and maximum degrees (\(d_{\min}, d_{\max} \gg \log^8 n\)), asymptotically sharp formulae for Eulerian orientations can be derived via analytic techniques [2309.15473]. The core approach:

1. **Generating Function Representation:**
   \[
   \sum_{\sigma} \prod_{i} x_i^{\deg_i^+(\sigma)-\deg_i^-(\sigma)} = \prod_{\{j, k\}\in E} (x_j/x_k + x_k/x_j)
   \]
   The number of Eulerian orientations is the constant term in this generating function.

2. **Integral and Saddle-Point Analysis:**
   Applying Cauchy's integral theorem yields a multidimensional integral, which is analyzed by a saddle-point method. This step reduces enumeration to Laplace-type integrals over a Gaussian measure tied to the graph's Laplacian.

3. **Cumulant Expansion:**
   The Laplace transform \(M(z) = \mathbb{E}[e^{z f(X)}]\) of a relevant polynomial \(f(X)\) (with \(X\) a Gaussian vector) is expanded in cumulants:
   \[
   \log M(z) = \sum_{k=1}^m \frac{\kappa_k z^k}{k!} + R_m(z)
   \]
   with tail-bound
   \[
   |R_m(z)| \leq e (100a)^{m+1}-1
   \]
   whenever difference-operator averages \(A_V(f)\) are small.

4. **Asymptotic Formula:**
   \[
   Z(G) = C(G)\, n^{-\alpha} \exp(F(G)) (1 + O(n^{-c}))
   \]
   where \(C(G)\), \(\alpha\), and \(F(G)\) depend on spectral properties of the graph and cumulants of the polynomial \(f_K(X_G)\).

This approach yields error control to any polynomial accuracy and recovers the classical heuristic
\[
Z(G) \approx 2^{|E|}(2\pi)^{-\alpha} |\det^\prime A|^{-1/2}
\]
for regular expanders with large degrees and controlled Cheeger constant.

## 4. Graph-Theoretic and Algorithmic Considerations

Evaluating the exact enumeration formulas is \#P-hard owing to the sum over \(2^{|E|}\) edge subsets. For certain classes such as regular graphs or graphs of bounded tree width, factor-graph decompositions or holographic algorithms may permit polynomial-time evaluation, when the local degree-constraint polynomials admit suitable tractable structure [2504.12693]. The gauge-transformation perspective interprets the inclusion–exclusion sum as a partition function under local orthonormal changes of basis per edge, ensuring no global Jacobian and preservation of partition function value.

From a probabilistic viewpoint, the orientation generating polynomial can be realized as an expectation over random sign assignments on edges, tying the problem to random polynomial analysis and statistical physics models. In full generality, however, approximations and asymptotics via cumulant expansion and Laplace analysis remain the only feasible approach for large, sparse, or irregular graphs.

## 5. Quasi-Eulerian Orientations: Extension and Technical Obstacles

Relaxing the Eulerian constraint to allow near-balance at each vertex broadens the class of objects counted to quasi-Eulerian orientations. The duality formula admits two-point coefficient sums per vertex and remains structurally similar, but analytic approaches via cumulant expansion require significant technical modifications [2309.15473]:

- The generating function integrand becomes complex and ceases to be even and real, necessitating control over oscillatory cancellation in Laplace-type integrals.
- The saddle-point lies off the hyperplane \(\sum_i\theta_i=0\), demanding a preliminary recentering in the analytic set-up.
- The manifold of saddle points grows in dimension with permitted imbalance, leading to integration over higher-dimensional tori.

Despite these challenges, it is expected that with moderate extra effort—mainly in extending tail-bounds for cumulant expansions to complex functions and higher-dimensional saddle analysis—the methodology for asymptotic enumeration can be adapted to quasi-Eulerian orientations under similar expansion and degree conditions.

## 6. Broader Context and Applications

Counting Eulerian and quasi-Eulerian orientations is tightly connected to partition functions in ice-type models, flow problems, and statistical physics, notably in the context of "degree-constrained" local states. The duality and cumulant techniques provide a unifying analytic and combinatorial framework, incorporating and generalizing classical inclusion–exclusion, gauge transformations, and randomized polynomial proofs. The formulas presented interpolate between combinatorics, spectral graph theory, and statistical mechanics, offering computational tools and theoretical benchmarks for ongoing research in network flows, critical phenomena, and the enumeration of local-constraint structures in graphs.

Source: https://www.emergentmind.com/topics/eulerian-and-quasi-eulerian-orientations