Skip to content

Commit

Permalink
change names to include O notation
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Heuser committed Nov 21, 2018
1 parent 8e0619d commit aba5eac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/n-bit-bfs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
n-Bit Breadth-First Search
O(n)-Bit Breadth-First Search
===
The breadth-first search over a graph G=(V,E) will find all *connected components* of G and output the tuple (u,dist) for each node, which is shows the distance of u to the starting node of the current component. Two *user-defined procedures* are available: `preprocess` and `preexplore`.

Expand All @@ -12,7 +12,7 @@ This space-efficient variant

## Efficiency
* Time: O(n+m)
* Space: O(2n) bits
* Space: O(n) bits

## Example
```cpp
Expand Down
4 changes: 2 additions & 2 deletions docs/n-bit-dfs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
n-Bit Depth-First Search
O(n)-Bit Depth-First Search
===
The depth-first search over a graph G=(V,E) will *process* every node and *explore* every edge exactly once. The user can supply four *user-defined procedures*: `preprocess`, `preexplore`, `postexplore` and `postprocess`.

Expand All @@ -16,7 +16,7 @@ This space-efficient variant
```cpp
Graph *g=new Graph(nodes,order);

DFS::nBitDFS(g,DFS_NOP_PROCESS,DFS_NOP_EXPLORE,DFS_NOP_EXPLORE,DFS_NOP_PROCESS); // quiet run
DFS::nBitDFS(g); // quiet run

DFS::nBitDFS(g,p0,e0,e1,p1); // supply procedures to do something with the current node or edge

Expand Down
4 changes: 2 additions & 2 deletions docs/nloglogn-bit-dfs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
n*log(log(n))-Bit Depth-First Search
O(n*log(log(n)))-Bit Depth-First Search
===
The depth-first search over a graph G=(V,E) will *process* every node and *explore* every edge exactly once. The user can supply four *user-defined procedures*: `preprocess`, `preexplore`, `postexplore` and `postprocess`.

Expand All @@ -19,7 +19,7 @@ This space-efficient variant
```cpp
Graph *g=GraphCreator::createRandomImbalanced(500);

DFS::nloglognBitDFS(g,DFS_NOP_PROCESS,DFS_NOP_EXPLORE,DFS_NOP_EXPLORE,DFS_NOP_PROCESS); // quiet run
DFS::nloglognBitDFS(g); // quiet run

DFS::nBitDFS(g,p0,e0,e1,p1); // supply procedures to do something with the current node or edge

Expand Down

0 comments on commit aba5eac

Please sign in to comment.