Function Repository Resource:

# GraphFoliations

Enumerate possible foliations of a directed acyclic graph

Contributed by: Nikolay Murzin
 ResourceFunction["GraphFoliations"][g] returns the foliations of a graph g.

## Details and Options

ResourceFunction["GraphFoliations"] recursively generates foliations by popping sources off the given graph and reattaching them back in all possible ways.
ResourceFunction["GraphFoliations"] takes the following options:
 "IncludePermutations" False whether to include permutations of parallel (antichain) vertices "BundleFoliations" True whether to bundle vertices into one foliation whenever possible Direction Automatic the direction to start building foliations (Automatic,Top or Bottom) MaxItems ∞ set the upper limit of returned foliations

## Examples

### Basic Examples (1)

Enumerate the foliations of a graph:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=
 In[3]:=
 Out[3]=

### Options (5)

#### BundleFoliations (1)

Bundling will combine vertices into one slice when possible; turning this off results in a greater number of foliations:

 In[4]:=
 Out[4]=

#### IncludePermutations (1)

Return foliations with all possible slice permutations:

 In[5]:=
 Out[5]=
 In[6]:=
 Out[6]=

#### Direction (2)

Building foliations from bottom to top may result in different foliations:

 In[7]:=
 In[8]:=
 In[9]:=
 Out[9]=

Direction will not matter when all permutations are included:

 In[10]:=
 In[11]:=
 Out[11]=

#### MaxItems (1)

Limit the enumeration with an upper bound:

 In[12]:=
 Out[12]=

### Applications (1)

Use foliations for a graph generated with the resource function LayeredLayoutGraph:

 In[13]:=
 Out[13]=

## Version History

• 1.3.0 – 18 July 2022
• 1.2.0 – 06 May 2022
• 1.1.0 – 08 November 2021