Q BgQuestion:

      
Novice
Karma Points: 25
Respect (100%):
posted by  seral2010 on 11/5/2009 12:01:14 AM  |  status: Closed  |  Earned Karma: 25

Topological Sort (LIFESAVER)

Course Textbook Chapter Problem Needs by
Software Design Introduction to Algorithms (2nd) by Cormen, Rivest, Leiserson 22 N/A 11/9/2009 at 9:00:00 AM
Question Details:
DAG G shows the dependencies for putting on goalie equipment:
Run Topological-Sort(G).
Follow upper-case letters of vertices if you have a choice to select a vertex.
What are the start and finish times of each verticies?
Bonus Point Alert! Earn +7 additional karma points for helping this gold member.

AAnswers:

Answer Question Ask for clarification
(SME)
Moderator
posted by rachel 's on 11/5/2009 2:23:39 AM  |  status: Live
Asker's Rating: Lifesaver   
Response Details:
Dear,
 
  The graph shown topologically sorted. Its vertices are arranged from left to right in order of decreasing finiching time.
Topological Sort(G)
1. call DFS(G) to computer finishing times f[v] for each vertex v
2. as such vertex is finished, insert it it onto front of a linked list
3. return the linked list of vertices
we can perform a topological sort in time Θ (V+E) time and it takes O(1) time to insert each of the |V| vertices on to the front of linked list.
Answer Question Ask for clarificarion

Join Cramster's Community

Cramster.com brings together students, educators and subject enthusiasts in an online study community. With around-the-clock expert help and a community of over 100,000 knowledgeable members, you can find the help you need, whenever you need it. Join for free today » How Cramster is different from tutoring »