Merge branch 'master' of ssh://server.philosophy.fas.nyu.edu/Users/lambda/lambda
[lambda.git] / week3.mdwn
index 42f65d6..fe7c315 100644 (file)
@@ -1,5 +1,28 @@
+Even with a fold-based representation of numbers, and pred/equal/subtraction, some computable functions are going to be out of our reach.
 
-How to do with recursion with omega.
+Fibonacci: doable without Y, but takes some ingenuity
+
+And so on...
+
+Need a general method, where f(n) doesn't just depend on f(n-1) or (f(n-1),f(n-2),..).
+
+Looks like Ackermann function is simplest example that MUST be done with Y, Everything simpler could be done using only fixed iteration limits.
+
+A(y,x) =
+       | when x == 0 -> y + 1
+       | when y == 0 -> A(x-1,1)
+       | _ -> A(x-1, A(x,y-1))
+
+A(0,y) = y+1
+A(1,y) = y+2
+A(2,y) = 2y + 3
+A(3,y) = 2^(y+3) -3
+A(4,y) = 2^(2^(2^...2)) [y+3 2s] - 3
+
+
+Some algorithms can also be done more efficiently / intelligibly with general mechanism for recursion.
+
+How to do recursion with omega.
 
 fixed point combinators