Re: "Sorting" assignment
- From: spinoza1111 <spinoza1111@xxxxxxxxx>
- Date: Mon, 4 Feb 2008 18:48:31 -0800 (PST)
On Feb 5, 1:01 am, "Bartc" <b...@xxxxxxxxxx> wrote:
spinoza1111wrote:
On Feb 4, 2:28 am, "Ivica" <prljavi_blu...@xxxxxxxxxxx> wrote:
I am looking at switch case usage and bubblesort?
If you use the bubble sort, your application may be too slow to manage
realistic amounts of news, and it appears you ganged up on your
<snip sort code>
Yes that's pretty fast, although up to N=1000, I could not detect much
difference between this and bubble sort. At N=10K there was a clear
difference, although bubble sort still took only 0.75secs (at N=100K there's
no contest).
But bubble sort has the huge advantage of being extremely simple. For this
Bubble sort is simple, all right...to the point of
incomprehensibility. Students need to relate abstract mathematical
algorithms to their conscious performance of actual manual labor, and
nobody would sort books or tools using a bubble sort.
Bubble sort maximizes the amount of separate movements. Now, the
management theorist Frederick Taylor said he was minimizing the number
of separate movements of railword worker Schmitt in his 1920s work on
industrial engineering. Paradoxically, Taylor reduced the number of
motions m only to get to a fatter value for m/t, since he didn't care
about Schmitt, who he dismissed, in a racist fashion, as a "little
Pennsylvania Dutchman".
Of course, I don't care (except in some special case where transfer of
a member is computationally expensive, and nearly all of these
situations can be fixed by sorting links instead of actual members)
about using a lot of computer time; a computer isn't a little
Pennsylvania Dutchman. But to say that the bubble sort is "simple"
makes sense only as the sort of abstraction which is incomprehensible
to people with experience in the real world. That would be interchange
or quicksort because those algorithms are closer to what biological
systems evolve.
Gee, I guess this is a "Marxist" philosophy of computer science. Wow,
Pretty scary.
But the fact is that computer science textbook authors need to get out
more. Students, I believe, don't find the bubble sort "simpler" except
in the rawest and most OVER-simplified sense that it takes the fewest
(if the most incomprehensible) and shortest (if most opaque) words for
the instructor to describe before he's hounded out of a job by some
hard initiative. I don't think the students in lvica's class can
explain why it works. They were told it works.
assignment, may be best to get /anything/ working first then worry about
improving the sort speed, although I doubt the test data will be big enough
to show a difference.
...which means that the students won't be able to ramp up to speed on
a real job with real volumes and when their bubble sort seems to take
"too long", will try to find someone new to blame.
--
Bart
.
- References:
- "Sorting" assignment
- From: Ivica
- Re: "Sorting" assignment
- From: spinoza1111
- Re: "Sorting" assignment
- From: Bartc
- "Sorting" assignment
- Prev by Date: Re: Biulding Blocks
- Next by Date: Re: "Sorting" assignment
- Previous by thread: Re: "Sorting" assignment
- Next by thread: Re: "Sorting" assignment
- Index(es):
Relevant Pages
|