05Fall - CSE 2320 Name Test 1 Fall 2005 Last 4 Digits of...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE 2320 Name ____________________________________ Test 1 Fall 2005 Last 4 Digits of Student ID # __________________ Multiple Choice. Write your answer to the LEFT of each problem. 3 points each 1. Which of the following functions is not in Ω n 2 ae è ç ö ø ÷ ? A. n B. n 2 C. n 2 lg n D. n 3 2. B UILD-M AX-H EAP is based on applying M AX-H EAPIFY in the following fashion: A. In ascending slot number order, for each slot that is a parent. B. In descending slot number order, for each slot that is a parent. C. n 2 times, each time from the root of the heap. D. n- 1 times, each time from the root of the heap. 3. Suppose that a binary search is to be performed on a table with 40 elements. The maximum number of elements that could be examined (probes) is: A. 4 B. 5 C. 6 D. 7 4. Suppose f x ( ) is a monotonically increasing function. Which of the following approximates the summation? A. f ( x ) dx m n ò £ f ( k ) k = m n å £ f ( x ) dx m n ò B. f ( x ) dx m-1 n ò £ f ( k ) k = m n å £ f ( x ) dx m n +1 ò C. f ( x ) dx m- 1 n- 1 ò £ f ( k ) k = m n å £ f ( x ) dx m +1 n +1 ò D. f ( x ) dx m n +1 ò £ f ( k ) k = m n å £ f ( x ) dx m- 1 n ò 5. Which recurrence describes the worst-case time used by M ERGE-S ORT ? A. T n ( ) = T n 2 ( ) + n B. T n ( ) = 2 T n 2 ( ) + n C. T n ( ) = T n- 1 ( ) + n D. T n ( ) = T n 2 ( ) +1 6. Which of the following sorts does not have a straightforward statement of its worst case? A. Insertion B. M ERGE-S ORT C. Q UICKSORT D. Shellsort 7. What is the value of H 3 ? A. lg 4 B. 1 4 C. 11 6 D. 3 8. f( n ) = n lg n is in all of the following sets, except A. Ω (lg n ) B. Θ (log( n !)) C. O(1/ n ) D. O( n 2 ) 9. What is the value of 2 3 ( ) k =0 ¥ å k ? A. 1 3 B. 2 3 C. 3 2 D. 3 10. Which of the following is not an application of a minheap? A. Choosing the pivots for Q UICKSORT . B. Constructing sorted subfiles for external mergesort. C. Controlling multiway merges for external mergesort. D. Selecting the third smallest number from a set of one million numbers. 11. The worst-case time to merge two ordered sequences, one with m elements and the other with n elements, to construct another ordered sequence is: A. Θ min m , n ( ) ( ) B. Θ m + n ( ) C. Θ mn ( ) D. Θ mn lg m + lg n ( ) ( ) 12. Suppose that you have correctly determined some c and n o to prove that 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 ( ) ( ) 13. Suppose you are using the substitution method to establish a Θ bound on a recurrence T n ( ) and that you already know that T n ( ) Î W lg n ( ) and T n ( ) Î O n 2 ae è ç ö ø ÷ . Which of the following cannot be shown as an improvement?...
View Full 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

05Fall - CSE 2320 Name Test 1 Fall 2005 Last 4 Digits of...

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

View Full Document
Ask a homework question - tutors are online