-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2744936
commit 0b7a3eb
Showing
7 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
# link-cut | ||
Connectivity in Forests | ||
# Link cut trees | ||
Implementation of link cut trees to represent a forest of rooted, unorderes trees.<br> | ||
|
||
Algorithms Project | ||
It supports the folloeing operations: | ||
- `link(v, w)` - Adds an edge linking node v to node w. If such an edge already exists or this insertion would create a cycle then the operation has no effect. | ||
- `cut(v, w)` - Removes the edge linking the node v to the node w, if such an edge exists. If the edge does not exist this operation has no effect. | ||
- `connected(v, w)` - Returns true if there is a connection from v to w. If such a connection does not exist it returns false. A connection may consist of a single edge, or a sequence of edges, provided that it links v to w. | ||
|
||
Splay trees were used and, as the theoretical analysis predicted, we obtained a log(N) bound on all three operations. Experimental results can be seen in the report. |
Binary file not shown.