Thursday, April 21, 2016

Let me try this again.

Let me try this again.

I adore this:
http://www.sorting-algorithms.com/

Last time I tryed to show something I adored, folks (including me!) focused on the subject rather than how it worked. Maybe this'll work better?

Each of these sorting algorithms is the result of human brainjuice to solve hard problems. And now, we've got animated pretty pictures to show how they work to folks who don't understand them.

That we have the data and the computational capability to do that is astounding. That it happens in real time is phenomenal. I sometimes think I'm living in a simulation, because the computation in the real world is too good to believe.

And that's more the point; computers are magic.

3 comments:

  1. Christopher Amherst Yeah!

    Also, doing a bit more research, I am absolutely shocked at something.

    Quick sort isn't optimal, not the way I always learned it. Which is to choose a pivot, and position elements as either smaller or lesser. Then quicksort the partitions.

    Apparently ... Quick3 with two pivots ... is faster. Fewer comparisions, fewer swaps. For that, you choose two pivots, and position elements either before the first one, between the two, or after the second. Then Quicksort3 the interior elements.

    My mind just exploded. What have I been doing with my life?

    ReplyDelete
  2. Heck yeah!

    When i maybe 17, I did an implementation of a Bin Sort (or Radix Sort) for a job, where we needed to physically order pieces of paper. The standard was to use a bubble sort, because people didn't think about it.

    That job got a lot easier, as I could then do in 10 minutes what was supposed to take 3 hours.

    ReplyDelete