Models of Computation - Mathematics 352 -
Fall 2009
For HW #8
Define f(x,y) as x-y when x is greater than or equal to y, and undefined
otherwise.
Prove f is computable.
Is f primitive recursive? Explain.
Define f(n) as follows:
f(0) = 1;
f(n) = f(0) + f(1) + ... + f(n-1) if n > 0.
Find f(100). (Use a spreadsheet or Mathematica or any other
software you'd like, or write a program in URM language or C or Java or any
other language you'd like!)
Prove that f is computable.
Is f primitive recursive? Explain.
Define f(n) as follows:
f(0) = f(1) = f(2) = 1;
f(n) = f(n-1) + f(n-2) + f(n-3), for n > 2.
Prove that f is
computable. (Hint: look at the Fibonacci exercise in the book.)
Is f primitive recursive? Explain.
Define f(n) as follows: f(0) = 1; f(n) = (n)f(0) + (n+1)f(1) +
(n+2)f(2) + ... + (n+n-1)f(n-1) if n > 0.
Find f(30). (Use a spreadsheet or Mathematica or any other
software you'd like, or write a program in URM language or C or Java or
any other language you'd like!)
Prove that f is computable. (Hint: Let g(n) = 2^f(0) 3^f(1) ... p(n+1)^f(n),
where p(n+1) denotes the (n+1)th prime number. First show g
is computable. Then show f is computable.)