TopSort in Python?

Paddy paddy3118 at googlemail.com
Sun Jan 20 02:11:40 EST 2008


On Jan 19, 4:30 pm, duncan smith <buzz... at urubu.freeserve.co.uk>
wrote:
> Carl Banks wrote:
> > On Jan 18, 7:01 pm, Paddy <paddy3... at googlemail.com> wrote:
> >> On Jan 18, 9:47 pm, startec... at gmail.com wrote:> Tim,
>
> >>> Thanks for the topsort code.  It would be useful in a project I'm
> >>> working on.  Can I use the code for free under public domain?  Thanks!
> >> When I needed one I didn't know the name. I'm curious, how did you
> >> know to look for the topological sort algorithm by name?
>
> > I spent quite a bit of time looking for this one myself.  It was quite
> > a stumper.  Sometimes Google gets us in the habit of just firing
> > random search terms when we ought to be thinking it out.
>
> > After quite of bit of dead end searching--like a week--I stepped back,
> > thought about what I was looking for.  I wanted a sort of dependency
> > system: A must happen before B.  What other programs do that?  make,
> > of course.  I looked at the documents for make and found the term
> > "directed acyclic graph", and pretty much instantly knew I had it.
>
> Searching for "precedence diagram" might throw up some relevant results;
> but you've probably already discovered that.  I have some basic
> precedence diagram code (no warranty etc.) somewhere if anyone is
> interested.
>
> Duncan

I searched for dependancy sort, and later dependency sort (cos I
couldn't spell). I had convinced that I was using the right term and
was flummoxed by the lack of hits. Even today the term topological
sort means far less than what it describes: sorting items based on
their interdependencies.

Is this a case of something being named after its mathematical/
technical description and so obscuring its wider practical use cases?

- Paddy.

P.S. we have revived a thread started in 1999!



More information about the Python-list mailing list