Re: Thesis

1

Binary insertion sort is ok too if you don't have too many things to alphabetize.


Posted by: ben w-lfs-n | Link to this comment | 11-25-07 12:08 PM
horizontal rule
2

use endnote


Posted by: | Link to this comment | 11-25-07 12:16 PM
horizontal rule
3

Are the unsigned comments that have been appearing more lately largely the work of a single commenter who is deliberately going nameless? I know Heebie asked this the other day right after Snarkout had accidentally commented without signature, but now I'm asking again.


Posted by: redfoxtailshrub | Link to this comment | 11-25-07 12:18 PM
horizontal rule
4

I think it's our new friend "read."

Read, if that's you, do you mind checking to see that all your comments are signed? We don't do anonymity here.


Posted by: A White Bear | Link to this comment | 11-25-07 12:19 PM
horizontal rule
5

Comment #2 is by read, citizen. Have no fear, but rather an interest in sorting things by hand.


Posted by: ben w-lfs-n | Link to this comment | 11-25-07 12:20 PM
horizontal rule
6

I've had a lot of jobs that involved sorting things by hand, and I came independently to your very thesis, Ben. You are affirmed.


Posted by: A White Bear | Link to this comment | 11-25-07 12:24 PM
horizontal rule
7

depending on what state your pile of stuff is in to begin with, I suspect insertion sort will sometimes be the easiest.


Posted by: soup biscuit | Link to this comment | 11-25-07 12:33 PM
horizontal rule
8

Yeah, library sort (which is a variant of insertion sort) is supposed to be quick - it's another O(n log n) comparison method.


Posted by: asilon | Link to this comment | 11-25-07 12:38 PM
horizontal rule
9

Maybe merge sort isn't faster, but it's definitely more satisfying.


Posted by: A White Bear | Link to this comment | 11-25-07 12:43 PM
horizontal rule
10

I always use insertion sort, but I'll give merge sort a try next time.


Posted by: redfoxtailshrub | Link to this comment | 11-25-07 12:44 PM
horizontal rule
11

I think it would be fun to go back through the archives and see if Sunday has always been "mundane day," like to prep for the rest of the week or something.


Posted by: A White Bear | Link to this comment | 11-25-07 12:46 PM
horizontal rule
12

Well, the question isn't the speed of the algorithm in general, but the ease of carrying it out, which is why quicksort loses. Insertion sort can require too much flipping here and there through the stack, if it grows too large and the start state is recalcitrant.

Since the stack of papers is more like a linked list than an array, in that you can just stick one paper into it without having to relocate the others, library sort doesn't seem to be relevant.


Posted by: ben w-lfs-n | Link to this comment | 11-25-07 12:46 PM
horizontal rule
13

Hmm, I never gave much thought to what algorithm I use when alphabetizing papers by hand, and as a result, i guess I've always been using insertion sort.

But I want to get this straight. You, Ben w-lfs-n, when alphabetizing papers by hand, look at the first two papers, and move the one that comes first in alphabetical order to the front. Then you repeat this procedure for every pair of papers until the whole stack is alphabetized?


Posted by: rob helpy-chalk | Link to this comment | 11-25-07 1:08 PM
horizontal rule
14

No.

I, ben w-lfs-n, divide the stack into rough halves, then put one to the side, and divide the other into rough halves, until there are four to six in front of me, which I sort using insertion sort (I'm not unreasonable). Then I take the other pile of four-to-six and sort it, and merge them together, then work back up and down in like manner.

You seem to be describing something that either wouldn't work or is similar to bubble sort.


Posted by: ben w-lfs-n | Link to this comment | 11-25-07 1:13 PM
horizontal rule
15

I find the secretary sort requires the least amount of my effort.


Posted by: chet | Link to this comment | 11-25-07 1:23 PM
horizontal rule
16

I have no previous knowledge of sorting algorithms. I was just trying to figure out what "quicksort" and "mergesort" were using google. Returning to wikipedia, I now see that I was thinking of bubble sort.

If that's mergesort, that what is quicksort?


Posted by: rob helpy-chalk | Link to this comment | 11-25-07 1:28 PM
horizontal rule
17

Nevermind, I get it. I was thrown by this sentence in wikipedia "It starts by comparing every two elements (i.e., 1 with 2, then 3 with 4...) "


Posted by: rob helpy-chalk | Link to this comment | 11-25-07 1:29 PM
horizontal rule
18

FWIW, I use what I now know to call "bubble sort" in organizing books, because I can just move one or two books while I'm, say, waiting for a page to load. And then go about my business, without leaving piles of books on the floor from an unfinished sort.


Posted by: rob helpy-chalk | Link to this comment | 11-25-07 1:33 PM
horizontal rule
19

You know what's fun? Pressure-washing shit is fun. I speak from recent pressure-washing experience.


Posted by: Gonerill | Link to this comment | 11-25-07 2:11 PM
horizontal rule
20

I can't imagine that washing shit is ever fun. What do you try to remove when you wash shit?


Posted by: rob helpy-chalk | Link to this comment | 11-25-07 2:25 PM
horizontal rule
21

I fantasize about roaming the streets of Budapest with a pressure washer.


Posted by: Amber | Link to this comment | 11-25-07 2:26 PM
horizontal rule
22

You are some kinky, Amber.


Posted by: ben w-lfs-n | Link to this comment | 11-25-07 2:28 PM
horizontal rule
23

20: Worlds most obvious joke.


Posted by: Gonerill | Link to this comment | 11-25-07 2:34 PM
horizontal rule
24

We were watching men pressure-washing a street the other day. It looked even more fun than the domestic variety.


Posted by: asilon | Link to this comment | 11-25-07 2:42 PM
horizontal rule
25

you know what's even more fun than pressure washing? Industrial scale sand blasting.


Posted by: soup biscuit | Link to this comment | 11-25-07 2:47 PM
horizontal rule
26

You hung the fruit low, so I picked it.


Posted by: rob helpy-chalk | Link to this comment | 11-25-07 2:55 PM
horizontal rule
27

It never occurred to me to do a quicksort by hand. It would seem that, by your method, dividing up the 5 or 6 piles using a "pivot", then switching to a different sort for the individual piles would be a reasonable procedure.

The "stack of papers" ~ "linked list" observation is interesting. The physical properties of the objects to be sorted have an effect on the sort method in much the same way as data structures do: books on shelves are like arrays; books and CDs give better "random access" than piles of paper; sorting through an entire collection is like working with bounded memory: you have to bring smaller piles into cache and worry about merging them later...


Posted by: Chris Conway | Link to this comment | 11-25-07 2:55 PM
horizontal rule
28

Say, I'll give you my apple core if you let me pressure wash a little.


Posted by: Matt F | Link to this comment | 11-25-07 2:59 PM
horizontal rule
29

OT (no more than pressure-washing and sandblasting), but parents and other konnoisseurs of kiddie kulture will be pleased to know that the Suzie Templeton Peter and the Wolf is up on YouTube. Really great.


Posted by: Jesus McQueen | Link to this comment | 11-25-07 3:20 PM
horizontal rule
30

Works best if an associate known to you goes by the name. Merge, sort.


Posted by: Armsmasher | Link to this comment | 11-25-07 3:31 PM
horizontal rule
31

Bucket sort beats all contenders when it comes to sorting large quantities by hand, at least in my experience.


Posted by: dob | Link to this comment | 11-25-07 3:36 PM
horizontal rule
32

The fastest way to alphabatize shit is to have someone else do it.


Posted by: bitchphd | Link to this comment | 11-25-07 3:46 PM
horizontal rule
33

That would be the secretary sort of chet supra, B.


Posted by: ben w-lfs-n | Link to this comment | 11-25-07 3:49 PM
horizontal rule
34

29. Thank you Jesus. That's a cool animation. I hope it stays up on YouTube.


Posted by: md 20/400 | Link to this comment | 11-25-07 3:49 PM
horizontal rule
35

I'm eating a bourbon apple cherry caramel tart and drinking the rest of the bourbon and watching Peter and the Wolf. I freaking love Unfogged right now.


Posted by: Penny | Link to this comment | 11-25-07 6:23 PM
horizontal rule
36

Let's get this out of the way. (He hasn't done anything yet, but…)

Randy Moss!


Posted by: md 20/400 | Link to this comment | 11-25-07 6:40 PM
horizontal rule
37

If I understand correctly what bucket sort it, then I think 31 is exactly right.


Posted by: M/tch M/lls | Link to this comment | 11-25-07 6:42 PM
horizontal rule
38

A randy moss gathers no stoles.


Posted by: M/tch M/lls | Link to this comment | 11-25-07 6:42 PM
horizontal rule
39

35: Yay! How is it?


Posted by: A White Bear | Link to this comment | 11-25-07 6:46 PM
horizontal rule
40

That Peter & the Wolf was pretty amazing. I may--may!--have cried a little.


Posted by: A White Bear | Link to this comment | 11-25-07 6:47 PM
horizontal rule
41

35 & 40: I'm delighted you liked it. Siobhán was pretty frightened by the wolf even though, after seeing the Disney version and hearing the Bernstein and NPR versions about a million times apiece, she knew he was going to get caught.


Posted by: Jesus McQueen | Link to this comment | 11-25-07 6:54 PM
horizontal rule
42

Jesus, you picked a good name for your kid.


Posted by: Gonerill | Link to this comment | 11-25-07 6:56 PM
horizontal rule
43

In particular, it's good to see the fada in there where it belongs.


Posted by: Gonerill | Link to this comment | 11-25-07 6:57 PM
horizontal rule
44

41: But he ate the duck! I know that's part of the plot, but this time it really floored me. That creepy ice-eyed kid and his duck; they were all one another had!


Posted by: A White Bear | Link to this comment | 11-25-07 6:58 PM
horizontal rule
45

42 & 43: Thanks. Somehow it suits her.

44: I know! That was kind of a shocker. And unlike other versions, the ducks stays eaten.


Posted by: Jesus McQueen | Link to this comment | 11-25-07 8:04 PM
horizontal rule
46

35: Yay! How is it?

So good. A huge hit, and wasn't even hard to make, but I was way too stingy with the bourbon and cherries; next time I'm doubling everything. Thanks AWB!
Thank you Jesus!


Posted by: Penny | Link to this comment | 11-25-07 9:33 PM
horizontal rule
47

I never cease getting a thrill out of thanking Jesus. Can we please get another commenter named Satan McGee?


Posted by: A White Bear | Link to this comment | 11-25-07 9:36 PM
horizontal rule
48

Hello, nice site!


Posted by: Satan McGee | Link to this comment | 11-25-07 9:36 PM
horizontal rule
49

Welcome, Satan! (yay!)


Posted by: A White Bear | Link to this comment | 11-25-07 9:39 PM
horizontal rule
50

14

So why don't you divide into 4-6 piles by first dividing the alphabet into 4-6 sections and then going through the stack once putting each paper in the correct pile based on the first initial of the last name. Then after you sort the piles the merge phase is trivial.


Posted by: James B. Shearer | Link to this comment | 11-25-07 9:45 PM
horizontal rule
51

That is a needlessly complicated version of bucket sort, JBS. It's actually much easier to divide the alphabet into 26 sections (I'll let you guess how), since then you can tell at a shot what pile to put something in.


Posted by: ben w-lfs-n | Link to this comment | 11-25-07 9:49 PM
horizontal rule
52

29: This Peter and the Wolf is great. Just starting Part 2. Gracias, Jesús.


Posted by: Stanley | Link to this comment | 11-25-07 10:40 PM
horizontal rule
53

De nada, Stanleigh.

Poor duck :(


Posted by: Jesus McQueen | Link to this comment | 11-25-07 11:07 PM
horizontal rule
54

That is a needlessly complicated version of bucket sort, JBS. It's actually much easier to divide the alphabet into 26 sections (I'll let you guess how), since then you can tell at a shot what pile to put something in.

That approach requires a large amount of horizontal space to do at all, and really good spatial memory to do quickly. Limiting the number of buckets to 4-6, as JBS suggests, hits the sweet spot for me.


Posted by: dob | Link to this comment | 11-25-07 11:37 PM
horizontal rule
55

I suck at the alphabet, so I'd end up making a lot of mistakes or taking a lot of time.

I do, however, have a good spatial memory, so if I had to alphabetize a whole lot of things, I would do a 26-bucket bucket sort (hot tip: you can reduce horizontal space required by using a grid). Otherwise I'll stick with mergesort.


Posted by: ben w-lfs-n | Link to this comment | 11-25-07 11:41 PM
horizontal rule
56

I have tried the 26-bucket sort, and end up making myself sad. Mergesort still wins the psychological-satisfaction test.


Posted by: A White Bear | Link to this comment | 11-25-07 11:42 PM
horizontal rule
57

Devices such as this make 26-bucket bucket sorts trivially easy and with minimal space requirements.


Posted by: M/tch M/lls | Link to this comment | 11-26-07 6:55 PM
horizontal rule
58

Hey, I use one of those at work!


Posted by: teofilo | Link to this comment | 11-26-07 7:03 PM
horizontal rule
59

58: So am I right or am I right?


Posted by: M/tch M/lls | Link to this comment | 11-26-07 9:12 PM
horizontal rule
60

You are right.


Posted by: teofilo | Link to this comment | 11-26-07 10:30 PM
horizontal rule