Generating simplicial trees (equivalently, totally balanced hypergraphs) on $n$ vertices

asked 2025-05-21 11:53:27 +0200

Hola gravatar image

updated 2025-05-22 21:48:26 +0200

A hypergraph is called totally balanced if every cycle $C$ in $H$ of length at least 3 (not necessarily odd-length) has an edge containing at least three vertices of $C$. A cycle in a hypergraph is a sequence of distinct vertices and hyperedges $(v_1, e_1, v_2, e_2, \dots, v_k, e_k, v_{k+1} = v_1),$ where every vertex $v_i$ is contained in both $e_{i-1}$ and $e_i$. The number $k$ is called the length of the cycle.

My question. Is there any code in SageMath to generate all totally balanced hypergraphs on $n$ vertices, having as output the list of hyperedges, and ideally also some visual representation?

edit retag flag offensive close merge delete