Question

Determine if each of the following recursive definition is a valid recursive definition of a function...

  1. 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.
    1. f(0) = 1, f(n) = -f(n-1) + 1 for n ≥ 1
    2. f(0) = 0, f(1) = 1, f(n) = 2f(n-1) +1 for n ≥ 1
    3. f(0) =0, f(n) = 2f(n-1) + 2 for n ≥ 1

Homework Answers

Answer #1

Proof is done using induction.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Which of the following proposed recursive definitions of a function on Z+ produce well-defined functions? If...
Which of the following proposed recursive definitions of a function on Z+ produce well-defined functions? If it is well-defined, provide a direct formula for F(n). Be sure to explain your answer, either why F is not well-defined, or why your direct formula is correct. (a) F(n) = 1 + F(bn/2c), for n ≥ 1, F(1) = 1 (b) F(n) = 2F(n−2) if n ≥ 3, F(2) = 1, F(1) = 0 (c) F(n) = 1 + F(n/2) if n is...
1. A function f : Z → Z is defined by f(n) = 3n − 9....
1. A function f : Z → Z is defined by f(n) = 3n − 9. (a) Determine f(C), where C is the set of odd integers. (b) Determine f^−1 (D), where D = {6k : k ∈ Z}. 2. Two functions f : Z → Z and g : Z → Z are defined by f(n) = 2n^ 2+1 and g(n) = 1 − 2n. Find a formula for the function f ◦ g. 3. A function f :...
Give a recursive algorithm to solve the following recursive function.    f(0) = 0;    f(1)...
Give a recursive algorithm to solve the following recursive function.    f(0) = 0;    f(1) = 1; f(2) = 4; f(n) = 2 f(n-1) - f(n-2) + 2; n > 2 Solve f(n) as a function of n using the methodology used in class for Homogenous Equations. Must solve for the constants as well as the initial conditions are given.
Question 4: The function f : {0,1,2,...} → R is defined byf(0) = 7, f(n) =...
Question 4: The function f : {0,1,2,...} → R is defined byf(0) = 7, f(n) = 5·f(n−1)+12n2 −30n+15 ifn≥1.• Prove that for every integer n ≥ 0, f(n)=7·5n −3n2. Question 5: Consider the following recursive algorithm, which takes as input an integer n ≥ 1 that is a power of two: Algorithm Mystery(n): if n = 1 then return 1 else x = Mystery(n/2); return n + xendif • Determine the output of algorithm Mystery(n) as a function of n....
a) Give a recursive algorithm for finding the max of a finite set of integers, making...
a) Give a recursive algorithm for finding the max of a finite set of integers, making use of the fact that the max of n integers is the larger of the last integer in the list and the max of the first n-1 integers in the list. Procedure power(x,n): If (n=0): return 1 Else: return power(x,n-1) · x b) Use induction to prove your algorithm is correct
Assumptions: The formal definition of the limit of a function is as follows: Let ƒ :...
Assumptions: The formal definition of the limit of a function is as follows: Let ƒ : D →R with x0 being an accumulation point of D. Then ƒ has a limit L at x0 if for each ∈ > 0 there is a δ > 0 that if 0 < |x – x0| < δ and x ∈ D, then |ƒ(x) – L| < ∈. Let L = 4P + Q. when P = 6 and Q = 24 Define...
QUESTION 1 For the following recursive function, find f(5): int f(int n) { if (n ==...
QUESTION 1 For the following recursive function, find f(5): int f(int n) { if (n == 0)    return 0; else    return n * f(n - 1); } A. 120 B. 60 C. 1 D. 0 10 points    QUESTION 2 Which of the following statements could describe the general (recursive) case of a recursive algorithm? In the following recursive function, which line(s) represent the general (recursive) case? void PrintIt(int n ) // line 1 { // line 2...
Using Windows 32 framework , write an assembly language program; Write a recursive procedure to find...
Using Windows 32 framework , write an assembly language program; Write a recursive procedure to find the greatest common divisor of two non negative numbers. You should use Euclidean algorithm and this is typically discussed in CSC 230. Your procedure: ❼ Needs to follow cdecl protocol. ❼ Needs to take two parameters. ❼ Should return -1, if the parameters are negative. ❼ Should return gcd, if the parameters are non negative. Your main procedure should do the followings. ❼ Read...
1. Use mathematical induction to show that, ∀n ≥ 3, 2n2 + 1 ≥ 5n 2....
1. Use mathematical induction to show that, ∀n ≥ 3, 2n2 + 1 ≥ 5n 2. Letting s1 = 0, find a recursive formula for the sequence 0, 1, 3, 7, 15,... 3. Evaluate. (a) 55mod 7. (b) −101 div 3. 4. Prove that the sum of two consecutive odd integers is divisible by 4 5. Show that if a|b then −a|b. 6. Prove or disprove: For any integers a,b, c, if a ∤ b and b ∤ c, then...
3. For each of the piecewise-defined functions f, (i) determine whether f is 1-1; (ii) determine...
3. For each of the piecewise-defined functions f, (i) determine whether f is 1-1; (ii) determine whether f is onto. Prove your answers. (a) f : R → R by f(x) = x^2 if x ≥ 0, 2x if x < 0. (b) f : Z → Z by f(n) = n + 1 if n is even, 2n if n is odd.