Zum Inhalt springen

Explicit and recursive description – Serlo

Aus Wikibooks

In order to define a sequence, one must fix a rule which assigns to each index an element. This rule of construction can be explicit, meaning it is directly stated which element is to be assigned to an index. However, there are also recursive rules, where for a given amount of elements it is stated how the next element has to look like. The recursive rule also fixes what all elements are (provided that some starting elements are given), although it may not be clear what the element assigned to a specific index looks like. In order to find this out, we need to translate the recursive into an explicit rule.

Explicit rules

[Bearbeiten]

An explicit rule provides for any given index the corresponding sequence element . Explicit rules are hence usually written down as follows: For all there is


An example is the rule for all , which defines the sequence of square numbers. It can be written down as follows:

An explicit rule characterized by the fact that the individual sequence elements can be calculated without having to know other sequence elements. So if you want to calculate a certain sequence element, you only have to insert the desired index into the formula of the explicit rule and calculate the value given by the formula.

Question: What are the explicit formulas for the following sequences?

  1. Sequence of cubic numbers
  2. Sequence of odd numbers
  3. Sequence of powers of

Solution:

  1. for all
  2. for all
  3. for all

Recursive rules

[Bearbeiten]

A recursive law is characterized by the fact that you have to know the preceding sequence elements in order to compute a new element. You can easily spot a recursive law when taking a look at the formula: it always contains preceding sequence elements. In general, a real-valued sequence is recursively defined as follows:

Since predecessors have to be known in order to get a new sequence element, one needs to state what the first element is / the first elements are. Otherwise, there is not element to begin with. The above is this first element. An example for a recursive law is:

The formula defines the first sequence element and is called recursion base. The second formula is called recursion step and specifies haw new elements are computed from known predecessors. The first recursion steps applied read as follows:

Recursive laws for sequences are usually easier to find than explicit ones. However, with explicit rules given, the characteristics of a sequence are usually easier to read off than with recursively rules given. The calculation of sequence elements is also easier with explicit rules. Suppose we want to calculate the -th sequence element. With an explicit rule we can insert directly into the given formula. With a recursive rule, we first have to calculate all unknown predecessors.


Question: Why does stating for all not uniquely define a sequence ?

The recursion base is missing. Depending on what we plug in as the base case , we get a lot of distinct sequences. For instance, with we get the sequence and for we get the sequence . Both sequences satisfy for all , but they are distinct. It is always important to state what the first element is in order to get a unique sequence out of a recursive rule.

Further remarks

[Bearbeiten]

If the rule how to get the sequence is particularly simple, sometimes only the first elements of a sequence are written down and the reader is left with the task of finding the rule (which is a trivial task). An example is:

But this definition of a sequence has the disadvantage that it is not unique. It is not clearly defined, how such a sequence has to be continued. Rather there is to assume, that every reader continues the sequence in the same way. Thus the above way to state a sequence is not a mathematically exact definition!

Furthermore there are construction rules, which can be given by an algorithm, but for which neither explicit nor recursive rules are known so far. An example is the sequence of prime numbers . It is possible to specify an algorithm, which calculates all prime numbers one after the other (for example with the help of the Sieve of Eratosthenes). But there is no explicit or recursive formation law of this sequence known.

Examples for constructing sequences

[Bearbeiten]

Example (Directly computing a term (explicit rule))

We define a sequence in by for all . Instead of we write .

Example (Computing an element based on its predecessors (recursive rule))

We define the sequence in by and for all we set . This is a recursion rule for the sequence .

If we were to compute the -th element, we could first compute using . Then we would compute based on by the formula . This is done step by step until we reach . So the above rule uniquely specifies a sequence.

Example (Sequence of prime numbers)

Let the sequence in be defined as the ascending sequence of prime numbers, i.e. for all and has to be the set of primes.

This definition sounds very abstract and it is not clear how to calculate a certain sequence element. Nevertheless it defines a sequence unambiguously. This is shown by the following consideration:

The set of all prime numbers is a subset of natural numbers. So we can order the prime numbers by size and number them consecutively. Since there are infinitely many prime numbers, every natural number is uniquely associated with a prime number , so that is valid for all and for every prime number there is a with .

More complex examples

[Bearbeiten]

Example (Sequence of positive zeros of polynomials)

For all we define the function . For all there is exactly one positive number , so that . We hence get a sequence .

Of course we have to show that is well-defined. So we have to show that for all there is exactly one with . One can use the intermediate value theorem and a monotonicity rule for the derivation to show this.

Although we cannot give a function term which allows to compute directly, we have a well-defined sequence here. By the way, without noticing it, we have defined a sequence of functions .

Example (Sequence of prime numbers (algorithm))

For the sequence of prime numbers there are construction rules explicitly given by an algorithm. For example, with the help of the Sieve of Eratosthenes all prime numbers can be calculated successively. But there is no explicit or recursive construction rules of this sequence known so far.

Example (Conway-sequence (algorithm))

The Conway-sequence is also given by an algorithm. A sequence element is calculated from the previous sequence element as follows:

You set . Each sequence element is a sequence of digits, which are not separated by a comma. For example .

Let be given for a . Now we write down how often a digit occurs in before (read from left to right) another digit occurs. In the case we write: times a , then times a and then times a .

The sequence element consists of the sequence of the digits, which we just noted down from . For this means .

See also the Wikipedia article about the Conway sequence (Look-and-say-sequence).

Finding rules

[Bearbeiten]

Sometimes one is faced with the task of finding construction rules for sequences for which the first elements have been given as examples. For instance, one could be interested in n explicit or recursive for the following sequence:

Where does such a problem play a role? First of all, it is a popular problem type given by teachers to students when they introduce the sequence term in class. As a student you can improve your ability to recognize patterns and express them through mathematical functions.

But mathematicians also encounter such a problem. It is sometimes possible to calculate the first sequence elements of a sequence without knowing a rule. The mathematician then tries to guess a construction rule from these sequence elements. Then he can try to prove that this construction rule really describes the sequence he is looking for. Of course, this strategy is not always successful, but often leads to the goal.

Remarks

[Bearbeiten]

Construction rules like the one above, which only state the first sequence elements, are not unique. There is nowhere defined, how the reader has to continue the sequence. In this respect there is also no unique construction rule which solves the problem of continuing the started sequence. One can even show that there are always infinitely many construction rules, whose sequence has the given few elements as first sequence elements. Therefore one only looks for a possible construction rule. This rule should be as simple as possible. However, what a "simple" construction rule is, is again a subjective question where people agree about in many but not all cases.

In addition there is no standard way to solve the continuation problem. Here you have to puzzle (sometimes for a long time) and try a lot. In this respect, it is completely normal if you have problems finding a construction rule. The more experience you gain with sequences, the easier you will be able to solve such problems.

General procedure

[Bearbeiten]

Regardless of whether one wants to find a recursive or an explicit construction rule, the following approach is recommended:

  1. Identify a pattern in the sequence. For this, one should first ask oneself what the next sequence elements should be. Once you have found them, you can then ask yourself why they have to be these sequence elements. The answer to this question is then the pattern of the sequence elements.
  2. Express the found pattern by a mathematical function. If an explicit rule of construction is required, it must be a function of the form , while in case of recursive rules of construction you are looking for an assignment rule of the form


Finding the explicit rule

[Bearbeiten]

The goal here is to find a construction rule of the form , which assigns elements to indices. Let's try to find an explicit rule for the example:

Which means, we need a function (as simple as possible) which satisfies:

So the function must map the number to , to and so on. You might have recognized already, that the elements are always the squares of their indices. So it is possible, that the next elements are the numbers , and so on.

The mathematical expression for square numbers is . Accordingly, the simplest explicit law is .

Finding the recursuve rule

[Bearbeiten]

Recursive construction rules describe how a sequence element is computed from its predecessors. A recursive rule is often composed of the recursion base and the recursion step . So here you look for a function , which allows to calculate based on and .

In our example, the base case of the recursion is already known: . For the recursion step we now look for a function, which has the following mappings:

It is not obvious what this mapping is. Maybe, on a second glance one can see that the difference is always an odd number:

2 1 4 3
3 4 9 5
4 9 16 7
5 16 25 9

For we have the odd number , for the odd number and so on. These odd numbers can now be expressed by . The difference is equal to . Thus we get , or equivalently:

But now we want to have a recursion step of the form . So let us use the number instead of in the above equation. Every natural number greater than or equal to 2 can be represented as the sum , where is the predecessor of (this is just an index shift). We obtain:

Now we can again use instead of . Finally, the recursive formation reads: