PrimeryMetod Gauss - Jordan to solve systems of linear algebraic equations is a recursive acronym. Factorial of a nonnegative number n is denoted n! and is defined as for n> 0 and n! = 1 if n = 0
Fibonacci numbers are defined using the recurrence relations:
The first and second Fibonacci numbers are 1
For n> 2, n - e Fibonacci number is the sum (n - 1) th and (n - 2) th Fibonacci numbers
Almost all geometric fractals are defined in the form of an infinite recursion. (eg Sierpinski triangle).
Target "Hanoi Towers". Its content production is as follows:
In one of the Buddhist monasteries of the monks a thousand years of dealing with a shifting of the rings. They have three pyramids in which wearing the ring in different sizes. In the initial state of 64 rings were put on the first pyramid and sorted by size. Monks must pass all the rings from the first pyramid to the second, fulfilling the only condition - you can not put a ring on the ring of smaller size. When you shift, you can use all three pyramids. Monks shift one ring per second. Once they complete their work, the end of the world.
Recursive solution to the problem can be described as follows:
Algorithm for the movement of the tower, the algorithm will move the required number of disks from the pyramid "source" in the pyramid "job" using the "emergency" pyramid.
If the number of disks is equal to one, then:
Move the disc from the source to the job
Otherwise:
Recursively move all the disks except the one source of supply through the job as a stock
Move the remainder of the disc from the source to the job
Move all the disks from the reserve in the task using as a source of supply