from Part I - Introduction to Graph Theory
Published online by Cambridge University Press: 01 June 2011
This chapter discusses frequently used graph-theoretical algorithms, with emphasis on those algorithms that are relevant to the text-processing applications addressed in Parts III and IV. The chapter covers graph-traversal, including depth-first and breadth-first strategies, minimum path length, and minimum spanning trees; flow-on graphs, including algorithms for mincut/max-flow; graph matching; random walks, with harmonic functions and electrical networks; and linear algebra on graphs.
Depth-First Graph Traversal
Algorithms for graph traversal are concerned with reaching all of the nodes in a graph while obeying certain constraints. The depth-first and breadth-first traversal strategies are concerned primarily with the order in which the nodes in the graph are traversed. The minimum-spanning-tree algorithm reaches to all nodes in the graph and ensures at the same time that the traversal path forms a tree.
Depth-first traversal is considered in this section. The next section addresses breadth-first traversal.
In depth-first traversal, the traversal of the graph starts from one node and then iteratively progresses by moving from each node to one of its neighbors until it reaches a node that has no untraversed neighbors. When such a “dead end” node is hit, the algorithm backtracks and continues the traversal with other candidate nodes until all nodes in the graph are covered.
Consider the graph provided as an example in Figure 1.2 and replicated in Figure 2.1. Assuming that we start with the node A in the undirected graph shown in Figure 2.1(a), the neighbors of A are B, C, and D.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.