From 3cd136861c68b8c24cc653c903c620d55be4b294 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Mon, 2 Apr 2012 09:18:14 +0200 Subject: Remove PC descriptor --- java/docs/algo/DepthFirstSearch.html | 137 ----------------------------------- 1 file changed, 137 deletions(-) delete mode 100644 java/docs/algo/DepthFirstSearch.html (limited to 'java/docs/algo/DepthFirstSearch.html') diff --git a/java/docs/algo/DepthFirstSearch.html b/java/docs/algo/DepthFirstSearch.html deleted file mode 100644 index a4afe64..0000000 --- a/java/docs/algo/DepthFirstSearch.html +++ /dev/null @@ -1,137 +0,0 @@ -

Depth First Search (DFS)

The DFS method performs a depth--first search [clr98] of a graph. -A depth--first search visits vertices that are further to the -source before visiting vertices that are closer away. In this -context `distance' is defined as the number of edges in the -shortest path from the source vertex. -

Figure 1. Pseudocode for the DFS algorithm

DFS(G)
-  {
-    For each v in V,
-    {
-      color[v]=white;
-      pred[u]=NULL
-    }
-
-    time=0;
-    For each u in V
-      If (color[u]=white) DFSVISIT(u)
-  }
-
-
-  DFSVISIT(u)
-  {
-    color[u]=gray;
-    d[u] = ++time;
-
-    For each v in Adj(u)  do
-      If (color[v] = white)
-      {
-        pred[v] = u;
-        DFSVISIT(v);
-      }
-
-    color[u] = black; f[u]=++time;
-  }
-The time complexity is [clr98].


  Next
  Bibliography
\ No newline at end of file -- cgit v1.2.3