Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
courses:cs211:winter2018:journals:boyese:chapter3 [2018/02/07 00:49] – [Section 3.5: Connectivity in Directed Graphs] boyesecourses:cs211:winter2018:journals:boyese:chapter3 [2018/02/07 00:51] (current) – [Section 3.6: Directed Acyclic Graphs and Topological Ordering] boyese
Line 258: Line 258:
  
 To bound the running time of this algorithm, we note that identifying a node v with no incoming edges, and deleting it from G, can be done in O(n) time. Since the algorithm runs for n iterations, the total running time is O(n<sup>2</sup>). This is not a bad running time; and if G is very dense, containing Θ(n<sup>2</sup>) edges, then it is linear in the size of the input. We may want something better when the number of edges m is much less than n<sup>2</sup>. In such a case, a running time of O(m + n) could be a significant improvement over Θ(n<sup>2</sup>), and indeed this is possible. To bound the running time of this algorithm, we note that identifying a node v with no incoming edges, and deleting it from G, can be done in O(n) time. Since the algorithm runs for n iterations, the total running time is O(n<sup>2</sup>). This is not a bad running time; and if G is very dense, containing Θ(n<sup>2</sup>) edges, then it is linear in the size of the input. We may want something better when the number of edges m is much less than n<sup>2</sup>. In such a case, a running time of O(m + n) could be a significant improvement over Θ(n<sup>2</sup>), and indeed this is possible.
 +
 +I thought this section was interesting because of it's applications in the real world and in programming. I would give this section a 9/10 for readability because it was short and to the point. 
courses/cs211/winter2018/journals/boyese/chapter3.1517964581.txt.gz · Last modified: by boyese
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0