Introduction

This Mathematica notebook is licensed under a MouseOver .

It provides software for producing the endograph of finite functions.  MouseOver gives a definition of endograph.

The notebook is still rough and incomplete.  It will be revised from time to time.  I hope anyone interested will feel free to improve this work and to use it in their own publications and coursework.

Definitions

SetOptions[Plot, AspectRatio -> Automatic]; rucat
tf := TableForm; tx := TeXForm; hh := Hold; 
  ss := Simplify; 
tt[x_] :=TraditionalForm[x]; 
  mf := MatrixForm;

RuleGraph[r_]:=GraphPlot[r,VertexLabeling->True, DirectedEdges->True,EdgeRenderingFunction->(Arrow[#1,0.1]&),PlotStyle->{Directive[Arrowheads[0.02]],Thickness[0.003]},VertexRenderingFunction->(Text[Style[#2,16,Bold],#1]&),ImageSize->Large]

MakeFunctionRule[f_,n_]:=#->f[#]&/@ Table[k,{k,0,n-1}]

FunctionGraph[x_,n_]:=RuleGraph[MakeFunctionRule[x,n]]

Examples

ru1:={"a"->"a","c"->"d","b"->"c","d"->"a","e"->"d","f"->"e","g"->"b","h"->"d","i"->"h","j"->"e"}

ru1

RuleGraph[ru1]

g[n_]:=Mod[n^2+1,13]

MakeFunctionRule[g,13]
{0->1,1->2,2->5,3->10,4->4,5->0,6->11,7->11,8->0,9->4,10->10,11->5,12->2}

RuleGraph[MakeFunctionRule[g,13]]

h[n_]:=Mod[n^9,11]

MakeFunctionRule[h,11]
{0->0,1->1,2->6,3->4,4->3,5->9,6->2,7->8,8->7,9->5,10->10}

RuleGraph[MakeFunctionRule[h,11]]

k[n_]:=Mod[n^9+n^7+5n,11]

FunctionGraph[k,11]

s[n_]:=Mod[(n+1)^9+n^7+5n,11]

FunctionGraph[s,11]

aaa[n_]:=Mod[(n+1)^9+(n^+2)^7+5n,11]

FunctionGraph[aaa,11]

bbb[n_]:=Mod[n^2+5,11]

FunctionGraph[bbb,11]

ccc[n_]:=Mod[n^3+5,11]

FunctionGraph[ccc,11]

ddd[n_]:=Mod[n^3+n^2,11]

FunctionGraph[ddd,11]

Remove[g]

g[n_]:=Mod[n^2+1,11]

FunctionGraph[g,11]

gg[x_]:=g[g[x]]

FunctionGraph[gg,11]

ggg[x_]:=g[g[g[x]]]

FunctionGraph[ggg,11]

ht[n_]:=Mod[n^(11),13]

FunctionGraph[ht,13]

htx[n_]:=Mod[n^(11)+n^9+n^7+1,13]

htx[11]

FunctionGraph[htx,13]

Table[{n,htx[n]},{n,0,12}]//tf
({{0, 1}, {1, 4}, {2, 11}, {3, 1}, {4, 1}, {5, 9}, {6, 11}, {7, 4}, {8, 6}, {9, 1}, {10, 1}, {11, 4}, {12, 11}})

fbig[0]:=5;fbig[1]:=2;fbig[2]:=13;fbig[3]:=4;fbig[4]=14;fbig[5]:=6;fbig[6]:=7;fbig[7]:=8;fbig[8]:=9;fbig[9]:=10;fbig[10]:=5;fbig[11]:=2;fbig[12]:=2;fbig[13]:=14;fbig[14]:=7;

FunctionGraph[fbig,15]

Composites of functions

ff["a"]:="a";ff["c"]:="d";ff["b"]:="c";ff["d"]:="a";ff["e"]:="d";ff["f"]:="e";ff["g"]:="b";ff["h"]:="d";ff["i"]:="h";ff["j"]:="e";
ff["c"]
"d"
ru2:=#->ff[#]&/@{"a","b","c","d","e","f","g","h","i","j"}
RuleGraph[ru2]

ru3:=#->ff[ff[#]]&/@{"a","b","c","d","e","f","g","h","i","j"}
RuleGraph[ru3]

GraphPlot[#->ff[ff[ff[#]]]&/@{"a","b","c","d","e","f","g","h","i","j"},VertexLabeling->True, DirectedEdges->True,EdgeRenderingFunction->(Arrow[#1,0.1]&),PlotStyle->Directive[Arrowheads[0.02]],VertexRenderingFunction->(Text[#2,#1]&),ImageSize->Large]

GraphPlot[#->ff[ff[ff[ff[#]]]]&/@{"a","b","c","d","e","f","g","h","i","j"},VertexLabeling->True, DirectedEdges->True,EdgeRenderingFunction->(Arrow[#1,0.1]&),PlotStyle->Directive[Arrowheads[0.02]],VertexRenderingFunction->(Text[#2,#1]&),ImageSize->Large]

Sestina example

ee[0_,n_]:=n; ee[k_,n_]:=If[EvenQ[k],k/2,n-(k-1)/2]

ff[k_]:=ee[k,6]

Table[{k,k//ff,k//ff//ff},{k,1,6}]//TableForm

Composition

Permutations

Inclusions

Involutions

Idempotents