This new algorithm to sort books or files is close to perfection


The original version to This story Appear How many magazines.

Computer scientists often deal with abstract problems that are difficult to understand, but an exciting new algorithm of concern to anyone who possesses books and at least one rift. The algorithm deals with something called the library sorting problem (more formally, the problem of “signs”). The challenge lies in developing a strategy to organize books in a kind of arrangement – technically, for example – reduces the time it takes a new book on the shelf.

Imagine, for example, that you keep your books homogeneous together, leaving an empty space on the far right of the shelf. Then, if you add a book by Isabelle Alindy to your group, you may have to transfer each book on the shelf to make room for that. This will be a long time. If you get a book by Douglas Adams, you will have to do this again. The best arrangement would leave unproductive spaces distributed throughout the shelf – but how exactly, should be distributed?

This problem was presented in 1981 paperAnd it exceeds the mere provision of librarians with organizational directives. This is because the problem also applies to the arrangement of files on hard drives and databases, where the elements to be arranged can be numbered by billions. Included system means large waiting times and major calculations. The researchers invented some effective methods of storing the elements, but they have long wanted to determine the best possible way.

Last year, in study This was presented in the institutions of the Computer Science Conference in Chicago, a team of seven researchers described a way to organize the elements that are baffled by the theoretical ideal. The new approach combines a little knowledge of the contents of the previous book shelf with amazing random power.

“It is a very important problem,” he said Sett BettyA computer scientist at the University of Michigan, because many of the data structures that we rely on today store information in succession. He described the new work as “very inspired (and) easily one of the three best favorite leaves for this year.”

Narrowing the border

How can one measure the well -made book shelf? There is a common way to know the time it takes to enter an individual element. Of course, this depends on the number of elements in the first place, a value that usually indicates N. In the example N. greater NThe more it takes. This makes this “the upper limit” of the problem: it will not take longer than a time that suits time N To add one book to the shelf.

The authors of the leaf in 1981 that interfered with this problem wanted to know whether it was possible to design an algorithm with a lot of insertion time much less than N. Indeed, they have proven that one can do what is better. They created a guaranteed algorithm to achieve the average insertion time that fits with (LOGH N))2. This algorithm had two characteristics: it was “inevitable”, which means that its decisions did not depend on any random, and it was also “smooth”, which means that the books should spread equally within the sub -sections of the shelf where the inclusion (or deletion) is made. The authors are left open if the upper limit could be improved further. For more than four decades, no one was able to do this.

However, the overlapping years have seen minimal improvements. While the upper limit determines the maximum time needed to include a book, the minimum gives the fastest possible entry time. To find a final solution to a problem, researchers seek to narrow the gap between the upper and lower borders, perfectly until it coincides. When this happens, the algorithm is perfect – unlimited at the top and bottom, and does not leave room for more improvement.

Leave a Reply

Your email address will not be published. Required fields are marked *