Wolfram Research

Function Repository Resource:

ConnectedHypergraphQ

Source Notebook

Determine whether a hypergraph is connected

Contributed by: Stephen Wolfram

ResourceFunction["ConnectedHypergraphQ"][graph]

yields True if graph corresponds to a connected hypergraph, and False otherwise.

Examples

Basic Examples

Determine whether hypergraphs with ternary edges are connected:

In[1]:=
ResourceFunction["ConnectedHypergraphQ"][{{1, 1, 2}, {2, 3, 4}}]
Out[1]=
In[2]:=
ResourceFunction[
 "ConnectedHypergraphQ"][{{1, 1, 2}, {2, 3, 4}, {5, 6, 7}}]
Out[2]=

Scope

ConnectedHypergraphQ works with hyperedges of any length:

In[3]:=
ResourceFunction[
 "ConnectedHypergraphQ"][{{1, 2, 3, 6}, {2, 3, 4, 5}, {5, 8, 9}, {6, 7, 8, 9}}]
Out[3]=
In[4]:=
ResourceFunction[
 "ConnectedHypergraphQ"][{{1, 2, 3}, {4, 7}, {3, 5, 6}}]
Out[4]=

Resource History

Related Resources

License Information