Sequences

From Objective Mathematics
Revision as of 06:29, 20 January 2024 by Lfox (talk | contribs)
Jump to navigation Jump to search

A sequence is a function which takes natural numbers as inputs, and returns numbers as outputs.

The Cauchy condition

Suppose that is a sequence that computes π.

The practical question to answer, for someone computing this sequence on a computer, is "after how many steps can I stop running the computer program?" The answer is that you should wait until successive steps of the sequence vary by amounts smaller than your desired accuracy.

For example, if your target accuracy is 0.01, and if the printout looks like

1 4
2 3.0
3 3.2
4 3.09
5 3.16
6 3.139
7 3.143
8 3.1408
9 3.1419
10 3.14149
... ...

then we can stop computing around step 9, because at that point the output of the programming is varying by amounts much smaller than 0.01.

What I have done in the above paragraph is I have inadvertently assumed that the sequence satisfies the Cauchy condition. A sequence is said to satisfy the Cauchy condition if, for any level of desired accuracy, there is some point beyond which any two outputs of the algorithm differ by an amount smaller than the desired accuracy. More formally, satisfies the Cauchy condition if for any such that there exists an such that if then .

Examples

The sequence could be properly thought of as that concept which---in appropriate contexts---subsumes the following concretes:

  • the method that a child uses to produce the nth odd number
  • a C++ program which takes in a uint32, n, and outputs 2n+1
  • the following table on my screen [a screenshot of a few rows of an excel table where the entries are 2*row + 1 ]
  • etc.