Functions

it should be satisfied that parent[root] = root