Wolfram Research

Function Repository Resource:

HofstadterMURiddle

Source Notebook

Get steps of Hofstadter's MU riddle

Contributed by: Enrique Zeleny

ResourceFunction["HofstadterMURiddle"][n]

gives n steps of the Hofstadter's MU riddle.

Details and Options

ResourceFunction["HofstadterMURiddle"] gives a list of rules suitable for a graph.

Examples

Basic Examples

Four steps of the MU-Riddle:

In[1]:=
ResourceFunction["HofstadterMURiddle"][4]
Out[1]=

Make a graph of steps of the MU-Riddle:

In[2]:=
GraphPlot[
    ResourceFunction["HofstadterMURiddle"][4]]
Out[2]=

Add labels and plot the graph with a different Method:

In[3]:=
GraphPlot[
    ResourceFunction["HofstadterMURiddle"][3], Method -> "LinearEmbedding", VertexLabels -> "Name"]
Out[3]=

Make edges directed:

In[4]:=
GraphPlot[
    ResourceFunction["HofstadterMURiddle"][5], Method -> "RadialDrawing", VertexLabels -> None, DirectedEdges -> True]
Out[4]=

Choose other methods to get additional viewings of the graph:

In[5]:=
GraphPlot[
    ResourceFunction["HofstadterMURiddle"][4], Method -> "LayeredDigraphDrawing", VertexLabels -> "Name", DirectedEdges -> True]
Out[5]=
In[6]:=
GraphPlot[
    ResourceFunction["HofstadterMURiddle"][4], Method -> "SpringEmbedding", VertexLabels -> "Name", DirectedEdges -> True]
Out[6]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

License Information