---
title: 'Ternary Graph: Concepts and Applications'
url: https://www.emergentmind.com/topics/ternary-graph
type: topic
---

# Ternary Graph: Concepts and Applications

“Ternary graph” is not a single standardized term. In recent literature it denotes several non-equivalent objects: a graph with no induced cycles whose length is divisible by \(3\); a connected graph with all nodes of degree at most \(3\); graph encodings of genuinely ternary relations such as \((u,p,c)\) or of three interacting entities; and auxiliary graphs attached to ternary algebraic data such as smooth ternary quartics or ternary-adic dynamical systems [2508.00699][1209.0871][2408.15620][2502.18875][2112.10533][2605.21819]. The term therefore requires local definition, and many apparent conflicts in the literature are terminological rather than mathematical.

## 1. Terminological scope and disambiguation

The principal usages appearing in the cited literature are summarized below.

| Usage | Defining property | Representative source |
|---|---|---|
| Ternary graph | No induced cycle \(C_\ell\) with \(\ell \equiv 0 \pmod 3\) | [2508.00699] |
| \((0,1)\)-ternary graph | No induced cycle with \(\ell \equiv 0\) or \(1 \pmod 3\) | [2508.00699] |
| Ternary graph | Connected graph with all nodes of degree at most \(3\) | [1209.0871] |
| Ternary relation graph | Graph encoding of a relation on three units, often time-indexed | [2408.15620] |
| Ternary graph in molecular modeling | Three coupled graphs with cross-graph attention | [2502.18875] |

A further source of ambiguity is adjectival. In “ternary Hamming graphs” the adjective refers to the alphabet size \(q=3\), so \(H(n,3)\) is not a member of the cycle-forbidding class above [1006.2628]. In the “Steiner graph” of a smooth ternary quartic, “ternary” refers to a quartic in three variables rather than to a graph class [2112.10533]. In functional graphs over \(\mathbb Z_{3^k}\), “ternary” refers to the \(3\)-adic component of the ring [2605.21819]. By contrast, in the decision-diagram literature, ternary decision diagrams are not a graph class at all, but a three-branch representation with ZERO, POS, and NEG arcs [1804.02160].

This terminological spread suggests that “ternary graph” should be read contextually: as a hereditary graph class in topological combinatorics, as a bounded-degree class in isomorphism algorithms, or as a graph representation of arity-three interactions in modern applied work.

## 2. Ternary graphs as graphs with no induced \(C_{3k}\)

In structural and topological graph theory, a graph \(G\) is ternary if it has no induced cycle \(C_\ell\) whose length is divisible by \(3\), equivalently no induced \(C_{3k}\). Throughout this literature, graphs are finite, simple, and undirected, and the relevant topological object is the independence complex
\[
I(G)=\operatorname{Ind}(G)=\{S\subseteq V(G): S \text{ is independent}\}.
\]
Kim’s characterization states that \(G\) is ternary if and only if for every induced subgraph \(H\) of \(G\), \(I(H)\) is either contractible or homotopy equivalent to a sphere [2509.21705].

The homological consequence was established by Zhang and Wu: if \(G\) is ternary, then the total reduced Betti number
\[
b(G)=\sum_{i\ge 0}\tilde b_i(I(G))
\]
satisfies \(b(G)\le 1\) [2011.10939]. This proves the Kalai–Meshulam conjecture in this setting and strengthens the parity statement \(|I_G(-1)|\le 1\) by forcing the reduced homology of \(I(G)\) to be concentrated in at most one degree. The cycle examples are sharp: \(C_4\) and \(C_5\) are ternary and have \(b(G)=1\), whereas \(C_6\) is not ternary and \(I(C_6)\) has the homotopy type \(S^1\vee S^1\), so \(b(C_6)=2\) [2011.10939].

Faridi and Holleben recast this behavior in the language of spherical complexes. Independence complexes of ternary graphs are canonical examples of simplicial complexes for which every subcomplex obtained by links and deletions is either acyclic or spherical. In their formulation, a sign invariant decides contractibility, and when \(I(G)\) is noncontractible one has
\[
I(G)\simeq S^{\mathrm{depth}(G)-1},
\qquad
|V(G)|=\mathrm{depth}(G)+\operatorname{pd}(G),
\]
together with algebraic equalities
\[
\operatorname{pd}(S/I(G))=\operatorname{pd}(G),
\qquad
\mathrm{depth}(S/I(G))=\mathrm{depth}(G)
\]
and, in the noncontractible case,
\[
\operatorname{reg}(S/I(G))=\mathrm{depth}(G)=L(\operatorname{Ind}(G))+1
\]
[2311.07727]. This places ternary graphs at the intersection of hereditary graph theory, combinatorial topology, and Stanley–Reisner theory.

A common misconception is that forbidding induced cycles of length \(0 \pmod 3\) is merely a cycle-parity restriction. The cited results show it is much stronger: it rigidifies all induced-subgraph independence complexes into a contractible-or-spherical dichotomy, a phenomenon not shared by general triangle-free or chordal classes [2509.21705][2311.07727].

## 3. The \((0,1)\)-ternary subclass, domination invariants, and planar flag spheres

A stricter class is obtained by forbidding induced cycles of lengths congruent to \(0\) or \(1\) modulo \(3\). A graph \(G\) is \((0,1)\)-ternary if it has no induced cycle \(C_\ell\) with \(\ell\equiv 0\) or \(1\pmod 3\); equivalently, it contains no cycles of these lengths at all [2508.00699]. For this subclass, the contractible-or-sphere dichotomy can be refined to an exact dimension formula.

Let \(d(G)\) denote the sphere dimension when \(I(G)\) is spherical and \(*\) when \(I(G)\) is contractible. If \(G\) is \((0,1)\)-ternary and \(d(G)\neq *\), then
\[
d(G)+1=i(G)=\gamma(G)=\gamma(L(G)),
\]
equivalently
\[
I(G)\simeq S^d,
\qquad
d=\dim(\text{minimum maximal simplex of }I(G))
=\gamma_i(G)-1=\gamma(G)-1
\]
[2508.00699]. Here \(i(G)=\gamma_i(G)\) is the independent domination number, \(\gamma(G)\) is the domination number, and \(L(G)\) is the line graph. Thus the topological dimension is pinned to classical domination parameters. The examples are exact: \(C_5\) yields \(I(C_5)\simeq S^1\), \(C_8\) yields \(I(C_8)\simeq S^2\), and \(K_{1,r}\) yields \(S^0\). The role of the \(1 \pmod 3\) prohibition is essential, since \(C_4\) is ternary but not \((0,1)\)-ternary, and there the equality with domination numbers fails [2508.00699].

A second refinement concerns Gorenstein and well-covered behavior. For a ternary graph \(G\) without isolated vertices and \(d=\dim\operatorname{Ind}(G)\), the following are equivalent: \(\operatorname{Ind}(G)\) is homotopy equivalent to \(S^d\); \(\operatorname{Ind}(G)\) is a homology sphere; \(\operatorname{Ind}(G)\) is Gorenstein; and \(G\) is \(1\)-well-covered [2509.21705]. Since ternary graphs are triangle-free, this identifies top-dimensional spherical behavior with the \(W_2\)/\(1\)-well-covered condition.

In the planar case the structure becomes especially rigid. Trung’s planar Gorenstein classification implies that planar ternary Gorenstein graphs are disjoint unions of the graphs \(G_m\), and for such graphs the independence complexes are boundaries of vertex decomposable simplicial polytopes [2509.21705]. More precisely, each \(\operatorname{Ind}(G_m)\) is obtained from the boundary of the \(m\)-dimensional crosspolytope by a sequence of \(m-1\) edge subdivisions; joins preserve both polytopality and vertex decomposability. Their \(h\)-polynomials satisfy
\[
h(m,t)=(t+1)h(m-1,t)+t\,h(m-2,t),
\]
with \(h(1,t)=1+t\) and \(h(2,t)=1+3t+t^2\), and in the connected case coincide with Delannoy polynomials \(d_m(t)\), hence are real-rooted [2509.21705]. The corresponding move graph under flag edge subdivisions and contractions is canonically isomorphic to the Hasse diagram of the partition refinement poset \(P_n\).

These planar results show that the cycle-forbidding definition of ternary graph is not merely prohibitive. In the Gorenstein regime it leads to a constructive family of flag spheres with explicit \(h\)-vectors, a rigid move graph, and a direct bridge between graph structure and simplicial-polytope theory.

## 4. Bounded-degree, Hamming, and triadic-interaction usages

A completely different meaning appears in graph isomorphism after Luks. There a ternary graph is defined as a connected graph with all its nodes of degree at most \(3\) [1209.0871]. This bounded-degree sense underlies a specialization of Luks’ automorphism-group machinery. The paper constructs, for two such graphs \(X_1\) and \(X_2\), an auxiliary graph \(X=\operatorname{BuildX}(X_1,X_2,e_1,e_2)\), computes generators of \(\operatorname{Aut}_e(X)\) by a stabilizer-chain recursion over BFS layers around a distinguished edge, and proves that the resulting isomorphism algorithm runs in time \(O(n^{10})\). With implementation improvements, the reported practical behavior is \(O(n^4)\), and the rooted phylogenetic-network adaptation runs in \(O(n^3)\) [1209.0871]. This “ternary” is degree-bounded, not cycle-forbidding.

Another adjectival usage appears in Hamming graphs. The ternary Hamming graph \(H(n,3)\) has vertex set \([3]^n\), edges joining vertices at Hamming distance \(1\), clique number \(3\), and exact competition number
\[
k(H(n,3))=(n-3)3^{n-1}+6
\quad\text{for }n\ge 3,
\]
with \(k(H(1,3))=1\), \(k(H(2,3))=2\), and \(k(H(3,3))=6\) [1006.2628]. Here “ternary” again refers to the alphabet size \(3\), not to the structural class of [2508.00699].

A third usage is process-based rather than classificatory. In the random graph model based on \(3\)-interactions, the graph evolves by repeated selection of triples, with triangle, edge, and vertex weights reinforced at each step [1112.0146]. If \(w_v(n)\) is the weight of a vertex and
\[
a=\frac{2}{3}pr+(1-p)q,
\qquad
\beta p=2p(1-r)+3(1-p)(1-q),
\]
then the participation probability of a vertex is
\[
a\,\frac{w_v(n)}{n+1}+\frac{\beta p}{V_n},
\]
the limiting weight proportions satisfy
\[
x_1=\frac{1}{a+\beta+1},
\qquad
x_w=\frac{a(w-1)+\beta}{aw+\beta+1}x_{w-1},
\]
and the tail is scale free,
\[
x_w\sim C\,w^{-(1+1/a)}.
\]
Moreover, for each fixed vertex \(j\),
\[
w_j(n)\sim S_j\,n^a
\quad\text{a.s.}
\]
[1112.0146]. In this setting “ternary” is best understood as triadic interaction rather than as a static graph property.

These alternative meanings are mathematically legitimate but mutually independent. A bounded-degree ternary graph in the sense of [1209.0871] need not be ternary in the cycle-theoretic sense of [2508.00699], and a ternary Hamming graph in the sense of [1006.2628] is neither definition by default.

## 5. Algebraic, convex-geometric, and dynamical graph constructions

In real algebraic geometry, the relevant object is the Steiner graph attached to the Gram spectrahedron of a smooth psd ternary quartic \(f\in\mathbb R[x,y,z]_4\). Its vertices are the eight real psd rank-\(3\) Gram matrices, and two vertices are adjacent when the segment joining them lies on the boundary of the spectrahedron [2112.10533]. The resulting graph is always
\[
K_4\coprod K_4.
\]
The same paper shows that every smooth ternary quartic has faces of dimension \(2\) in its Gram spectrahedron, generically none of dimension \(1\), and that a generic psd ternary quartic contains points of all ranks in the Pataki interval \(3\le r\le 5\) [2112.10533]. The graph here is neither hereditary nor degree-bounded; it records adjacency among extremal sum-of-squares representations.

In arithmetic dynamics, a different graph arises from a permutation polynomial \(T_n\) acting on \(\mathbb Z_{3^k}\) or on \(\mathbb Z_{2^{k_1}3^{k_2}}\). Each residue class is a vertex and the map \(x\mapsto T_n(x)\) defines a directed edge [2605.21819]. For \(p=3\), \(T_n\) is a permutation polynomial exactly when \(n\equiv \pm1\pmod 6\), so the functional graph is a node-disjoint union of cycles. Writing
\[
w=\max\{\nu_3(n-1),\nu_3(n+1)\},
\]
the paper gives explicit cycle counts in the residue classes \(x\equiv 0\pmod 3\) and \(x\equiv \pm1\pmod 3\). In the \(\pm1\) classes, for \(k\ge w+2\), the graph contains \(4\cdot 3^w\) self-loops, \(8\cdot 3^{w-1}\) cycles of length \(3^i\), and \(2\cdot 3^{w-1}\) cycles of length \(3^{k-w-1}\); in the \(0\) class, the cycles have lengths \(l_0\cdot 3^i\) together with \((3^w-1)/l_0\) cycles of length \(l_0\) and one self-loop, where \(l_0=(T_n'(0))\) [2605.21819]. The Chinese remainder theorem then combines binary and ternary components by taking cycle lengths \(\operatorname{lcm}(L_2,L_3)\) and multiplying cycle counts. This is a functional-graph notion of ternary, driven by \(3\)-adic arithmetic.

These examples show that “ternary graph” can denote a graph attached to ternary data rather than a graph whose own combinatorial definition is ternary. The Steiner graph is induced by quartics in three variables, and the Chebyshev functional graph is induced by dynamics over powers of \(3\).

## 6. Ternary relations and three-body graph representations in machine learning

In temporal knowledge-graph modeling, ternary graph structure is literal arity-\(3\) structure. CAPER defines a career event on three mutually dependent units—user \(u\), position \(p\), and company \(c\)—as a ternary relation
\[
R\subseteq U\times P\times C,
\]
and then temporalizes it to
\[
R\subseteq U\times P\times C\times T.
\]
The temporal knowledge graph is a sequence of snapshots \(G=\{G_t\}\), where users and companies are nodes and positions are edge labels on undirected edges \(u\!-\!p\!-\!c\) [2408.15620]. CAPER couples a timestamp-aware GCN with a recurrent evolution module and trains on the extrapolated career reasoning task. On a resume dataset spanning 1968–2020, it reports average gains of \(6.80\%\) in company prediction and \(34.58\%\) in position prediction over the best competitor, with company MRR \(71.07\) versus \(59.08\) and position MRR \(59.92\) versus \(37.09\) at \(M=1\) [2408.15620]. In this usage, the graph is a representation of a ternary fact rather than a graph class defined by forbidden substructures.

DeepTernary uses the term in a three-body geometric sense. A ternary complex is modeled as three coupled graphs: \(G_{p1}\) for one protein, \(G_{\mathrm{lig}}\) for the degrader, and \(G_{p2}\) for the second protein, together with SE(3)-equivariant intra-graph message passing and ternary inter-graph attention [2502.18875]. The model introduces a query-based Pocket Points Decoder, is trained on TernaryDB with \(22{,}303\) curated ternary complexes, and reports average DockQ \(0.65\) on the PROTAC benchmark and \(0.21\) on the MGD benchmark, with end-to-end inference of approximately \(6.48\) s on GPU for \(40\)-seed PROTAC inference and under \(1\) s for a single-pass MGD prediction [2502.18875]. Here the “ternary graph” is explicitly the combination of three entity graphs plus cross-graph attention.

This applied literature also clarifies a negative point. In graph partition enumeration with zero-suppressed and ternary decision diagrams, “ternary” refers to the three arc types ZERO, POS, and NEG, used to encode signed edge constraints; it does not define a ternary graph class [1804.02160]. The same caution applies across the literature: “ternary” may describe arity, alphabet size, degree bound, modular base, or forbidden-cycle structure, and only the surrounding definitions determine which object is meant.

Source: https://www.emergentmind.com/topics/ternary-graph