M01A_sln

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

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

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

View Full Document

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: 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

## This note was uploaded on 02/27/2011 for the course CSE 310 taught by Professor Davulcu,h during the Spring '08 term at ASU.

### 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
Ask a homework question - tutors are online