12.07.2015 Views

Heap sort and complexity, Disjoint Union & Find, Complexity ...

Heap sort and complexity, Disjoint Union & Find, Complexity ...

Heap sort and complexity, Disjoint Union & Find, Complexity ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 2: Elementary Data Structures<strong>Disjoint</strong> <strong>Union</strong>:S Ui<strong>Find</strong>(i): find a set containing element i.S = {all elements x such that x is in S i orjS j }.Challenge is to device data representation for disjoint sets sothat these operation can be performed efficiently.One possible representation of S 1 , S 2 , S 3 can be given by17 8 925 1034 6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!