This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ts. Therefore,
binary search alone cannot improve the worstcase running time of INSERTIONSORT to Θ(j). Solution to Exercise 4.35
In order to show that
Upper bound:
Guess is the solution, we need to show both
⌈⌉ ⌊⌋ for some positive constant d. and Substitution: ⌈⌉ ⌊⌋ ⌈⌉ ⌈⌉ ⌊⌋ ) ⌈⌉ ⌈⌉ ⌈⌉
(
( ) ( ) for c=1
(Lecture 5, Slide 22)
⌈⌉ Lower bound:
Guess ⌊⌋ for some positive constant d. Substitution: ⌈⌉ ⌊⌋ ⌊⌋ ⌊⌋ ⌊⌋ ⌈⌉ ⌊⌋
( ) ( ) ( ⌊⌋ ) for c=1
(Lecture 5, Slide 22) Solution to Exercise 4.36
Upper bound:
Guess: for some positive constant c. IH: , for all k<n. Substitution:
(⌊ ⌋ ( ) ) * (( ⌊⌋
) ) *(
*( )
)
( ( ( ( ( )
) ) ) )+
+ + by the IH. ( )
( ) for...
View
Full
Document
This note was uploaded on 01/13/2014 for the course COT 6405 taught by Professor Liu during the Fall '13 term at University of South Florida  Tampa.
 Fall '13
 Liu
 Algorithms, Sort

Click to edit the document details