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 (1) 

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 (1) 

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]=

Version History

  • 2.0.0 – 13 March 2020
  • 1.0.0 – 04 December 2019

Related Resources

License Information