ArticleslgStudy

computer science

List update problem

List update problem is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand List update problem rather than just read about it. In short: The List Update or the List Access problem is a simple model used in the study of competitive analysis of online algorithms. Given a set of items in a list where the cost of accessing an item is proportional to its distance from the head of the list, e.g. a linked List, and a request sequence of accesses, the problem is to come up with a strategy of reordering the list so that the total cost of accesses is minimized.

Key takeaways

  • List update problem belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect List update problem to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of List update problem from memory before moving on to harder problems.

Reference excerpt

The List Update or the List Access problem is a simple model used in the study of competitive analysis of online algorithms. Given a set of items in a list where the cost of accessing an item is proportional to its distance from the head of the list, e.g. a linked List, and a request sequence of accesses, the problem is to come up with a strategy of reordering the list so that the total cost of accesses is minimized. The reordering can be done at any time but incurs a cost. The standard model includes two reordering actions:

A free transposition of the item being accessed anywhere ahead of its current position; A paid transposition of a unit cost for exchanging any two adjacent items in the list. Performance of algorithms depend on the construction of request sequences by adversaries under various adversary models An online algorithm for this problem has to reorder the elements and serve requests based only on the knowledge of previously requested items and hence its strategy may not have the optimum cost as compared to an offline algorithm that gets to see the entire request sequence and devise a complete strategy before serving the first request. Along with its original uses, this problem has been suggested to have a strong similarity to problems of improving global context and compressibility following a Burrows–Wheeler transform. Following this transform, files tend to have large regions with locally high frequencies, and compression efficiency is greatly improved by techniques that tend to move frequently-occurring characters toward zero, or the front of the "list". Due to this, methods and variants of Move-to-Front and frequency counts often follow the BWT algorithm to improve compressibility.

Adversary models An adversary is an entity that gets to choose the request sequence σ {\displaystyle \sigma } for an algorithm ALG. Depending on whether σ {\displaystyle \sigma } can be changed based on the strategy of ALG, adversaries are given various powers, and the performance of ALG is measured against these adversaries. An oblivious adversary has to construct the entire request sequence σ {\displaystyle \sigma } before running ALG, and pays the optimal offline price, O P T ( σ ) {\displaystyle OPT(\sigma )} which is compared against A L G ( σ ) {\displaystyle ALG(\sigma )}

An adaptive online adversary gets to make the next request based on the previous results of the online algorithm, but pays for the request optimally and online. An adaptive offline adversary gets to make the next request based on the previous results of the online algorithm, but pays the optimal offline cost.

Offline algorithms Competitive analysis for many list update problems were carried out without any specific knowledge of the exact nature of the optimum offline algorithm (OPT). There is an algorithm that runs in O(n2m(m-1)!) time and O(m!) space where n is the length of the request sequence and m is the length of the list. The best known optimal offline algorithm dependent on request sequence length runs in O(m^2(m−1)!n) time claimed by Dr Srikrishnan Divakaran in 2014. Paid transpositions are in general necessary for optimum algorithms. Consider a list (a,b,c) where a is at the head of the list, and a request sequence c,b,c,b. An optimal offline algorithm using only free exchanges would cost 9 (3+3+2+1), whereas an optimal offline algorithm using only paid exchanges would cost 8. So, we cannot get away with just using free transpositions for the optimum offline algorithm. The optimum list update problem was proven to be NP-hard by (Ambühl 2000).

Online algorithm An online algorithm ALG has a competitive ratio c if for any input it performs at least as good as c times worse than OPT. i.e. if there exists an α ≥ 0 {\displaystyle \alpha \geq 0} such that for all finite length request sequences σ {\displaystyle \sigma } , A L G ( σ ) − c . O P T ( σ ) ≤ α {\displaystyle ALG(\sigma )-c.OPT(\sigma )\leq \alpha } . Online algorithms can either be deterministic or randomized and it turns out that randomization in this case can truly help against oblivious adversaries.

Deterministic Most deterministic algorithms are variants of these three algorithms :

MTF (Move to front) After accessing an item move it to the front of the list without changing the order of other items TRANS (Transpose) After accessing an item, transpose it with the immediately preceding item. FC (Frequency Count) For each item maintain a frequency count of the number of accesses to it - when an element is accessed increase its frequency count and reorder the list in the decreasing order of frequencies. Observe that all these use just free transpositions. It turns out that both TRANS and FC are not competitive. In a classic result using Potential method analysis (Sleator & Tarjan 1985) proved that MTF is 2-competitive. The proof does not require the explicit knowledge of OPT but instead counts the number of inversions i.e. elements occurring in opposite order in the lists of MTF and OPT. Any deterministic algorithm has a lower bound of 2 − 2 l + 1 {\displaystyle 2-{\frac {2}{l+1}}} for a list of length l, and MTF is actually the optimum deterministic list update algorithm. The type of adversary doesn't matter in the case of deterministic algorithms, because the adversary can run a copy of the deterministic algorithm on their own to precompute the most disastrous sequence.

Randomized Consider the following simple randomized algorithm :

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with List update problem

Start with the simplest possible case. Write down what List update problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to List update problem before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about List update problem ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of List update problem

In research
List update problem appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses List update problem in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
List update problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Analysis of algorithms, Online algorithms, Randomized algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for List update problem outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study List update problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what List update problem means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain List update problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is List update problem in simple terms?

The List Update or the List Access problem is a simple model used in the study of competitive analysis of online algorithms. Given a set of items in a list where the cost of accessing an item is proportional to its distance from the head of the list, e.g. a linked List, and a request sequence of ac…

Why does List update problem matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study List update problem?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on List update problem.

Tags

  • Analysis of algorithms
  • Online algorithms
  • Randomized algorithms

Keep exploring