# 07Fall - CSE 2320 Name Test 1 Fall 2007 Last 4 Digits of...

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

CSE 2320 Name ____________________________________ Test 1 Fall 2007 Last 4 Digits of Mav ID # _____________________ Multiple Choice. Write your answer to the LEFT of each problem. 3 points each 1. The time to convert an array, with priorities stored at subscripts 1 through n , to a minheap is in: A. Θ n ( ) B. Θ max m , n , p ( ) ( ) C. Θ n 3 ae è ç ö ø ÷ D. Θ mnp ( ) 2. The number of calls to mergeAB while performing mergesort on n items is: A. Θ log n ( ) B. Θ m + n ( ) C. Θ n ( ) D. Θ n log n ( ) 3. Which of the following is not true? A. n 2 Î O n 3 ae è ç ö ø ÷ B. n log n Î W n 2 ae è ç ö ø ÷ C. g n ( ) Î O f n ( ) ( ) Û f n ( ) Î W g n ( ) ( ) D. 3 n Î W 2 n ae è ç ö ø ÷ 4. 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 5. The function n + 3 n log n is in which set? A. n 2 ae è ç ö ø ÷ B. Θ log n ( ) C. Θ n ( ) D. Θ n log n ( ) 6. 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 è ç ö ø ÷ 7. Which statement is correct regarding the unweighted and weighted activity scheduling problems? A. Both require dynamic programming B. Both are easily solved using a greedy technique C. Unweighted is solved using a greedy technique, weighted is solved by dynamic programming D. Weighted is solved using a greedy technique, unweighted is solved by dynamic programming 8. The purpose of the binary searches used when solving the longest (monotone) increasing subsequence (LIS) problem is: A. to assure that the final solution is free of duplicate values B. to determine the longest possible increasing subsequence terminated by a particular input value C. to search a table that will contain only the LIS elements at termination D. to sort the original input 9. Suppose 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 increased B. n o may be decreased C. n o may be increased D. g n ( ) Î W f n ( ) ( ) 10. Suppose you are using the substitution method to establish a Θ bound on a recurrence T n ( ) and you already know T n ( ) Î W n log n ( ) and T n ( ) Î O n 3 ae è ç ö ø ÷ . Which of the following cannot be shown as an improvement?

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

View Full Document
A. T n ( ) Î O n log n ( ) B. T n ( ) Î O n ( ) C. T n ( ) Î W n 2 ae è ç ö ø ÷ D. T n ( ) Î W n 2 log n ae è ç ö ø ÷ Short answer. 3 points each 1. Give the value of H 4 . 2.
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 / 10

07Fall - CSE 2320 Name Test 1 Fall 2007 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