Determine whether each of these proposed definitions is a va
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.
Which one is Correct
The basis conditions specify f(0) and f(1), and the recursive step gives f(n) in terms of f(n ? 1) for n ? 2, so this is a valid definition.
The basis conditions specify f(0) and f(1), and the recursive step gives f(n) in terms of f(n + 1) for n ? 2, so this is a invalid definition.
The basis conditions specify f(0) and f(1), and the recursive step gives f(n) in terms of f(n + 1) for n ? 2, so this is a valid definition.
The basis conditions specify f(0) and f(1), and the recursive step gives f(n) in terms of f(n ? 1) for n ? 2, so this is an invalid definition.
| The basis conditions specify f(0) and f(1), and the recursive step gives f(n) in terms of f(n ? 1) for n ? 2, so this is a valid definition. | |
| The basis conditions specify f(0) and f(1), and the recursive step gives f(n) in terms of f(n + 1) for n ? 2, so this is a invalid definition. | |
| The basis conditions specify f(0) and f(1), and the recursive step gives f(n) in terms of f(n + 1) for n ? 2, so this is a valid definition. | |
| The basis conditions specify f(0) and f(1), and the recursive step gives f(n) in terms of f(n ? 1) for n ? 2, so this is an invalid definition. |
Solution
The basic conditions specify f(0) and f(1) and the recursive step gives f(n) in terms of f(n-1) for n>2. So this is a valid function.
