Close Menu
Best in TechnologyBest in Technology
  • News
  • Phones
  • Laptops
  • Gadgets
  • Gaming
  • AI
  • Tips
  • More
    • Web Stories
    • Global
    • Press Release

Subscribe to Updates

Get the latest tech news and updates directly to your inbox.

What's On
Cyberpunk: Edgerunners 2 Premieres This Fall And Has A New Trailer

Cyberpunk: Edgerunners 2 Premieres This Fall And Has A New Trailer

12 July 2026
Your next Spotify song could soon carry an AI warning label, and the music industry is all for it

Your next Spotify song could soon carry an AI warning label, and the music industry is all for it

12 July 2026
PlayStation Will Remove Hundreds Of Purchased Movies And TV Shows From User Libraries In September

PlayStation Will Remove Hundreds Of Purchased Movies And TV Shows From User Libraries In September

12 July 2026
Facebook X (Twitter) Instagram
Just In
  • Cyberpunk: Edgerunners 2 Premieres This Fall And Has A New Trailer
  • Your next Spotify song could soon carry an AI warning label, and the music industry is all for it
  • PlayStation Will Remove Hundreds Of Purchased Movies And TV Shows From User Libraries In September
  • Guns Of Eschaton Is A Western Soulslike FPS Envisioned By The Late Artist Of Half-Life 2 And Dishonored
  • Volkswagen’s ID. Unyx 09 doesn’t look like any VW I’ve seen, and I want it in the US
  • Federal Investigators Say Certain DOGE Records Were Deleted
  • Persona Is Reportedly Getting A Live-Action TV Series By Netflix
  • China’s answer to SpaceX’s reusable rockets literally catches boosters in a net
Facebook X (Twitter) Instagram Pinterest Vimeo
Best in TechnologyBest in Technology
  • News
  • Phones
  • Laptops
  • Gadgets
  • Gaming
  • AI
  • Tips
  • More
    • Web Stories
    • Global
    • Press Release
Subscribe
Best in TechnologyBest in Technology
Home » This New Algorithm for Sorting Books or Files Is Close to Perfection
News

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

News RoomBy News Room16 February 20254 Mins Read
Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
This New Algorithm for Sorting Books or Files Is Close to Perfection
Share
Facebook Twitter LinkedIn Pinterest Email

The original version of this story appeared in Quanta Magazine.

Computer scientists often deal with abstract problems that are hard to comprehend, but an exciting new algorithm matters to anyone who owns books and at least one shelf. The algorithm addresses something called the library sorting problem (more formally, the “list labeling” problem). The challenge is to devise a strategy for organizing books in some kind of sorted order—alphabetically, for instance—that minimizes how long it takes to place a new book on the shelf.

Imagine, for example, that you keep your books clumped together, leaving empty space on the far right of the shelf. Then, if you add a book by Isabel Allende to your collection, you might have to move every book on the shelf to make room for it. That would be a time-consuming operation. And if you then get a book by Douglas Adams, you’ll have to do it all over again. A better arrangement would leave unoccupied spaces distributed throughout the shelf—but how, exactly, should they be distributed?

This problem was introduced in a 1981 paper, and it goes beyond simply providing librarians with organizational guidance. That’s because the problem also applies to the arrangement of files on hard drives and in databases, where the items to be arranged could number in the billions. An inefficient system means significant wait times and major computational expense. Researchers have invented some efficient methods for storing items, but they’ve long wanted to determine the best possible way.

Last year, in a study that was presented at the Foundations of Computer Science conference in Chicago, a team of seven researchers described a way to organize items that comes tantalizingly close to the theoretical ideal. The new approach combines a little knowledge of the bookshelf’s past contents with the surprising power of randomness.

“It’s a very important problem,” said Seth Pettie, a computer scientist at the University of Michigan, because many of the data structures we rely upon today store information sequentially. He called the new work “extremely inspired [and] easily one of my top three favorite papers of the year.”

Narrowing Bounds

So how does one measure a well-sorted bookshelf? A common way is to see how long it takes to insert an individual item. Naturally, that depends on how many items there are in the first place, a value typically denoted by n. In the Isabel Allende example, when all the books have to move to accommodate a new one, the time it takes is proportional to n. The bigger the n, the longer it takes. That makes this an “upper bound” to the problem: It will never take longer than a time proportional to n to add one book to the shelf.

The authors of the 1981 paper that ushered in this problem wanted to know if it was possible to design an algorithm with an average insertion time much less than n. And indeed, they proved that one could do better. They created an algorithm that was guaranteed to achieve an average insertion time proportional to (log n)2. This algorithm had two properties: It was “deterministic,” meaning that its decisions did not depend on any randomness, and it was also “smooth,” meaning that the books must be spread evenly within subsections of the shelf where insertions (or deletions) are made. The authors left open the question of whether the upper bound could be improved even further. For over four decades, no one managed to do so.

However, the intervening years did see improvements to the lower bound. While the upper bound specifies the maximum possible time needed to insert a book, the lower bound gives the fastest possible insertion time. To find a definitive solution to a problem, researchers strive to narrow the gap between the upper and lower bounds, ideally until they coincide. When that happens, the algorithm is deemed optimal—inexorably bounded from above and below, leaving no room for further refinement.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleHiFi audio could finally land on Spotify with a top-up scheme in 2025
Next Article The ‘A Court of Thorns and Roses’ Hulu series is officially dead

Related Articles

Your next Spotify song could soon carry an AI warning label, and the music industry is all for it
News

Your next Spotify song could soon carry an AI warning label, and the music industry is all for it

12 July 2026
Volkswagen’s ID. Unyx 09 doesn’t look like any VW I’ve seen, and I want it in the US
News

Volkswagen’s ID. Unyx 09 doesn’t look like any VW I’ve seen, and I want it in the US

12 July 2026
Federal Investigators Say Certain DOGE Records Were Deleted
News

Federal Investigators Say Certain DOGE Records Were Deleted

12 July 2026
China’s answer to SpaceX’s reusable rockets literally catches boosters in a net
News

China’s answer to SpaceX’s reusable rockets literally catches boosters in a net

11 July 2026
Madison Square Garden Kept a List of Gay Celebrities
News

Madison Square Garden Kept a List of Gay Celebrities

11 July 2026
Galaxy Watch 9 and Ultra 2 may arrive on July 22, and this new leak leaves little to the imagination
News

Galaxy Watch 9 and Ultra 2 may arrive on July 22, and this new leak leaves little to the imagination

11 July 2026
Demo
Top Articles
5 laptops to buy instead of the M4 MacBook Pro

5 laptops to buy instead of the M4 MacBook Pro

17 November 2024133 Views
ChatGPT o1 vs. o1-mini vs. 4o: Which should you use?

ChatGPT o1 vs. o1-mini vs. 4o: Which should you use?

15 December 2024111 Views
Costco partners with Electric Era to bring back EV charging in the U.S.

Costco partners with Electric Era to bring back EV charging in the U.S.

28 October 2024100 Views

Subscribe to Updates

Get the latest tech news and updates directly to your inbox.

Latest News
Federal Investigators Say Certain DOGE Records Were Deleted News

Federal Investigators Say Certain DOGE Records Were Deleted

News Room12 July 2026
Persona Is Reportedly Getting A Live-Action TV Series By Netflix Gaming

Persona Is Reportedly Getting A Live-Action TV Series By Netflix

News Room11 July 2026
China’s answer to SpaceX’s reusable rockets literally catches boosters in a net News

China’s answer to SpaceX’s reusable rockets literally catches boosters in a net

News Room11 July 2026
Most Popular
The Spectacular Burnout of a Solar Panel Salesman

The Spectacular Burnout of a Solar Panel Salesman

13 January 2025137 Views
5 laptops to buy instead of the M4 MacBook Pro

5 laptops to buy instead of the M4 MacBook Pro

17 November 2024133 Views
ChatGPT o1 vs. o1-mini vs. 4o: Which should you use?

ChatGPT o1 vs. o1-mini vs. 4o: Which should you use?

15 December 2024111 Views
Our Picks
Guns Of Eschaton Is A Western Soulslike FPS Envisioned By The Late Artist Of Half-Life 2 And Dishonored

Guns Of Eschaton Is A Western Soulslike FPS Envisioned By The Late Artist Of Half-Life 2 And Dishonored

12 July 2026
Volkswagen’s ID. Unyx 09 doesn’t look like any VW I’ve seen, and I want it in the US

Volkswagen’s ID. Unyx 09 doesn’t look like any VW I’ve seen, and I want it in the US

12 July 2026
Federal Investigators Say Certain DOGE Records Were Deleted

Federal Investigators Say Certain DOGE Records Were Deleted

12 July 2026

Subscribe to Updates

Get the latest tech news and updates directly to your inbox.

Facebook X (Twitter) Instagram Pinterest
  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact Us
© 2026 Best in Technology. All Rights Reserved.

Type above and press Enter to search. Press Esc to cancel.