Research Article

Quasi-Optimal Elimination Trees for 2D Grids with Singularities

Algorithm 1

()  Create forest of   one-element trees,
()  sorted according to the numbering of elements, from largest to smallest
()  Store list of neighbors for each tree
()  Compute area =   for each tree
()   repeat
()  Select sub-forest of elements with minimum area
()  Find maximum number of common edges between all pairs in the selected sub-forest
()  Loop  through all pairs of trees (v,w) in the sub-forest with number of common edges
()  equal to the maximum number of common edges found
()Create new root node r
()Assign v and w as children nodes of r
()Update area of r: area(r) = area(v) + area(w)
()Update list of neighbors of r (merge the lists)
()Add new tree   to the forest in such a way
()that the forest is still sorted according to area of trees
()   end for
() until  forest has one element