11Summer

11Summer - CSE 2320 Name Test 1 Summer 2011 Last 4 Digits...

This preview shows pages 1–3. Sign up to view the full content.

CSE 2320 Name ____________________________________ Test 1 Summer 2011 Last 4 Digits of Mav ID # _____________________ Multiple Choice. Write your answer to the LEFT of each problem. 3 points each 1. The time to multiply two n ´ n matrices is: A. Θ n ( ) B. Θ max m , n , p ( ) ( ) C. Θ n 3 ae è ç ö ø ÷ D. Θ mnp ( ) 2. Which of the following is the best approximation for H mn ? ( m and n are positive integers) A. 1 mn B. ln m + ln n C. ln n D. 1 3. Which sort has both its worst-case and expected times in Θ n 2 ae è ç ö ø ÷ ? A. heap B. insertion C. merge D. selection 4. Suppose H n = 11 6 . What is the value of n ? A. 4 B. 5 C. 6 D. 7 5. The function 3log n + 2 n is in which set? A. n log n ( ) B. Θ log n ( ) C. Θ n ( ) D. Θ n log n ( ) 6. Which of the following is not true? A. 2 n Î W 3 n ae è ç ö ø ÷ B. n 2 Î O n 3 ae è ç ö ø ÷ C. n 2 Î W n log n ( ) D. g n ( ) Î W f n ( ) ( ) Û f n ( ) Î O g n ( ) ( ) 7. What is n , the number of elements, for the largest table that can be processed by binary search using no more than 7 probes? A. 31 B. 63 C. 64 D. 127 8. f n ( ) = n lg n is in all of the following sets, except A. log n ( ) B. Θ log n ! ( ) ( ) C. Ο n ( ) D. Ο n 2 ae è ç ö ø ÷ 9. Suppose there is a large, unordered table with n integers, possibly with repeated values. How much time is needed to determine the minimum value? A. Θ 1 ( ) B. Θ log n ( ) C. Θ n ( ) D. Θ n log n ( ) 10. The recursion tree for mergesort has which property? A. each level has the same contribution B. it leads to a definite geometric sum C. it leads to a harmonic sum D. it leads to an indefinite geometric sum 11. Suppose that you have correctly determined some c and n o to prove f n ( ) Î O g n ( ) ( ). Which of the following is not necessarily true? A. c may be decreased B. c may be increased C. n o may be increased D. g n ( ) Î W f n ( ) ( ) 12. Suppose you are using the substitution method to establish a Θ bound on a recurrence T n ( ) and you already know T n ( ) Î W n ( ) and T n ( ) Î O n 2 ae è ç ö ø ÷ . Which of the following cannot be shown as an improvement? A. T n ( ) Î O lg n ( ) B. T n ( ) Î O n ( ) C. T n ( ) Î W n 2 ae è ç ö ø ÷ D. T n ( ) Î W n lg n ( ) 13. What is required when calling union(i,j) for maintaining disjoint subsets? A. i is the ancestor of j in one of the trees B. i and j are in the same subset

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
C. i and j are leaders for different subsets D. i and j are leaders for the same subset 14. Which of the following is not true regarding a maxheap with 1000 elements? A. Subscript 1 will store the maximum priority. B. The parent for the node with subscript 500 is stored at subscript 250. C.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 8

11Summer - CSE 2320 Name Test 1 Summer 2011 Last 4 Digits...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online