Difference between revisions of "TADM2E 5.2"

From Algorithm Wiki
Jump to: navigation, search
(Recovering wiki)
 
Line 4: Line 4:
  
 
A, B, D, E, C, H, G, I, J, F
 
A, B, D, E, C, H, G, I, J, F
 +
 +
--[[User:Someguy|Someguy]] ([[User talk:Someguy|talk]]) 05:13, 3 March 2016 (EST)
 +
 +
After the direction change of the edge between F and H, vertex H has no incoming edges, just like vertex A. If we start DFS at vertex A, according to the "topsort" on page 181, vertex H is supposed to appear at the beginning of the sorting, rather than in the middle:
 +
 +
H, A, B, D, E, C, G, I, J, F
 +
 +
Please correct me if I am wrong.

Revision as of 10:13, 3 March 2016

Be sure to apply the errata and change the direction of the edge between F and H.

A topological sorting of this graph would be:

A, B, D, E, C, H, G, I, J, F

--Someguy (talk) 05:13, 3 March 2016 (EST)

After the direction change of the edge between F and H, vertex H has no incoming edges, just like vertex A. If we start DFS at vertex A, according to the "topsort" on page 181, vertex H is supposed to appear at the beginning of the sorting, rather than in the middle:

H, A, B, D, E, C, G, I, J, F

Please correct me if I am wrong.