Blog Post

Prmagazine > News > News > This New Algorithm for Sorting Books or Files Is Close to Perfection
This New Algorithm for Sorting Books or Files Is Close to Perfection

This New Algorithm for Sorting Books or Files Is Close to Perfection

Original version of This story Appear in Quanta Magazine.

Computer scientists often deal with difficult abstractions, but an exciting new algorithm is important to anyone with books and at least one bookshelves. This algorithm solves the so-called library sorting problem (grid, “list tag” problem). The challenge is to develop a strategy to organize books in some form of order (e.g., alphabetical order) to minimize the time it takes to put a new book on the shelf.

Imagine, for example, you put books together, leaving empty space on the far right of the shelf. Then, if you add Isabel Allende’s books to your collection, you may have to move each book on the shelf to make room. That would be a time-consuming operation. And if you get Douglas Adams’ book, you have to do it again. A better arrangement would make the space space spread across the shelf, but exactly should they be distributed?

This problem is 1981 paperit is not just about providing organizational guidance to librarians. This is because the problem also applies to file arrangements in hard drives and databases where the items to be arranged can be digitally in billions of dollars. An inefficient system means a lot of waiting time and major calculation expenses. Researchers have invented some effective methods for storing items, but they have long wanted to determine the best method.

Last year, A study This was proposed on the basis of the Computer Science Conference in Chicago, where a team of seven researchers described a method of organizing tempting objects that were very close to theoretical ideals. The new approach combines knowledge of bookshelf past content with the amazing power of randomness.

“This is a very important question.” Seth Pettiea computer scientist at the University of Michigan, because many of the data structures we rely on today depend on store information in turn. He called the new work “a great inspiration [and] It’s easy to be one of my three favorite papers this year. ”

Narrow boundaries

So how to measure a well-ranked bookshelves? A common way is to see how long it takes to insert a single item. Naturally, it depends on how many items there are at the beginning, the value usually represented n. In the example of Isabel Allende, when all books have to move to accommodate new books, the time it takes is with n. The bigger nthe longer it takes. This makes it the “upper limit” of the problem: it will never be longer than proportional n Add a book on the shelf.

The authors of the 1981 paper citing this question in 1981 wonder if it is possible to use the average insertion time algorithm is much lower than n. Indeed, they proved that one can do better. They created an algorithm that guarantees an average insertion time proportional to the proportion ( n)2. The algorithm has two properties: it is “deterministic”, which means its decision does not depend on any randomness and is also “smooth”, which means that the book must be in the subsection of the shelf inserted (or deleted) Spread evenly. Production. The author opens up a question whether the upper limit can be improved further. No one has been able to do this in the past forty years.

However, the following years did improve. Although the upper limit specifies the maximum possible time required to insert a book, the lower limit gives the fastest insertion time. To find a definite solution to the problem, the researchers worked hard to narrow the gap between the upper and lower limits, ideally until they overlap. When this happens, the algorithm is considered optimal – a reliable boundary is defined from above and below, without room for further refinement.

Source link

Leave a comment

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

star360feedback Recruitgo