ArticleslgStudy

engineering

Iacono's working set structure

Iacono's working set structure is a engineering 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 Iacono's working set structure rather than just read about it. In short: In computer science, Iacono's working set structure is a comparison based dictionary. It supports insertion, deletion and access operation to maintain a dynamic set of n elements.

Iacono's working set structure — main illustration
Iacono's working set structure — illustration

Key takeaways

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

Reference excerpt

In computer science, Iacono's working set structure is a comparison based dictionary. It supports insertion, deletion and access operation to maintain a dynamic set of n elements. The working set of an item x is the set of elements that have been accessed in the structure since the last time that x was accessed (or inserted if it was never accessed). Inserting and deleting in the working set structure takes O(log⁡n) time while accessing an element x takes O(log⁡w(x)). Here, w(x) represents the size of the working set of x.

Structure

To store a dynamic set of n elements, this structure consists of a series of Red–black trees, or other Self-balancing binary search trees T1,T2,…,Tk, and a series of deques (Double-ended queues) Q1,Q2,…Qk, where k=⌈log⁡log⁡n⌉. For every 1≤i≤k, tree Ti and deque Qi share the same contents and pointers are maintained between their corresponding elements. For every i<k, the size of Ti and Qi is 22i. Tree Tk and deque Qk consist of the remaining elements, i.e., their size is n−∑i=1k−122i. Therefore, the number of items in all trees and the number of elements in all deques both add up to n. Every element that has been inserted in the data structure is stored in exactly one of the trees and its corresponding deque.

Working set Invariant In the deques of this structure, elements are kept in sorted order according to their working set size. Formally, element x lies after y in deque Qi if and only if w(x)<w(y). Moreover, for every 1≤i<k, the elements in deque Qi have a smaller working sets than the elements in deque Qi+1. This property is referred to as the Working set invariant. Every operation in the data structure maintains the Working set invariant.

Operations The basic operation in this structure is called shift from h to j, where h and j are indices of some trees in the structure. Two cases are considered in a shift from h to j: If h<j, then for every h≤i<j, taken in increasing order, an item is dequeued from Qi and enqueued into Qi+1. The corresponding item is deleted from Ti and inserted into Ti+1. The running time of this operation is O(∑i=hjlog⁡|Ti|)=O(∑i=hjlog⁡22i)=O(2j). Analogously, if j<h, then for every j<i≤h, taken in decreasing order, an item is dequeued from Qi and enqueued into Qi−1. The corresponding item is deleted from Ti and inserted into Ti−1. The running time of this operation is O(∑i=jhlog⁡|Ti|)=O(∑i=jhlog⁡22i)=O(2h). Regardless of the case, after a shift operation, the size of Th decreases by one whereas the size of Tj increases by one. Since that elements in the deques are sorted with respect to their working sets sizes, a shift operation maintains the Working set invariant.

Search To search for an element x, search for x in T1,T2,…Tk, in increasing order, until finding a tree Tj containing x. If no tree is found, the search is unsuccessful. If x is found, it is deleted from Tj and then inserted into T1, i.e., it is moved to the front of the structure. The search finishes by performing a shift from 1 to j which restores the size of every tree and every deque to their size prior to the search operation. The running time of this search is O(∑i=1jlog⁡22i)=O(2j) if the search was successful, or O(∑i=jklog⁡22i)=O(2k)=O(log⁡n) otherwise. By the Working set property, every element in trees T1,T2,…,Tj−1 belongs to the working set of x. In particular, every element in Tj−1 belongs to the working set of x and hence, w(x)>|Tj−1|=22j−1. Thus, the running time of a successful search is O(2j)=O(log⁡22j−1)=O(log⁡w(x)).

Insert Inserting an element x into the structure is performed by inserting x into T1 and enqueuing it into Q1. Insertion is completed by performing a shift from 1 to k. To avoid overflow, if |Tk|=22k before the shift, i.e., if the last tree is full, then k is incremented and a new empty Tk and Qk is created. The running time of this operation is dominated by the shift from 1 to k whose running time is O(2k)=O(2log⁡log⁡n)=O(log⁡n). Since element x, whose working set is the smallest, is enqueued in Q1, the Working set invariant is preserved after the shift.

Delete Deleting an element x is done by searching for x on each tree in the structure, in increasing order, until finding a tree Tj that contains it (if non is found the deletion is unsuccessful). Item x is deleted from Tj and Qj. Finally, a shift from k to j maintains the size of Tj equal to 22j. The running time of this operation is O(2k)=O(log⁡n). The working set invariant is preserved as deleting an element does not change the order of the working set of the elements.

Discussion Splay trees are self adjusting search trees introduced by Sleator and Tarjan in 1985. Using restructuring heuristic, splay trees are able to achieve insert and delete operations in O(log⁡n) amortized time, without storing any balance information at the nodes. Moreover, the Working Set Theorem for splay trees states that the cost to access an element in a splay tree is O(log⁡w(x)) amortized. Iacono's workings set structure obtains the same running time for search, insert and delete in the worst-case. Therefore, offering an alternative to splay trees.

References

Worked examples

Example 1 — a first encounter with Iacono's working set structure

Start with the simplest possible case. Write down what Iacono's working set structure claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, 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 Iacono's working set structure 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 Iacono's working set structure 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 Iacono's working set structure

In research
Iacono's working set structure appears in engineering 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 Iacono's working set structure 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
Iacono's working set structure is common in secondary-school and first-year university syllabi. It links to neighbouring topics Trees (data structures), so understanding it makes those chapters shorter.
In everyday life
Look for Iacono's working set structure 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Iacono's working set structure” →

How to study Iacono's working set structure in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Iacono's working set structure 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 Iacono's working set structure out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Iacono's working set structure in simple terms?

In computer science, Iacono's working set structure is a comparison based dictionary. It supports insertion, deletion and access operation to maintain a dynamic set of n elements.

Why does Iacono's working set structure matter?

Because it connects several engineering 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 Iacono's working set structure?

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 Iacono's working set structure.

Tags

  • Trees (data structures)

Keep exploring