M01A_sln

M01A_sln - Spring 2010 CSE310 Midterm Examination 01A (in...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Spring 2010 CSE310 Midterm Examination 01A (in class) Instructions: There are five problems in this paper. Please use the space provided (below the ques- tions) to write the answers. Budget your time to solve various problems (roughly 15 minutes for each problem) and avoid spending too much time on a particular question. This is a closed book examination. You may not consult your books/notes. You are NOT supposed to use a pencil. If you use pencil, you cannot challenge your grade after the midterm is graded. NAME ASUID Question Score P1 P2 P3 P4 P5 Total Problem 1A. (20 points: 4 + 4 + 4 + 4 + 4) Use O , , or to relate each of the following pairs of functions. In particular, you need to write your answer as f ( n ) = O ( g ( n )), f ( n ) = ( g ( n )), or f ( n ) = ( g ( n )). In case f ( n ) = ( g ( n )), you will not receive credit if you write f ( n ) = O ( g ( n )) or f ( n ) = ( g ( n )), although both are implied by f ( n ) = ( g ( n )). 1. f ( n ) = n log n , g ( n ) = n X i =1 n i . Solution: f ( n ) = ( g ( n )) 2. f ( n ) = 1 . 01 n , g ( n ) = n 1000 . Solution: f ( n ) = ( g ( n )) 3. f ( n ) = n X i =1 i 2 ,g ( n ) = n 3 + n X i =1 i . Solution: f ( n ) = ( g ( n )) 4. f ( n ) = n ! ,g ( n ) = 3 n 5 n . Solution: f ( n ) = ( g ( n )) 5. f ( n ) = n X i =1 1 i ,g ( n ) = n . 0001 . Solution: f ( n ) = O ( g ( n )) Grading Keys: 4pts for each subproblem. 1 Problem 2A. (20 points: 5 + 5 + 5 + 5) There are two algorithms A 1 ,A 2 , with time complexities T 1 ( n ) ,T 2 ( n ), respectively. We know that T 1 ( n ) = 27 T 1 ( n/ 3) + n 2 ; T 2 ( n ) = 26 T 2 ( n/ 3) + 8 n 2 ; 1. Use the master method to decide the asymptotic notation of T 1 ( n )....
View Full Document

Page1 / 10

M01A_sln - Spring 2010 CSE310 Midterm Examination 01A (in...

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

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