Function Repository Resource:

ButcherTreeData

Source Notebook

Get characteristics of Butcher trees, such as the height, width, order, density and number of labelings

Contributed by: Wolfram Research

ResourceFunction["ButcherTreeData"][tree]

gives an association of characteristics of tree.

ResourceFunction["ButcherTreeData"][tree,p]

gives the characteristic p of tree.

ResourceFunction["ButcherTreeData"][tree,{p1,p2,}]

gives the characteristics pi of tree.

ResourceFunction["ButcherTreeData"][{tree1,tree2,},]

gives the characteristics of treei.

Details and Options

For multiple trees, ResourceFunction["ButcherTreeData"][{tree1,tree2,}] returns an association of the form <|"prop1"{v11,v12,},"prop2"{v21,v22,},|>, where vij is the value of the property i of the tree j.
Possible characterics of tree include:
"ButcherHeight"the height of the tree
"ButcherWidth"the width of the tree
"ButcherOrder"the number of vertices in the tree
"ButcherGamma"the density of the tree
"ButcherSigma"the order of the symmetry group of the tree
Characterics related to the number of possible ways of labeling tree are:
"ButcherAlpha"labeling with a totally ordered set of labels
"ButcherBeta"labeling with all vertices labeled except for the root vertex
"ButcherBetaBar"labeling with an unordered set of labels
ResourceFunction["ButcherTreeData"][tree,"ButcherAlpha"] gives the number of ways of labeling the vertices of tree with a totally ordered set of labels such that if (m,n) is an edge, then m<n.
ResourceFunction["ButcherTreeData"][tree,"ButcherBeta"] gives the number of ways of labeling tree with Butcher order -1 distinct labels such that the root is not labeled, but every other vertex is labeled.
ResourceFunction["ButcherTreeData"][tree,{"ButcherBeta",n}] gives the number of ways of labeling n of the vertices of tree with n distinct labels such that every leaf is labeled and the root is not labeled.
ResourceFunction["ButcherTreeData"][tree,"ButcherBetaBar"] gives the number of ways of labeling tree with Butcher order distinct labels such that every vertex is labeled.
ResourceFunction["ButcherTreeData"][tree,{"ButcherBetaBar",n}] gives the number of ways of labeling n of the vertices of tree with n distinct labels such that every leaf is labeled.
The density returned by ResourceFunction["ButcherTreeData"][tree,"ButcherGamma"] is also the reciprocal of the right-hand side of the order condition imposed by tree.
ResourceFunction["ButcherTreeData"][tree] is equivalent to ResourceFunction["ButcherTreeData"][tree,All] giving an association of the chracteristics of the tree.

Examples

Basic Examples (3) 

Find the height of a Butcher tree:

In[1]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF]^2], "ButcherHeight"]
Out[1]=

Find the width and the height:

In[2]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF]^2], {"ButcherWidth", "ButcherHeight"}]
Out[2]=

Generate trees for any Runge-Kutta method of order 3 using the resource function ButcherTrees:

In[3]:=
ResourceFunction["ButcherTrees"][3]
Out[3]=

Determine their characteristics:

In[4]:=
ResourceFunction["ButcherTreeData"][%]
Out[4]=

Visualize the trees:

In[5]:=
ResourceFunction["ButcherPlot"][%%]
Out[5]=

Scope (19) 

Characteristics of a Tree (3) 

Define a Butcher tree and find one of its characteristics (for instance, the order):

In[6]:=
tree = \[FormalF][\[FormalF][\[FormalF]^2]^2];
In[7]:=
ResourceFunction["ButcherTreeData"][tree, "ButcherOrder"]
Out[7]=

Visualize the tree:

In[8]:=
ResourceFunction["ButcherPlot"][tree]
Out[8]=

Find several characteristics of a tree:

In[9]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], {"ButcherHeight", "ButcherWidth", "ButcherOrder"}]
Out[9]=

Find all the available characteristics of a tree:

In[10]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2]]
Out[10]=
In[11]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], All]
Out[11]=

Characteristics of Several Trees (3) 

Generate several trees with the resource function ButcherTrees:

In[12]:=
ResourceFunction["ButcherTrees"][3]
Out[12]=

Find one characteristic of the list of trees:

In[13]:=
ResourceFunction["ButcherTreeData"][%, "ButcherOrder"]
Out[13]=

With the help of the resource function ButcherTrees, find several characteristics of several trees:

In[14]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], {"ButcherHeight", "ButcherWidth", "ButcherOrder"}]
Out[14]=

Generate several trees with the resource function ButcherTrees and get all of their available characteristics:

In[15]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3]]
Out[15]=
In[16]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], All]
Out[16]=

The Height of Butcher Trees (1) 

Find the height of one or more Butcher trees:

In[17]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], "ButcherHeight"]
Out[17]=
In[18]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], "ButcherHeight"]
Out[18]=

The Width of Butcher Trees (1) 

Find the width of one or more Butcher trees:

In[19]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], "ButcherWidth"]
Out[19]=
In[20]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], "ButcherWidth"]
Out[20]=

The Order of Butcher Trees (1) 

Count vertices in one or more trees:

In[21]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], "ButcherOrder"]
Out[21]=
In[22]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], "ButcherOrder"]
Out[22]=

The Density of Butcher Trees (1) 

The density of one or more trees:

In[23]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], "ButcherGamma"]
Out[23]=
In[24]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], "ButcherGamma"]
Out[24]=

The Order of the Symmetry Group (1) 

Compute the order of the symmetry group of one or more trees:

In[25]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], "ButcherSigma"]
Out[25]=
In[26]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], "ButcherSigma"]
Out[26]=

Labeling with an Ordered Set (1) 

The number of ways of labeling the vertices of one or more trees with an ordered set:

In[27]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], "ButcherAlpha"]
Out[27]=
In[28]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], "ButcherAlpha"]
Out[28]=

Labeling Vertices except for the Root Vertex (3) 

Compute the number of ways of labeling a tree with Butcher order-1 distinct labels such that all the vertices are labeled except the root:

In[29]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], "ButcherBeta"]
Out[29]=

Specify the number of labels explicitly:

In[30]:=
tree = \[FormalF][\[FormalF][\[FormalF]^2]^2];
In[31]:=
ResourceFunction[
 "ButcherTreeData"][tree, {"ButcherBeta", ResourceFunction["ButcherTreeData"][tree, "ButcherOrder"] - 1}]
Out[31]=

Count the number of ways of labeling vertices except the root vertex in several trees:

In[32]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], "ButcherBeta"]
Out[32]=

Labeling with an Unordered Set (4) 

Compute the number of ways of labeling a tree with Butcher order distinct labels such that all the vertices are labeled:

In[33]:=
ResourceFunction[
 "ButcherTreeData"][\[FormalF][\[FormalF][\[FormalF]^2]^2], "ButcherBetaBar"]
Out[33]=

Specify the number of labels explicitly:

In[34]:=
tree = \[FormalF][\[FormalF][\[FormalF]^2]^2];
In[35]:=
ResourceFunction[
 "ButcherTreeData"][tree, {"ButcherBetaBar", ResourceFunction["ButcherTreeData"][tree, "ButcherOrder"]}]
Out[35]=

Count the number of ways of labeling vertices in several trees:

In[36]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], "ButcherBetaBar"]
Out[36]=

Specify the number of labels explicitly:

In[37]:=
ResourceFunction["ButcherTreeData"][
 ResourceFunction["ButcherTrees"][3], {"ButcherBetaBar", 2}]
Out[37]=

Version History

  • 1.0.0 – 04 November 2019

Related Resources

License Information