09Fall - CSE 2320 Name _ Test 1 Fall 2009 Last 4 Digits of...

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

View Full Document Right Arrow Icon
CSE 2320 Name ____________________________________ Test 1 Fall 2009 Last 4 Digits of Mav ID # _____________________ Multiple Choice. Write your answer to the LEFT of each problem. 2 points each 1. What is the value of 2 k k =0 t -1 å ? A. 2 k B. 2 t - 1 C. 2 t +1 - 1 D. 2 t +1 +1 2. 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 ( ) ( ) 3. 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 ( ) 4. The time to multiply an m ´ n matrix and a n ´ p matrix is: A. Θ n ( ) B. Θ max m , n , p ( ) ( ) C. Θ n 3 ae è ç ö ø ÷ D. Θ mnp ( ) 5. Which of the following is solved heuristically by a greedy method? A. Fractional knapsack B. Huffman code C. Unweighted interval scheduling D. 0/1 knapsack 6. Which of the following is true regarding mergesort? A. It is difficult to code without recursion B. It is difficult to code to ensure stability C. It may be coded to operate in a bottom-up fashion D. The input must be preprocessed to exploit ordered subarrays or sublists in the input. 7. Which function is in both 2 n ae è ç ö ø ÷ and Ο 3 n ae è ç ö ø ÷ , but is not in Θ 2 n ae è ç ö ø ÷ or Θ 3 n ae è ç ö ø ÷ ? A. 2 n + n 2 B. 3 n - n 2 C. 2.5 n D. ln n 8. The function 3 n log n + n is in which set? A. n 2 ae è ç ö ø ÷ B. Θ log n ( ) C. Θ n ( ) D. Θ n log n ( ) 9. Which of the following is not true? A. n 2 Î O n 3 ae è ç ö ø ÷ B. n 2 Î W n log n ( ) C. g n ( ) Î O f n ( ) ( ) Û f n ( ) Î W g n ( ) ( ) D. log n Î O loglog n ( ) 10. Suppose a binary search is to be performed on an ordered table with 40 elements. The maximum number of elements that could be examined (probes) is: A. 4 B. 5 C. 6 D. 7 11. log n ! ( ) is in all of the following sets, except A. log n ( ) B. Θ n log n ( ) C. Ο n 2 ae è ç ö ø ÷ D. n 2 ae è ç ö ø ÷ 12. The cost function for the optimal matrix multiplication problem is: A. C ( i , j ) = i £ k < j min C ( i , k ) + C ( k , j ) + P i -1 P k P j { } B. C ( i , j ) = i £ k < j min C ( i , k ) + C ( k +1, j ) + P i P k P j { } C. C ( i , j ) = i £ k < j min C ( i , k ) + C ( k +1, j ) + P i -1 P k P j { } D. C i , j ( ) = max C i , j - 1 ( ) , C i - 1, j ( ) { } if x i ¹ y j 13. 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
D. it leads to an indefinite geometric sum 14. Which of the following is the best approximation for H mn ? ( m and n are positive integers) A. 1
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/25/2012 for the course CSE 2320 taught by Professor Bobweems during the Spring '12 term at UT Arlington.

Page1 / 9

09Fall - CSE 2320 Name _ Test 1 Fall 2009 Last 4 Digits of...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online