You are not logged in.

#1 2009-11-27 20:26:00

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

How to best apply sorting algorithms to a physical file cabinet

At the office where I work, I'm shortly going to be migrating some old records to storage, and then re-alphabetizing all the recent records. I've done it on a smaller scale and played around with different sorting methods, but I'd like some input since this time I'll be doing it on many more records. Three bookcases, maybe 7-8 shelves per case, each shelf having a few hundred records (I think).

So what is the best way to do this? The last time I settled on something close to the following. Note that it sounds a lot more complex than it is.
1) Starting by pulling out all records like /^A/. Going by the first letter only means that almost everything is already sorted, so this step is quick. Each letter further into the record name gets more and more fragmented
2) If the "A's" are numerous, split by the second letter into two piles like: /^A[A-M]/ and /^A[N-Z]/. Still sorted somewhat well, but already starting to fragment.
3) If that's still too many to comfortably handle, sort by the third letter to make five piles (A-D, E-H, I-M; N-T, U-Z), then individually (Leaving [[A,B,C,D],[E,F,G,H], etc..). This is almost always small enough to sort comfortably, and if not I can easily change the 5 piles into 26.
5) Take the first pile from 5 and perform an insertion sort. In other words, pull off one file from the first pile into a second pile, then remove the next file from the first pile and insert it into the second pile in the correct collated order.
6) Repeat 5 for each of the small piles, then concatenate each result pile.
7) Repeat 3-6 for the [N-Z] pile, concatenate, then put the /^A/ records back on the shelf
8) Repeat steps 1-7 for /^B/ .. /^Z/

Does anyone see any places where I might be able to speed up the process? Anything I'm overlooking? Based on a little research, I think it's something like a bastardized radix + insertion sort. I can't do a full-on radix sort because there's not enough space on the table to do more than small piles at a time.

Last edited by Daenyth (2009-11-27 20:29:14)

Offline

#2 2009-11-27 21:13:41

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to best apply sorting algorithms to a physical file cabinet

Looks OK. Some moisturizing lotion may be helpful if you'll be doing this for hours - my fingers got too dry to handle the papers comfortably after about 45 mins.

Why do the records need re-alphabetizing in the first place?

Offline

#3 2009-11-27 21:40:53

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: How to best apply sorting algorithms to a physical file cabinet

If your records are mostly alphabetized, you could run through the whole bunch and pull any that are misplaced, sort that stack, and merge them with the records on the shelves.

Offline

#4 2009-11-27 21:51:20

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: How to best apply sorting algorithms to a physical file cabinet

karol wrote:

Why do the records need re-alphabetizing in the first place?

Because at least one other person there just jams them in without looking. Also, the shelves are so overpacked that it's hard to fit the folders in at all, so checking that you have the right spot is harder. That's why we're moving some off to storage.

If your records are mostly alphabetized, you could run through the whole bunch and pull any that are misplaced, sort that stack, and merge them with the records on the shelves.

Unfortunately they're not sorted that well. I don't think they've been re-sorted for at least a year, maybe longer, if they ever have.

Last edited by Daenyth (2009-11-27 22:00:22)

Offline

Board footer

Powered by FluxBB