This preview shows page 1. Sign up to view the full content.
Unformatted text preview: j ) with NUMBER( k ). If NUMBER( j ) NUMBER( k ), then Set NAME( i ) = k for all i in LINK( j ), Append LINK( j ) to LINK( k ) Increase NUMBER( k ) by NUMBER( j ) The new set is named j . Prove that for a total of n items, the time for all UNION operations is O ( n log n ). 3. Write an algorithm to delete an identifier from a hash table in which overflows are handled by linear probing (see Horowitz and Sahni, page 87). Programming Problems 4. This is a group problem. Each project group should only produce one code. Modify your code from the last assignment so that it performs component labeling. In other words, it should read in a graph from a file as a list of edges and print out the list of nodes in each connected component of the graph....
View Full Document
- Fall '08
- Operations Research