Comparing with Lower Bounds
Comparing with Lower Bounds
MinRuntime[i_,o_]:=Max[2IntegerLength[BitXor[i,o],2]-1,1]
In[]:=
Select[Table[m->OneSidedTuringMachineFunction[{m,1,2},{1,50},1000,All],{m,0,15}],FreeQ[Last[#],Undefined]&]
Out[]=
In[]:=
First[#]->MapIndexed[First[#]-MinRuntime[First[#2],Last[#]]&,Last[#]]&/@
Out[]=
{1{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2},3{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},5{0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2},6{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},7{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},13{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2},14{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2},15{2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0}}
In[]:=
Grid[{Table[OneSidedTuringMachinePlot[{3,1,2},i,{100,6},ImageSize->90,"LabelInput"->True],{i,13}]},Alignment->Top]
Out[]=
|
|
|
|
|
|
|
|
|
|
|
|
|
In[]:=
With[{m=3},Grid[{Table[Labeled[OneSidedTuringMachinePlot[{m,1,2},i,{100,6},ImageSize->90,"LabelInput"->True],Style[Text[{First[#],MinRuntime[i,Last[#]]}&[OneSidedTuringMachineFunction[{m,1,2},i,1000,All]]],Red]],{i,10}]},Alignment->Top]]
Out[]=
|
|
|
|
|
|
|
|
|
|
In[]:=
With[{m=#},Grid[{Table[Labeled[OneSidedTuringMachinePlot[{m,1,2},i,{100,6},ImageSize->90,"LabelInput"->True],Style[Text[{First[#],Max[MinRuntime[i,Last[#]],1]}&[OneSidedTuringMachineFunction[{m,1,2},i,1000,All]]],Red]],{i,10}]},Alignment->Top]]&/@({1,3,5,6,7,13,14,15})
Out[]=
,
,
,
,
,
,
,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
With[{m=15},Grid[{Table[Labeled[OneSidedTuringMachinePlot[{m,1,2},i,{100,6},ImageSize->90,"LabelInput"->True],Style[Text[{First[#],Max[MinRuntime[i,Last[#]],1]}&[OneSidedTuringMachineFunction[{m,1,2},i,1000,All]]],Red]],{i,10}]},Alignment->Top]]
In[]:=
First[#]->MapIndexed[First[#]-MinRuntime[First[#2],Last[#]]&,Last[#]]&/@Select[ParallelTable[m->OneSidedTuringMachineFunction[{m,2,2},{1,20},10000,All],{m,0,4095}],FreeQ[Last[#],Undefined]&]
Out[]=
In[]:=
TakeLargestBy,Max[Last[#]]&,5
Out[]=
{378{6,2,14,2,6,2,30,2,6,2,14,2,6,2,62,2,6,2,14,2},1351{6,2,14,2,6,2,30,2,6,2,14,2,6,2,62,2,6,2,14,2},3626{2,6,2,14,2,6,2,30,2,6,2,14,2,6,2,62,2,6,2,14},3717{2,6,2,14,2,6,2,30,2,6,2,14,2,6,2,62,2,6,2,14},1447{8,4,18,2,12,6,32,2,10,4,24,2,16,8,50,2,8,4,22,2}}
In[]:=
First[#]->MapIndexed[First[#]-MinRuntime[First[#2],Last[#]]&,Last[#]]&/@SelectParallelTablem->OneSidedTuringMachineFunction[{m,2,2},{1,200},10^6,All],m,First/@,FreeQ[Last[#],Undefined]&
Out[]=
In[]:=
First[#]->ListStepPlot[Last[#],PlotRange->All]&/@
Out[]=
378
,1351
,3626
,3717
,1447
In[]:=
With[{mm={378,2,2}},Max/@TakeList[MapIndexed[First[#]-MinRuntime[First[#2],Last[#]]&,OneSidedTuringMachineFunction[mm,{1,256},10^6,All]],PowerRange[1,127,2]]]
Out[]=
{4,12,28,60,124,252,508}
In[]:=
Ratios[%]//N
Out[]=
{3.,2.33333,2.14286,2.06667,2.03226,2.01587}
In[]:=
With[{mm={1447,2,2}},Max/@TakeList[MapIndexed[First[#]-MinRuntime[First[#2],Last[#]]&,OneSidedTuringMachineFunction[mm,{1,256},10^6,All]],PowerRange[1,127,2]]]
Out[]=
{8,18,32,50,72,98,128}
In[]:=
Differences[%]
Out[]=
{10,14,18,22,26,30}
In[]:=
Differences[%]
Out[]=
{4,4,4,4,4}
In[]:=
With[{mm={1447,2,2}},Max/@TakeList[OneSidedTuringMachineFunction[mm,{1,256},10^6,"Steps"],PowerRange[1,127,2]]]
Multiple Times
Multiple Times
Partial Function
Partial Function
1,2 vs. 2,2
1,2 vs. 2,2
Space Complexity
Space Complexity
BUGS!!!
BUGS!!!
More...
More...