Sequences

A sequence (or discrete signal) is a list of entries or terms (real numbers) that starts at one value and continues forever. For example, you may have constant sequences, e.g.,

$2, 2, 2, 2, 2, 2, 2, ...$

where each entry in the sequence is equal to a specific value, in this case $2$.

Another common sequence is an alternating sequence

$1, -1, 1, -1, 1, -1, 1, \cdots$

where the first entry is $1$ and each subsequent entry has the opposite sign of the previous entry.

This is actually a special case of a geometric sequence, which is of the form

$ar^0, ar^1, ar^2, ar^3, ar^4, ar^5, ar^6, \cdots$,

were $r$ is called the common ratio of the geometric sequence and $a$ is the initial entry. The alternating sequence is a geometric sequence where the common ratio is $-1$.

It is also possible to have a random sequence, where no information about the next entry can be determined from all previous entries in the sequence. One example of a random sequence generated by atmospheric noise is

$0.27831, 0.35915, 0.18250, 0.59663, 0.71712, 0.71166, 0.64239, 0.86004, 0.86837, 0.90174, \cdots$

and where the atmospheric noise could continue to be sampled one a second for all future time.

An arithmetic sequence is a sequence of the form

$a, a + d, a + 2d, a + 3d, a + 4d, a + 5d, a + 6d, \cdots$,

where $d$ is called the common ratio of the arithmetic sequence and $a$ is the initial entry. The simplest such sequence is when $a = 0$ and $d = 1$, yielding

$0, 1, 2, 3, 4, 5, 6, \cdots$,

Determining a geometric sequence

Given a sequence $a_0, a_1, a_2, a_3, \cdots$ and you know this sequence to be a geometric sequence, describe an algorithm for finding both $a$ and $r$.

Determining an arithmetic sequence

Given a sequence $a_0, a_1, a_2, a_3, \cdots$ and you know this sequence to be an arithmetic sequence, describe an algorithm for finding both $a$ and $d$.

Determining the form of a sequence

Given the first seven values of a sequence $a_0, a_1, a_2, a_3, a_4, a_5, a_6, \cdots$, describe an algorithm that determines whether or not these sequences appear to come from a geometric sequence, an arithmetic sequence, or neither.

de Bruijn sequences

An interesting class of sequences are de Bruijn sequences, which in its simplest form is a sequence of zeros and ones, where each sequence of $n$ digits appears exactly once in the sequence. For example, $0, 0, 1, 1; 0, 0, 1, 1$ contains $(0, 0)$, $(0, 1)$, $(1, 0)$ and $(1, 1)$. Another is $0, 0, 0, 1, 0, 1, 1, 1; 0, 0, 0, 1, 0, 1, 1, 1$ which contains $(0, 0, 0)$, $(0, 0, 1)$, $(0, 1, 0)$, $(0, 1, 1)$, $(1, 0, 0)$, $(1, 0, 1)$, $(1, 1, 0)$ and $(1, 1, 1)$, each exactly once.

Why start at zero?

We have described how the initial entry is $a_0$ as opposed to $a_1$. The justification for this is that the first entry is usually interpreted as the first reading when a system is turned on at time $t_0$. Usually, engineering systems will sample data periodically, so the entry $a_k$ will be sampled at time $t_0 + kT$ where $T$ is the time between samples.

Scalar multiplication and sequence addition

Like polynomials, given a sequence $x = (x_0, x_1, x_2, \cdots)$, we can multiply this sequence by a scalar $b$, so $bx = (bx_0, bx_1, bx_2, \cdots)$.

Similarly, given two sequences $x = (x_0, x_1, x_2, \cdots)$ and $y = (y_0, y_1, y_2, \cdots)$, we can define the sum of these two sequences as $x + y = (x_0 + y_0, x_1 + y_1, x_2 + y_2, \cdots)$.

Problems

If a geometric sequence $x$ is defined by the initial entry $a$ and the common ratio $r$, what are the initial entries and common ratio of $bx$ where $b$ is a scalar?

If an arithmetic sequence $y$ is defined by the initial entry $a$ and the common difference $d$, what are the initial entries and common differences of $by$ where $b$ is a scalar?

If $x$ and $y$ are sequences and each of these is data collected from separate sensors reading the same signal (say, for example, a satellite antenna). Can you calculate the average value of these two sequences using only scalar multiplication and sequence addition?