This quiz is homework assignment #5. Any question you answered correctly in class are considered correct for the purposes of the assignment. Any question you did not answer or which you answered incorrectly is now a short answer question for the homework assignment due in class on Wednesday. We will hand back the graded quiz on Friday.
In italics are instructions on how to answer each question for homework. The correct letter answer is listed after each question.
Good luck!
Which of the following would definitely cause an unnecessarily large directory in extendible hashing?
Correct answer(s): (a)
Use the following scenario for the next three questions.
You have the set of elements a-j and perform the following sequence of operations:
Without weighted union or path compression and choosing the root of a union by selecting the alphabetically smaller node, node j ends up at depth:
Correct answer(s): (d)
With weighted union but without path compression and breaking ties on unions by selecting the alphabetically smaller node, node j ends up at depth:
Correct answer(s): (c)
With weighted union and path compression and breaking ties on unions by selecting the alphabetically smaller node, node j ends up at depth:
Correct answer(s): (b)
Which of the following does not support efficient search?
Correct answer(s): (b)
Match each of the following five data structures with the best description of when you would use that data structure.
For each one that you missed, explain how it supports the desired behavior.
Correct answer(s): (c)
Correct answer(s): (a)
Correct answer(s): (b)
Correct answer(s): (d)
Correct answer(s): (e)
What's the worst case total cost of all the union operations that can ever be performed on an Up-Tree Disjoint Set Union/Find structure with n elements using weighted union and path compression?
Correct answer(s): (b)