From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cd5005cccfba0311 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!newshub.sdsu.edu!newsgate.cuhk.edu.hk!news.cuhk.edu.hk!not-for-mail From: "s053914" Newsgroups: comp.lang.ada Subject: Re: Topological Sort Help Date: Sat, 10 Feb 2007 16:37:03 +0800 Organization: The Chinese University of Hong Kong Message-ID: References: <1170618852.885855.258390@j27g2000cwj.googlegroups.com> NNTP-Posting-Host: 137.189.188.203 X-Trace: justice.itsc.cuhk.edu.hk 1171096626 92806 137.189.188.203 (10 Feb 2007 08:37:06 GMT) X-Complaints-To: abuse@cuhk.edu.hk.removeme NNTP-Posting-Date: Sat, 10 Feb 2007 08:37:06 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Xref: g2news2.google.com comp.lang.ada:9222 Date: 2007-02-10T16:37:03+08:00 List-Id: yryhrfyhfhygv "isaac2004" ???????:1170618852.885855.258390@j27g2000cwj.googlegroups.com... > hello i am trying to further my knowledge of graphs and i keep running > into this function called topological sort. i read the definition and > somewhat understand it as a function that does the following > > 1. searches for a directed cycle > 2. sorts vertices of a graph in order onto a stack or array of some > type so the nodes can be popped in order > > so my questions are > > are these reasonable thoughts on this algorithm > > how would i write up an algorithm of this nature, would it be just > like traversing down a list and adding elements to a stack. thanks for > any help >