Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Indicate whether the following statements are true or false: (a) (Disjoin-set fo

ID: 3624456 • Letter: I

Question

Indicate whether the following statements are true or false:
(a) (Disjoin-set forest) Performing Find-Set(x) without path-compression could
potentially change the data-structure.
(b) (Disjoin-set forest) By looking at the nal structure we can immediately de-
termine the rank of any root node.
(c) (Disjoin-set forest) It is impossible to have a disjoint-set forest where the rank
of no node is zero.
(d) (Disjoin-set forest) If we perform a Find-Set(x) with path-compression the
subsequent call to Find-Set(x) with the same x value will complete in constant time
regardless of what other operations are performed between these two calls.

Explanation / Answer

Dear.. (a) (Disjoin-set forest) Performing Find-Set(x) without path-compression could potentially change the data-structure. TRUE: Disjoint -set forest with union by rank but without path compression .The FIND-SET procedure is a two-pass method: it makes one pass up the find path to find the root, and it makes a second pass back down the find path to update each node so that it points directly to the root.