{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

06Spring

# 06Spring - CSE 2320 Name Test 1 Spring 2006 Last 4 Digits...

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

CSE 2320 Name ____________________________________ Test 1 Spring 2006 Last 4 Digits of Student ID # __________________ Multiple Choice. Write your answer to the LEFT of each problem. 3 points each 1. Suppose f x ( ) is a monotonically increasing function. Which of the following approximates the summation? A. f ( x ) dx m n +1 ò £ f ( k ) k = m n å £ f ( x ) dx m -1 n ò B. f ( x ) dx m -1 n -1 ò £ f ( k ) k = m n å £ f ( x ) dx m +1 n +1 ò C. f ( x ) dx m -1 n ò £ f ( k ) k = m n å £ f ( x ) dx m n +1 ò D. f ( x ) dx m n ò £ f ( k ) k = m n å £ f ( x ) dx m n ò 2. For which of the following sorts does the decision tree model not apply? A. Insertion B. LSD Radix Sort C. M ERGE -S ORT D. Q UICKSORT 3. Which of the following sorts is not stable? A. Insertion B. LSD Radix Sort C. M ERGE -S ORT D. Q UICKSORT 4. What is the definition of H n ? A. Θ n ( ) B. k k =1 n å C. ln n D. 1 k k =1 n å 5. Which of the following functions is not in n ( )? A. lg n B. n lg n C. n 2 lg n D. n 3 6. 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. 7. Suppose that a binary search is to be performed on a table with 100 elements. The maximum number of elements that could be examined (probes) is: A. 4 B. 5 C. 6 D. 7 8. f n ( ) = n lg n is in all of the following sets, except A. Ο log n ( ) B. Θ log n ! ( ) ( ) C. 1 n ( ) D. Ο n 2 ae è ç ö ø ÷ 9. The expected time for insertion sort for n keys is in which set? (All n ! input permutations are equally likely.) A. Θ log n ( ) B. Θ n ( ) C. Θ n log n ( ) D. Θ n 2 ae è ç ö ø ÷ 10. What is the value of 1 2 ( ) k =0 ¥ å k ? A. 1 2 B. 2 3 C. 3 2 D. 2 11. Suppose that you have correctly determined some c and n o to prove that f n ( ) Î W 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 ( ) Î O f n ( ) ( ) 12. Suppose you are using the substitution method to establish a Θ bound on a recurrence T n ( ) and that

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

View Full Document
you already know that T n ( ) Î Wlg 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 3 ae è ç ö ø ÷ 13. Which of the following is not true regarding a minheap 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. The left child for the node with subscript 200 is stored at subscript 400.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 9

06Spring - CSE 2320 Name Test 1 Spring 2006 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