My question is quite naive...

I just want to represent a finite sequence of Natural number, is it the best way to write it like this?:

$\langle a_0, \ldots, a_n \rangle $, where $\forall i \in [ 0, n ], a_i \in \mathbb{N}$

I have also seen somewhere $\{ a_i \}$, does it mean a set (or a sequence) of variables? is it finite or infinite? where could i add the constraint like $\forall i \in [ 0, n ], a_i \in \mathbb{N}$?

Also, is there any difference between "tuple" and "sequence"?

Hope my question is clear, I just want to make sure what I write matches the convention...

Thank you very much


There are several usual notations:

  • Let $\bar a = \langle a_i\mid i<n\rangle \in \mathbb N^{<\mathbb N}$... (where $\mathbb N^{<\mathbb N}$ means the collection of all finite sequences of natural numbers, and $\mathbb N^\mathbb N$ is the collection of all infinite sequences)
  • Let $\bar a = \langle a_i\mid i<n\rangle$ be a finite sequence of natural numbers...

And you can always replace $\langle a_i\mid i<n\rangle$ by $\langle a_0,\ldots,a_{n-1}\rangle$.

Note that $[0,n]$ can be read as the real numbers between $0$ and $n$.

The important thing is to be clear in your intention, and consistent in your notation.

And lastly, the difference between a "tuple" and a "sequence" is the context, usually tuple is used for finite length, while sequence is for infinite ones. Also, tuples are usually for a constant length, while sequences are a variable length.

The notation $\{a_i\}$ means that this is a set whose elements are distinct. Naturally it says $i\in I$ for some index set $I$, which in turn might be that this is just a sequence (or a directed set). The meaning is usually clear from context, read more - a lot more - and things will slowly clarify.

  • $\begingroup$ Thanks for your reply. Does the $<\mathbb{N}$ mean in $\mathbb{N}^{<\mathbb{N}}$ "finite", so does $\mathbb{N}^{\mathbb{N}}$ mean "infinite"? $\endgroup$ – SoftTimur May 21 '11 at 16:26
  • $\begingroup$ Also, what could "$\{a_i\}$" mean in a normal context? $\endgroup$ – SoftTimur May 21 '11 at 16:39

Sometimes I see $a_1, a_2, ...$ without the brackets.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.