Consider the simplest problem: search for a given element in a set of integers. If the numbers are given one by one (this is called an online problem), the obvious solution is to use sequential search. That is, we compare every element, and, in the worst case, we need comparisons (either it is the last element or it is not present). Under the traditional RAM model, this algorithm is optimal. This is the algorithm used to search in an unsorted array storing elements, and is advisable when is small or when we do not have enough time or space to store the elements (for example in a very fast communication line). Clearly, . If finding an element in any position has the same probability, then .