In: Computer Science
Determine if each of the following recursive definition is a valid recursive definition of a function f from a set of non-negative integers. If f is well defined, find a formula for f(n) where n is non-negative and prove that your formula is valid.
f(0) = 1, f(n) = -f(n-1) + 1 for n ≥ 1
f(0) = 0, f(1) = 1, f(n) = 2f(n-1) +1 for n ≥ 1
f(0) =0, f(n) = 2f(n-1) + 2 for n ≥ 1