所屬科目:台大◆電機◆資料結構(B)
Please choose the best possible answer in each of the following questions. In questions that ask for time complexities, please choose the tightest bound. 1. Consider the following five recursive functions: (A)(B) (C)(D)(E) Which recursion yields the highest asymptotic complexity for T(n)?
7. If Dijkstra algorithm is implemented with Binomial heap as priority qucue, then the complexity is mplexity is (A)O(IVI2+E log IVI) (B)O(IVI2) (C)O(IEl log IVI) (D)O(|E|+|V| log|V|) (E) O(|E|)
二、複選題:11. Which of the following statements are true? (A) (B) (C)log(n!)= 0(nlogn) (D)log" n = 0(log" logn) (E)
12. Suppose f(n) is a positive function, which of the following statements are true? (A) (B)(C) (D)(E)
17. Which of the following statements are true? (A) An insertion in AVL tree requires Ω(logn) single- and double-rotations in the worst case. (B) An insertion in AVL tree requires O(1) single- and double-rotations in the worst case. (C) A deletion in AVL tree requires Ω(logn) single- and double-rotations in the worst case. (D) A deletion in AVL tree requires O(1) single- and double-rotations in the worst case. (E) There is no red left child in AA tree.
24. Which of the following are desirable properties of a hash function h(x)? (A) If x1 ,.., xn are the items to be hashed, then the numbers h(x1),.... h(xn) should be uniformly distributed over the integers. (B) The range of h(x) should include a wide range of integers. (C) The range of h(x) should stay within the desired hash-table size. (D) It should be computable in O(1) time. (E) It should take distinct values over all possible items to be hashed.