WOLFRAM NOTEBOOK

In[]:=
RandomLambda[3,3,20]
Out[]=
{λ.[λ.[λ.[2]][λ.[2[1[1]]]]],λ.[λ.[λ.[2[1][3]][2[1]]]],λ.[λ.[2]],λ.[λ.[2[1[1]]]],λ.[λ.[1[2]]],λ.[λ.[1[1]][λ.[λ.[3[3[2]]][λ.[3]][λ.[2[1]]]]]],λ.[λ.[λ.[1[3]][2[2][2][1[2]]]][λ.[2[2[1]][2[1][1]]]]],λ.[λ.[λ.[3[2][3]][1][λ.[2[2]]]][λ.[λ.[2][λ.[3][λ.[3[3]]]]][λ.[λ.[1[3[2]]][λ.[3]]]]]],λ.[λ.[2[1[2]]][λ.[1[2]]][λ.[λ.[3[3]][1[1[1]]]]]],λ.[λ.[λ.[3[1]][1[1]]]],λ.[λ.[λ.[3[2][1]][2[2]]][λ.[1[λ.[1]]]][λ.[1]]],λ.[λ.[1][λ.[1[1][1]]]],λ.[λ.[2]],λ.[λ.[λ.[1]][λ.[λ.[3][λ.[1][1[2]]]]]],λ.[λ.[2][λ.[λ.[2[1]][2][2[1][1]]][λ.[λ.[1[1]][λ.[3[2]][λ.[3[3[3]]]]]]]]],λ.[λ.[λ.[2[3][2]]][λ.[λ.[2[2]]]]],λ.[λ.[λ.[2][λ.[3[1[1]]][1[2]]]][λ.[1[λ.[2[3][1]]]]]],λ.[λ.[2[1]][λ.[λ.[1[3][1]][1]][λ.[1[2[1]][2[1]][λ.[3[2]]]]]]],λ.[λ.[λ.[2[1][3]][λ.[1[3[3]]]]][λ.[2[1][λ.[3[3]]][1[1[1]]]]]],λ.[λ.[λ.[3[1[1]]][λ.[1[2]]]][λ.[1[2[1[2]]][1]]][λ.[λ.[2[3][2]][λ.[2[1[2]]]]]]]}
In[]:=
Labeled[ListStepPlot[LeafCount/@NestList[BetaReduce[#,1]&,#,30],PlotTheme->"Minimal"],#]&/@RandomLambda[3,3,20]
Out[]=
λ.[λ.[1[1][λ.[3]]][λ.[λ.[1][λ.[1[3][3]][2[2[2]]]]]]]
,
λ.[λ.[λ.[1][λ.[1]][λ.[2[1]]]]]
,
λ.[λ.[1[2][1[1]][2[2[1]]]]]
,
λ.[λ.[1[1][1][1[2]]][λ.[λ.[3[2]]]]]
,
λ.[λ.[λ.[1[1]][2[1][1][1[1]]]][λ.[1]][λ.[λ.[3]]]]
,
λ.[λ.[λ.[3[2]][1[2]]][λ.[2[2[1]][2]]]]
,
λ.[λ.[λ.[3[1]]][λ.[λ.[2[2][3]]]]]
,
λ.[λ.[λ.[2[2]][1]]]
,
λ.[λ.[λ.[2[3]][1[1][2]]]]
,
λ.[λ.[2[1]][λ.[1[2][1[2][2]]][λ.[λ.[3][1[2[2]][λ.[2[2][2]]]]]]]]
,
λ.[λ.[1[2[1]]][λ.[λ.[2[1][1]][λ.[3][λ.[1[1][1]]]]]]]
,
λ.[λ.[2[1][λ.[3[3][2]]][1]][λ.[1[1][1][λ.[3[1]]]]]]
,
λ.[λ.[λ.[3[2][2]]]]
,
λ.[λ.[λ.[2[2]]][λ.[λ.[1][1[λ.[1]]]]][λ.[2[1]]]]
,
λ.[λ.[2[1[1]]][λ.[λ.[2[1[1]]][1[2[2]]]][λ.[1[2[1]][λ.[3[2]]][λ.[1[2][3]]]]]]]
,
λ.[λ.[λ.[3[2]]]]
,
λ.[λ.[λ.[2[2[2]]][λ.[3]]]]
,
λ.[λ.[λ.[3[1[3]]][2[2][2]]][λ.[1][λ.[λ.[2]]]]]
,
λ.[λ.[λ.[1[1]][2[2]]][λ.[2[1][λ.[2]]]][λ.[λ.[1[3[3]]][λ.[1[3]][λ.[2[1]]]]]]]
,
λ.[λ.[2][λ.[λ.[3[1][3]][2[2]]]]]
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.