Function Repository Resource:

EnumerateHypergraphs

Source Notebook

Enumerate possible ordered hypergraphs with a given signature

Contributed by: Stephen Wolfram and Max Piskunov

ResourceFunction["EnumerateHypergraphs"][sig]

generates a list of all canonical hypergraphs with the specified signature sig.

ResourceFunction["EnumerateHypergraphs"][sig,s]

allows only up to s distinct elements.

ResourceFunction["EnumerateHypergraphs"][sig,type]

generates all possible hypergraphs with the specified type of connectivity.

Details and Options

The input lhs should be of the form {{n1L,k1L},{n2L,k2L},}.
The connectivity types can be:
Allrequire both left- and right- hand sides to be connected individually and to one another
Automaticrequire left-hand side to be connected and to be connected to the right-hand side
Nonedo not constrain based on connectivity
The option "Monitored" (default False) can be used to monitor computation.
ResourceFunction["EnumerateHypergraphs"] by default uses parallel computation.

Examples

Basic Examples (1) 

Enumerate ordered hypergraphs with pairs of binary relations:

In[1]:=
ResourceFunction["EnumerateHypergraphs"][{{2, 2}}]
Out[1]=

Scope (4) 

Enumerate all ordered hypergraphs with pairs of ternary relations:

In[2]:=
ResourceFunction["EnumerateHypergraphs"][{{2, 3}}]
Out[2]=

An equivalent specification:

In[3]:=
ResourceFunction["EnumerateHypergraphs"][{{2, 3}}, Automatic]
Out[3]=

Ordered hypergraphs with no constraints on connectivity:

In[4]:=
ResourceFunction["EnumerateHypergraphs"][{{2, 3}}, None]
Out[4]=

Constrain to at most two distinct elements:

In[5]:=
ResourceFunction["EnumerateHypergraphs"][{{2, 3}}, 2]
Out[5]=

Use with a more complicated signature:

In[6]:=
ResourceFunction["EnumerateHypergraphs"][{{2, 3}, {2, 2}}, 3] // AbsoluteTiming
Out[6]=

Version History

  • 2.0.0 – 20 April 2020
  • 1.0.0 – 10 April 2020

Related Resources

License Information