M01B - Spring 2007 CSE310 Midterm Examination 01B(in class Instructions • There are five problems in this paper Please use the space

Info iconThis preview shows pages 1–3. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Spring 2007 CSE310 Midterm Examination 01B (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. NAME ASUID Question Score P1 P2 P3 P4 P5 Total Problem 1B. (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 ) is the average case time complexity of mergesort for sorting n elements. g ( n ) is the average case time complexity of quicksort for sorting n elements. f ( n ) = Θ( g ( n )). Grading is binary. 2. f ( n ) is the worst case time complexity of mergesort for sorting n elements. g ( n ) is the worst case time complexity of quicksort for sorting n elements. f ( n ) = O ( g ( n )). Grading is binary. 3. f ( n ) = n X i =1 i ( i + 1) , g ( n ) = n 3 + n X i =1 i 2 i . f ( n ) = Θ( g ( n )). Grading is binary. 4. f ( n ) = n n , g ( n ) = 2 n × 3 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 / 6

M01B - Spring 2007 CSE310 Midterm Examination 01B(in class Instructions • There are five problems in this paper Please use the space

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

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