I was wondering anyone knew how to figure these problems out.
To, me it is hard and I really need this done by Sunday morning. If possible please reply, thanks!
1. Construct a recursive definition , where all variables are natural numbers.
f(n, k) = k + (k + 1) + (k + 2) + ... + (k + n).
2. Construct a recursive function definition for the following string functions for strings over the alphabet {a, b}.
f(x) = x, y, where y is the reverse of x.
3. Construct a recursive definition for each of the following functions that involve lists. Use the infix form of cons in the recursive part of each definition. In other words, write h ::t in place of cons(h,t).
(1, n = subscripts)
f(a, (<x1, y1),...(xn, yn)>) = <(x1 + a, y1), ..., (xn + a, yn)>