Abstract

We consider the file maintenance problem (also called the online labeling problem) in which $n$ integer items from the set $\{1,\ldots,r\}$ are to be stored in an array of size $m \geq n$. The items are presented sequentially in an arbitrary order, and must be stored in the array in sorted order (but not necessarily in consecutive locations in the array). Each new item must be stored in the array before the next item is received. If $r \leq m$ then we can simply store item $j$ in location $j$ but if $r > m$ then we may have to shift the location of stored items to make space for a newly arrived item. The algorithm is charged each time an item is stored in the array, or moved to a new location. The goal is to minimize the total number of moves the algorithm has to do. This problem is nontrivial for $n\le m 1$, algorithms are known that solve the problem with cost $O(n\log^2(n))$ (independent of $r$). For the case $m=n$, algorithms with cost $O(n\log^3(n))$ were g...

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.