Finding Formula for recursive definitions

In summary, this person is stuck on proving a recursive definition for a function from the set of nonnegative integers to the set of integers. They have an explicit formula for the function, but they need to use induction to prove it.
  • #1
caseyd1981
10
0
This is the last part of the problem and I just can not figure out a formula for it. Here is what the question asks:

Determine whether each of these proposed definitions is a valid recursive definition of a function f from the set of nonnegative integers to the set of integers. If f is well defined, find a formula for f(n) when n is a nonnegative integer and prove that your formula is valid.

I'm stuck on part e:

f(0) = 2, f(n) = f(n - 1) if n is odd and n >= 1 and f(n) = 2f(n - 2) if n >=2


I've worked through f(0) - f(9) and I get 2, 2, 4, 4, 8, 8, 16, 16, 32, 32. I just can't seem to figure a formula for this. Any help, much appreciated!
 
Physics news on Phys.org
  • #2
Are you sure that you have written the definition of the function correctly?
In particular, it seems that the second part should say that f(n) = 2f(n - 2) if n is even and n >= 2.
 
  • #3
Yes, that is correct. I noticed that too but I typed it exactly the way my book did.
 
  • #4
Have you defined a floor function? Something like [x]=greatest integer less than or equal to x? That would help you to write it concisely. [n/2] has something in common with your function.
 
  • #5
It looks to me like this might work as a non-recursive definition for your function:
f(x) = 2^[itex]\left\lfloor(x + 2)/2 \rfloor\right[/itex]

The L-shaped brackets indicate the greatest integer function, which is the greatest integer that is less than or equal to what's inside the brackets.

If the expression in the exponent is an integer, the greatest integer function evaluates to that integer. If the exponent is a non-integer, the greatest integer function essentially chops off the fractional part. For example, the greatest integer in 1 is 1. The greatest integer in 1.5 is 1.

Using the formula above as a check, f(0) = 2^[itex]\left\lfloor(0 + 2)/2 \rfloor\right[/itex]
= 2^1 = 2
f(1) = 2^[itex]\left\lfloor(1 + 2)/2 \rfloor\right[/itex]
= 2^[itex]\left\lfloor(3)/2 \rfloor\right[/itex] = 2^1 = 2

f(2) = 2^[itex]\left\lfloor(2 + 2)/2 \rfloor\right[/itex] = 2^2 = 4
f(3) = 2^[itex]\left\lfloor(3 + 2)/2 \rfloor\right[/itex] = 2^[itex]\left\lfloor 5/2 \rfloor\right[/itex] = 2^2 = 4
 
  • #6
That is it! Thank you all very much.

Ok, now I need to prove the formula using induction. Kind of stuck there too...?
 
  • #7
Hello,

I'm in a class that uses the same textbook as caseyd1981. I'm working on this exact same problem. Through looking at relationships between powers of 2 and values of n, I've come up with an explicit formula:
f(n) = [itex] \left\lceil(n + 1)/2 \rceil\right [/itex]

Now, I need to prove it using induction (I'm not sure whether it needs to be mathematical induction or strong induction).

So far, I have this:
Basis case:
f(1) = 2^[itex] \left\lceil(1 + 1)/2 \rceil\right [/itex] = 2^[itex] \left\lceil(2)/2 \rceil\right [/itex] = 2^1 = 2.
Inductive hypothesis:
if f(n) = 2^[itex] \left\lceil(n + 1)/2 \rceil\right [/itex], then f(n+1) = 2^[itex]\left\lceil((n + 1) + 1) / 2\rceil\right [/itex].

However, I'm stuck here, as I don't know how to incorporate the inductive hypothesis f(n) = [itex] \left\lceil(n + 1)/2 \rceil\right [/itex] into f(n+1) = 2^[itex]\left\lceil((n + 1) + 1) / 2\rceil\right [/itex].

Anyone have any suggestions? Thanks for your time!
 
Last edited:

FAQ: Finding Formula for recursive definitions

What is a recursive definition?

A recursive definition is a mathematical definition that is defined in terms of itself. This means that the definition refers back to itself in order to fully define the concept.

Why is it important to find the formula for a recursive definition?

Finding the formula for a recursive definition allows us to understand the behavior and patterns of a sequence or function. It also allows us to make predictions and calculations based on the recursive definition.

How do you find the formula for a recursive definition?

To find the formula for a recursive definition, we typically start by identifying the initial term(s) and the recursive rule. We then use algebraic manipulation and substitution to solve for the general term in terms of the initial term(s) and the recursive rule.

What challenges can arise when finding the formula for a recursive definition?

One challenge that can arise is identifying the correct initial term(s) and recursive rule. Another challenge is ensuring that the recursive definition is well-defined and does not lead to infinite loops or undefined values.

Can the formula for a recursive definition be unique?

No, the formula for a recursive definition is not always unique. Different initial term(s) and recursive rules can lead to different formulas. Additionally, some recursive definitions may have multiple or even infinitely many formulas that satisfy the definition.

Similar threads

Replies
11
Views
881
Replies
1
Views
947
Replies
3
Views
1K
Replies
3
Views
1K
Replies
1
Views
922
Replies
14
Views
8K
Back
Top