Fast disjoint set algorithm with linear time subset enumeration?

Is their a variant of the disjoint-set data structure that allows both:

  1. Enumeration of all elements of each set S_i in at most |S_i| time, and
  2. Total running time of O(m lg n) (As in CLRS §21.1 n is the total number MAKE-SET operations and m is the total number of MAKE-SET, UNION, and FIND operations.)

The linked-list implemention (CLRS §21.2) supports sets enumeration in |S_i| time, but runs at O(m + lg n) The set-forest implementation (CLRS §21.3) runs in O(m lg n), but does not appear to support an |S_i| enumeration.

For the set-forest implementation, the fastest enumeration appears to involve running FIND-SET for each x_i in every set and only processing the elements found to be in the desired target set.

Am I missing something?

Comments (1)