This new algorithm for sorting books and files is near perfect


Original version of This story Appears in The amount of magazines.

Computer scientists often deal with abstract issues that are difficult to understand, but exciting new algorithms are important for those who own a book. The algorithm addresses what is called the library sorting problem (more formally, the “labeling” problem). The challenge is, for example, devising strategies for organizing books in alphabetical order. This means minimizing the time it takes to place new books on the shelf.

For example, imagine leaving the book together with empty space on the far right of the book. After that, if you add Isabel Allende’s books to your collection, you may need to move through all the books on the shelf and create space for it. That can be a time-consuming operation. And once you get a Douglas Adams book, you’ll have to try it again. A better arrangement would be to distribute unopened space across the shelves, but exactly how should they be distributed?

This issue was introduced in a 1981 paperand it does not simply provide organizational guidance to librarians. This is because the problem also applies to the placement of files on your hard drive or database. An inefficient system means critical latency and major calculation costs. Researchers have invented several efficient methods for storing items, but for a long time they wanted to determine the best possible method.

Last year, the study This was presented at the foundations of the Computer Science Conference held in Chicago. This was a team of seven researchers who explained how to organize items that intrigued theoretical ideals. The new approach combines a bit of knowledge of the past content of the bookshelves with the power of incredible randomness.

“That’s a very important issue,” he said. Seth Pettya computer scientist at the University of Michigan. Because many of the data structures we rely on today store information one after another. He called his new work “a highly inspiring (and) easy (and) easy (and) easy.”

Narrow boundaries

So how do you measure a well-sorted bookshelves? A common method is to see how long it takes to insert individual items. Naturally, it depends on the number of items that exist in the first place. n. In Isabel Allende’s example, when every book has to move to accommodate a new book, the time it takes is proportional. n. The bigger the nthe more time takes. It makes this the “upper limit” of the problem. n Add one book to the shelf.

The authors of a 1981 paper that guided this question were interested in knowing whether an algorithm could be designed that had a much lower average insertion time. n. And certainly, they have proven they can do better. They created an algorithm that was guaranteed to achieve an average insertion time proportional to the log (log) n))2. This algorithm had two properties: It was “deterministic.” That is, the decision must be “smooth” and the book should spread evenly within the subsection of the insert (or delete) shelf. It’s been made. The authors left the question open about whether the cap could be further improved. For over 40 years, no one could do that.

However, in the other years, the lower limit was improved. The upper limit specifies the maximum time required to insert a book, while the lower limit gives the fastest insertion time possible. To find a definitive solution to the problem, researchers strive to narrow the gap between the upper and lower limits, ideally until they match. When that happens, the algorithm is considered optimal. There is no room for even more refinement by standing out from the top and bottom.

Leave a Reply

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