Mandelbrot problems

Oliver Knill,   November  10, 2013

NaturalGraph[R_,T_]:=Module[{y,VV=R,EE,r=Length[R],t=Length[T]},EE=Union[Flatten[Table[y=T[[k]][R[[j]]];If[R[[j]]==y,{},R[[j]]->y],{j,r},{k,t}]]]; UndirectedGraph[Graph[VV,EE]]];

Mandelbrot problem I

F[n_,a_,b_]:=NaturalGraph[Range[n]-1,{Function[x,Mod[a x + b,n]]}];
F[100,5,7]

M=20;MatrixPlot[Table[Length[ConnectedComponents[F[M,a,b]]],{a,M},{b,M}]]

Mandelbrot problem II

G[n_]:=NaturalGraph[Range[n]-1,{Function[x,Mod[3x+1,n]],Function[x,Mod[2x,n]]}];
S=G[101];GraphPlot[S]

Do[If[Not[ConnectedGraphQ[G[n]]],Print[n]],{n,100}]

Mandelbrot problem III

H[n_,a_,b_]:=NaturalGraph[Range[n-1],{Function[x,Mod[x^a,n]],Function[x,Mod[x^b,n]]}];
S=H[257,5,56];GraphPlot[S]

Mandelbrot problem IV

K[n_,A_]:=NaturalGraph[Map[(Partition[#,2]&),Tuples[Range[n]-1,4]],{Function[x,Mod[x.x+A,n]]}];
S=K[7,{{1,2},{4,4}}];GraphPlot[S]

Mandelbrot problem V

Mandelbrot5[n_,a_,b_]:=NaturalGraph[Tuples[{1,0},n],{Function[x,CellularAutomaton[a,x]],Function[x,CellularAutomaton[b,x]]}];
S=Mandelbrot5[8,2,110];GraphPlot[S]