Which of the following are false?
i. The worst-case running time and expected running time are equal to within constant factors for any randomized algorithm.
ii. Sorting 6 elements with a comparison sort requires at least 10 comparisons in the worst case.
iii. In Blum, Floyd, Pratt, Rivest, and Tarjan [1973] worst-case linear-time order statistics algorithm, instead of dividing the \(n\) elements into groups of 5, dividing them into groups of 3 gives the same linear time complexity.
iv. If a dynamic programming problem satisfies the optimal substructure property, then a locally optimal solution is a globally optimal.
(A) i (B) i, iii, iv (C) ii, iii, iv (D) i, iv (E) ii, iv
i randomized quicksort 的 worst case \(O(n^2)\),expected \(O(n\log n)\) → F(敘述錯誤)
ii \(\lceil\log_26!\rceil=\lceil\log_2720\rceil=10\) → T
iii 5 個一組:\(T(n/5)+T(7n/10)+O(n)\),係數和 \(\lt1\),線性;3 個一組:\(T(n/3)+T(2n/3)+O(n)\),係數和 \(=1\),變 \(O(n\log n)\) → F
iv optimal substructure 只讓你用子問題最佳解組出答案;「局部最佳就是全域最佳」是 greedy-choice property → F
錯的是 i, iii, iv:(B)