Skip to content

Commit

Permalink
Added report and updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasco-jofra committed Jul 19, 2017
1 parent 2744936 commit 0b7a3eb
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 8 additions & 3 deletions README.md
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 added report.pdf
Binary file not shown.

0 comments on commit 0b7a3eb

Please sign in to comment.