---
title: 'Harary Polynomials: Graph Invariants'
url: https://www.emergentmind.com/topics/harary-polynomials
type: topic
---

# Harary Polynomials: Graph Invariants

Harary polynomials are a broad class of graph polynomials that generalize the chromatic polynomial by parameterizing conditional colorings with respect to arbitrary graph properties. Formally, for a graph property $\mathcal{P}$ (a class of simple graphs closed under isomorphism), the Harary polynomial $\chi_{\mathcal{P}}(G;k)$ counts the number of $\mathcal{P}$-colorings of vertices of $G$ using at most $k$ colors, where each color class induces a subgraph in $\mathcal{P}$. This construct yields a univariate polynomial in $k$ with integer coefficients, capturing both combinatorial and algebraic information about the graph relative to $\mathcal{P}$ [2512.22556, 2003.06250].

## 1. Formal Definition and Polynomiality

Given a graph $G$ of order $n$ and a graph property $\mathcal{P}$, a $\mathcal{P}$-coloring with at most $k$ colors is a mapping $c:V(G) \rightarrow [k]$ such that each color class $c^{-1}(j)$ induces a subgraph $G[c^{-1}(j)]$ in $\mathcal{P}$. The Harary polynomial for $G$ and $\mathcal{P}$ is defined by:
\[
\chi_{\mathcal{P}}(G; k) = \sum_{i=0}^n h_i^{\mathcal{P}}(G)\, k_{(i)},
\]
where $h_i^{\mathcal{P}}(G)$ is the number of partitions of $V(G)$ into $i$ non-empty blocks such that each induced subgraph $G[V_j]\in\mathcal{P}$, and $k_{(i)} = k(k-1)\dots(k-i+1)$ denotes the falling factorial. The polynomiality is established constructively using Stirling numbers arguments [2512.22556]. The coefficients encode fine partition statistics specific to $\mathcal{P}$, distinguishing Harary polynomials from traditional chromatic polynomials.

## 2. Logical Definability and Model-Theoretic Aspects

The MSOL-definability of Harary polynomials hinges on the logical expressibility of the property $\mathcal{P}$. If $\mathcal{P}$ is MSOL-definable (i.e., expressible using Monadic Second Order Logic quantification over vertex sets), then $\chi_{\mathcal{P}}(G;k)$ itself becomes MSOL-definable as a function from graphs to $\mathbb{Z}[k]$ [2512.22556]. In this framework, the $i$th coefficient is computed by counting the number of vertex partitions satisfying the predicate "each block induces a $\mathcal{P}$-subgraph." This logical perspective ties the complexity and computability of Harary polynomials to foundational results such as Courcelle’s theorem and the finite rank of connection matrices.

However, many nontrivial $\mathcal{P}$ (e.g., hereditary, monotone, or minor-closed properties excluding certain graphs) are not edge-elimination invariants and their Harary polynomials are not MSOL-g-definable; only trivial cases (e.g., all graphs, edgeless graphs) admit such definitions [2003.06250].

## 3. Distinctive Power, Mates, and Comparability

Let $\chi^{\mathcal{P}}$ denote the Harary polynomial associated with property $\mathcal{P}$. Two graphs $G,H$ are called $\mathcal{P}$-mates if $\chi^{\mathcal{P}}(G;k) = \chi^{\mathcal{P}}(H;k)$ for all $k$. The distinctive power ordering $\chi^{\mathcal{P}}\leq_{dp}\chi^{\mathcal{Q}}$ asserts that $\chi^{\mathcal{Q}}$ is at least as discriminative as $\chi^{\mathcal{P}}$; that is, every pair of $\mathcal{Q}$-mates are also $\mathcal{P}$-mates [2512.22556].

A key structural theorem is that for any hereditary, nontrivial $\mathcal{P}$ with infinitely many nonisomorphic graphs of the same order, there exist infinitely many $\mathcal{P}$-mates. For properties closed under disjoint union and connected components (Compton-Gessel classes), containment $\mathcal{P}\subseteq\mathcal{Q}$ ensures $\chi^{\mathcal{P}}\leq_{dp}\chi^{\mathcal{Q}}$ due to multiplicativity and partition refinement. The comparability lattice of Harary polynomials thus reflects both algebraic and property-theoretic hierarchies.

### Example Table: Key $\mathcal{P}$ and Their Harary Polynomials

| Property $\mathcal{P}$         | Harary Polynomial $\chi^{\mathcal{P}}(G;k)$ | Distinctive-Power Note              |
|-------------------------------|---------------------------------------------|-------------------------------------|
| Edgeless graphs               | Chromatic polynomial                        | Standard case, infinite mates       |
| Complete graphs               | Adjoint polynomial                          | Incomparable with chromatic         |
| All graphs                    | $k^{|V(G)|}$                                | Coarsest, all graphs same order mate|
| Connected graphs              | Convex coloring polynomial                  | Logic-definability restricted       |
| $\mathrm{mcc}_t$ (component $\leq t$) | Generalization of proper coloring       | Infinite mates for $t\geq2$         |

## 4. Classical and Generalized Harary-Sachs Theorem

The Harary polynomial framework is intimately related to the Harary-Sachs theorem, which calculates coefficients of the characteristic polynomial of adjacency matrices in terms of elementary subgraphs [1812.00468, 2107.10781]. The classical theorem expresses the $d$th coefficient as:
\[
c_d(G) = \sum_{H \in \Lambda_d} (-1)^{c(H)} 2^{z(H)} [\# H \subseteq G],
\]
where $\Lambda_d$ is the set of elementary subgraphs (connected components are edges or cycles) of order $d$.

For $k$-uniform hypergraphs, the generalized Harary-Sachs theorem replaces elementary subgraphs by Veblen infragraphs (multi-hypergraphs with degree constraints), weighting each by arborescence counts and Euler rootings, and summing over possible embeddings. This expansion underlies the computation of codegree-$d$ coefficients in hypergraph spectra and, by analogy, extends Harary polynomials beyond simple graph properties into tensor spectral graph theory [2107.10781].

## 5. Spectrum, Mates, and Computation

Harary polynomials possess rich algebraic spectra and mate structures. For instance, for $\mathcal{P}$ corresponding to "all graphs," $\chi^{\mathcal{P}}(G;k)$ reduces to $k^{|V(G)|}$ and is completely non-discriminative; all graphs with the same number of vertices are mates. In contrast, for proper colorings (edgeless $\mathcal{P}$), the chromatic polynomial distinguishes coloring-critical structures but is still not injection for trees of equal order [2512.22556].

Harary polynomials are not, in general, edge-elimination invariants except for the trivial case ($\mathcal{P}$ is edgeless). Their evaluation complexity mirrors that of chromatic polynomials, typically #P-hard, except in restricted graph classes where Courcelle’s results provide tractability via logical definability [2003.06250].

## 6. Open Problems and Classification

Current research emphasizes the classification of Harary polynomial invariants, their logical and computational boundaries, and the structure of the distinctive power lattice. Open problems include:
- The existence and optimality of complete or almost-complete Harary polynomials for nontrivial $\mathcal{P}$.
- Analytic properties such as root location, real-rootedness and log-concavity.
- The interaction between MSOL-definability and Tutte-like algebraic recursions.
- Algorithms for evaluation and recognition of Harary polynomial equivalence, especially under mate relations.

The study of Harary polynomials thus subsumes and unifies diverse areas—algebraic graph invariants, model theory, combinatorial enumeration, and spectral methods—while posing rich challenges for future research [2512.22556, 2003.06250, 2107.10781].

Source: https://www.emergentmind.com/topics/harary-polynomials