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

11 points by f_allwein 4 months ago | 7 comments
  • gaudat 4 months ago
    This post links to Quanta [https://www.quantamagazine.org/new-book-sorting-algorithm-al...], which links to the actual paper [https://arxiv.org/abs/2405.00807].

    Tbh I was expecting a supercharged Dewey Decimals...

    • __mharrison__ 4 months ago
      My books are all sorted by color... How else are you going to do it?
      • jmholla 4 months ago
        This isn't about what to sort by, but how to place the books on the bookshelf so that they are in color order while minimizing the work of moving the books around to maintain that order as you add more and more books.

        More directly, I organize them by wherever I find space.

        • __mharrison__ 4 months ago
          Exactly. How much space do I leave around the colors considering recent book colors?
        • kbelder 4 months ago
          Height?
          • tzs 4 months ago
            I considered doing that once. When sorted by subject/author you can end up with a mix of tall books and short books on each shelf in a bookcase, which means that the vertical spacing of the shelves has to be enough to accommodate tall books on every shelf. That can waste a lot of space.

            Sort by height and you might be able to reduce shelf spacing enough to make room to add a shelf to the bookcase.

            • zvr 4 months ago
              Right. Not sorting each one by absolute height, but sorting into "bins" so that you have books of similar height, which then can be subsequently sorted for placement in a shelf of appropriate clearance.

              Even more, if your bookcase has adjustable shelves (for example, via dowels), you can compute the optimal shelf arrangement and book placement, totally customized to your books.

              And if you want extra credit, also take into consideration the width of each book, so you know when you reach the shelf size.

              I do not admit of having spent hours on this many years ago, nor of still having the code solving it somewhere.