A ternary graph is a graph with no vertex-induced subgraph that is a cycle graph of length divisible
by 3 (Kim 2022, Zhang and Wu 2025, Bayer et al. 2026). Ternary graphs are
also called trinity graphs (Zhang and Wu 2025). Every forest
is ternary. A cycle graph is ternary iff
is not divisible by 3, so
and
are ternary but
and
are not.
Kim (2022) characterizes these graphs by the topology of their independence complexes. A graph is ternary iff every nonempty vertex-induced subgraph has an independence complex that is contractible or homotopy equivalent to a sphere.
The term ternary graph is also used for a ternary diagram, which plots three proportions rather than representing vertices and edges.
A list of ternary graphs implemented in the Wolfram Language is available as GraphData["Ternary"].