Friday, January 8, 2010

sorting those cards

OK we have all been there. Either we just opened a new wax box of the latest and greatest product or finally decide to sort that monster box that has been sitting on the bottom of the closet. I have a great time leafing through big stacks of mixed up cards - seeing what sits inside those long forgotten piles but when it comes to actually putting a large number of cards in numerical order it drives me crazy after a while. The novelty soon wears off.

So here is where collecting cards and mathematics combine! I typically use a bucket sort algorithm which is really just common sense. One way is to take all the cards and put them in order one at a time (this is really bad idea based on the number of decisions you brain has to make). A better technique is the so-called bucket sort algorithm. Suppose we have cards with possible numbers from 1-400 we first do a really rough sort into bins or buckets - say from 1-50, 50-100,...350-400 and then
we sort each pile. Each pile can then be sorted into their own buckets say 1-10,10-20,...40-50, once the buckets are of a decent size then we can sort directly. This turns out to be a much faster way - the actual time depends on the largest possible card number, the number of cards, and the size of the buckets to be used.

Of course this is the idea behind the trading card sorting trays that most dealers have had at one time or another!! Till next time - happy sorting.


  1. I've never managed to get an actual sorting tray. For me, it's always an empty table, of if I can commandeer an unused room, the floor (or the tops of other monster boxes...). But that's definitely how I sort.

  2. I make the stacks as numbers 1 through 99, then 100 through 199, etc. Then those stacks get broken down further into 1-10, 11-19, 20-19, etc. After that, I'll actually try and put them in order.