Competitive analysis
Difference between online (real-time) and offline algorithms:
- an online algorithm A executes the given operation without any knowledge of the future incoming operations
- an offline algorithm knows the whole sequence in advance
An online algorithm is -competitive if exists a constant such that for any incoming sequence of operations we have that where is the optimal offline algorithm.
Move to front heuristic
Self-organizing lists. Elements that are accessed frequently will be in front of the list. MTF algorithm is -competive with an offline algorithm (that’s good). In this video MTF is used to cache voxels in a rendering engine .