Computer Science, asked by moa711778, 5 days ago

Perform Dry run for Recursive Power Function also calculate its recursive equation while x=3, y=5​

Answers

Answered by rudranshd912010
0

Answer:

RECURSION AND RECURSIVE FUNCTIONS

Recursion is a general problem solving technique. It is very precise. Most freshmen students find it very hard to understand, track and master. Recursion is the most important tool for computer scientists and computer engineers. The main downside of recursion is that incurs a lot of runtime overhead and memory space. However there are many problems for which it is not easy to devise a non-recursive solution.

RECURSIVE CALCULATION OF FACTORIAL

Factorial of 5 and 6 are shown below’

  • 5! = 5 4 3 2 1 6! = 6 5 4 3 2 1 = 6 (5 4 3 2 1) = 6 (5 !)

We notice that six factorial is six times five factorial. When one sees a small part inside a big part then it is a clue that tells one that the calculation can be done recursively. A recursive definition of factorial is shown below:

n! = 1 if n = 0, 1 //Basis

= n (n-1)! for n > 1 // Induction

In this definition, there are two parts- A basis, where the value is specified explicitly and an inductive part where a functional value is specified in terms of itself.

Similar questions