class DER { public: DER(int max); virtual ~DER(); void join(int e1, int e2); int equiv(int e1, int e2); private: int root(int e); const int N; int *r; //inverse tree int *s; //size of tree //Representation invariant: // I1: (forall i: : "r[i] is the root of i") // I2: (forall i: : r[i]=i => "s[i] is the size of the tree with i as the root") };