How is the term "sequence" defined?

119 Views Asked by At

In CodeChef (an online programming contest) I encountered a problem where they used the term "sequence of $N$ integers" and give the examples "3, 2, 4" and "3, 1, 3".

How can these be sequences? Am I missing something?

1

There are 1 best solutions below

4
On BEST ANSWER

It's a matter of definition. To quote Wikipedia (which, while not authoritative, does provide a nice and comprehensive overview of the subject):

For the purposes of this article, we define a sequence to be a function whose domain is an interval of integers. This definition covers several different uses of the word "sequence", including one-sided infinite sequences, bi-infinite sequences, and finite sequences (see below for definitions). However, many authors use a narrower definition by requiring the domain of a sequence to be the set of natural numbers. The narrower definition has the disadvantage that it rules out finite sequences and bi-infinite sequences, both of which are usually called sequences in standard mathematical practice.

Basically, some authors like to define the term "sequence" narrowly as having a definite beginning but no end, while others use the same term also for finite sequences with both a beginning and an end, or may even allow doubly infinite sequences that extend infinitely in both directions with neither a beginning nor an end. Sometimes, one might even encounter "sequences" with more complicated order types.

The narrow definition does have some advantages, particularly when dealing with things like the convergence and limits of sequences, which are have clear and universally agreed-upon definitions for infinite sequences, but may or may not even make sense when applied to finite sequences. But if one is not purely concerned with convergence and limits, there are many contexts where it makes sense to consider finite sequences as well. Of course, one could choose to use some other term for them, such as "tuple", but "sequence" is such a common and widely understood English word that it can seem a bit silly to avoid using it, in the whole scope of its common meaning, just because a certain subarea of mathematics has chosen to define it more narrowly.

Fortunately, in most cases it's perfectly obvious from context what kind of sequence is meant anyway. In particular, if you're given a finite sequence like $(1,2,3)$, it seems pretty pointless to complain that it cannot be a sequence because it's not infinite. Rather, you should just assume that the author is using the word "sequence" in the broader sense, and move on.