This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 15[10] Consider the ADT MFSET. Let S 1 = {1}, S 2 = {2}, S 3 = {3}, S 4 = {4}, S 5 = {5}, S 6 = {6}. What is the tree that results if we perform the following sequence of operations: MERGE(S 2 ,S 5 ) MERGE(S 1 ,S 3 ) MERGE(S 2 ,S 1 ) MERGE(S 4 ,S 6 ) MERGE(S 2 ,S 4 ) FIND(5) Assume that we always merge the smaller set into the larger one and if two sets are of equal size, merge the second into the first. Also assume that path compression is used. S 2 2 5 1 4 3 6...
View
Full
Document
This note was uploaded on 12/10/2009 for the course CAS 2c03 taught by Professor Janicki during the Spring '03 term at McMaster University.
 Spring '03
 janicki

Click to edit the document details