Thanks for pointing it out jgamble. Actually the picpaste had figure 7.4 from the paper (which depicts the algorithm for a better understanding).
And the algorithm is Alfred Aho's famous algorithm, which has been adopted by biologists to construct a tree.
The problem is that it deals with connected components, subgraphs,recursion etc all at once. So Im having trouble proceeding, though im still trying to solve it moving in bits and pieces that is.
The algorithm TreeConstruct described in section 7.2.3 is my main concern.