Original version belong to This story Appeared in How many magazines.
Computer scientists often solve abstract problems, but an interesting new algorithm is important for anyone who owns books and at least one shelf. The algorithm solves something called the library arrangement (more official, the issue of labeling the list online). The challenge is to devise a strategy to organize books in a kind of order, for example, for example, minimizing time to place a new book on the shelf.
For example, imagine that you keep your books gathered together, leaving the space on the right side of the shelf. Then, if you add an Isabel Allende's book to your collection, you may have to move every book on the shelf to make room for it. It will be a time -consuming activity. And if you then get a book from Douglas Adams, you will have to start over. A better arrangement will leave spaces without people being distributed in the entire shelf, but exactly, should they be distributed like?
This problem was introduced in one 1981 PaperAnd it goes out, simply providing the organization guidance. That's because the problem also applies to the arrangement of files on the hard drive and in the database, in which the arranged items may have billions. An ineffective system means significant waiting time and main calculation cost. The researchers have invented some effective methods to store items, but they have long wanted to determine the best way possible.
Last year, in A study That was presented at the computer science conference in Chicago, a group of seven researchers described the way to organize items closer to the theoretical ideal. The new approach combines a little knowledge about the past content of the bookshelf with surprisingly random power.
“It is a very important issue,” Seth PettieA computer scientist at the University of Michigan, because many of the data structures we rely on today storage information sequentially. He called the new work extremely inspiring (and) easily one of my top three favorite articles of the year.
Limit narrowing
So how to measure a bookshelf is well arranged? A common way is to see how long it takes to insert an individual item. Naturally, that depends on the number of items in the first place, a value is often indicated N. In the example of Isabel Allende, when all books must move to fit a new book, time should be proportional to N. Greater NIt takes more time. That makes this a “limit” for the problem: it will never take much time more than a period of proportional to. N To add a book to the shelf.
The authors of the 1981 article opened this issue to know whether to design an algorithm with an average insert time much less than N. And actually, they have proven that one can do better. They have created a guaranteed algorithm to achieve the average insert time proportional to (diary N)2. This algorithm has two attributes: it is determination, which means its decisions regardless of any coincidence, and it is also smooth, meaning books must be spread. Evenly in the sub -shelves of the insertion (or deleted) shelves are made. The authors leave the question of whether the above limit may be improved further. For more than four decades, no one managed to do so.
However, the years of intervention saw improvements to the lower limits. Although the upper limit specifies the maximum time may be needed to insert a book, the lower limit for the fastest insert time as possible. To find a definitive solution for a problem, the researchers tried to narrow the gap between the upper and lower limits, especially until they match. When that happens, the algorithm is considered to be optimal, may be limited from above and below, no room to improve.