Depth first search graph coloring pages

Nov 29 2019

The time and space analysis of DFS differs according to its application area. In theoretical computer science, DFS is typically used to traverse an entire graph, and takes time O(|V|+|E|){displaystyle O(|V|+|E|)}, linear in the size of the graph. In these applications it also uses space O(|V|){displaystyle O(|V|)} in the worst case to store the stack of vertices on the current search path as well as the set of already-visited vertices. Thus, in this setting, the time and space bounds are the same as for breadth-first search and the choice of which of these two algorithms to use depends less on their complexity and more on the different properties of the vertex orderings the two algorithms produce.

a b c d e f g h i j k l m n o p q r s t u v w x y z