A common approach in computer science to problem solving is

*offline*computation. This means that the whole problem data is given from the beginning and one is required to output an answer which solves the problem in hand.

Other problems, however, are *online*. This means the whole dataset is not available and the algorithm receives the information piece by piece. This domain is called *online algorithms and computation*. It is often studied in machine learning.

As an example of the problem consider the problem of finding a shortest path in a finite connected graph when the graph is unknown and the algorithm receives the node neighbours only when it "enters" the node. It is clear that this problem can not be solved optimally without a simple exhaustive search. Thus, new performance measures have to be introduced, such as competitive analysis.