Result of McCarthy's Transformation

f(N) = g(N,0,1,0);

g(N,K,F,G) Þ !(K < N)? F;

g(N,K,F,G) Þ g(N,K+1,F+G,F);

f(6) Þ g(6,0,1,0)

     Þ g(6,1,1,1)

     Þ g(6,2,2,1)

     Þ g(6,3,3,2)

     Þ g(6,4,5,3)

     Þ g(6,5,8,5)

     Þ g(6,6,13,8)

     Þ 13

 

To Next Slide To Previous Slide To Contents