Wolfram Research

Function Repository Resource:

ButcherTreeQ

Source Notebook

Determine if a Butcher tree is in valid functional syntax

Contributed by: Wolfram Research

ResourceFunction["ButcherTreeQ"][tree]

gives True if tree is a valid Butcher tree, and False otherwise.

Examples

Basic Examples

Test the validity of a tree:

In[1]:=
ResourceFunction[
 "ButcherTreeQ"][\[FormalF][\[FormalF][\[FormalF][\[FormalF]] \
\[FormalF]^2]]]
Out[1]=

Scope

Use the list operator to compare the validity in a list:

In[2]:=
ResourceFunction[
 "ButcherTreeQ"] /@ {\[FormalF][\[FormalF][\[FormalF][\[FormalF]] \
\[FormalF]^2]], \[FormalF][\[FormalF] \[FormalF][\[FormalF] + \
\[FormalF]]]}
Out[2]=

Properties and Relations

ButcherTrees generates only valid Butcher trees, which can be checked with ButcherTreeQ:

In[3]:=
trees = ResourceFunction["ButcherTrees"][4]
Out[3]=
In[4]:=
ResourceFunction["ButcherTreeQ"] /@ trees
Out[4]=

Resource History

Related Resources

License Information