# Therefore binary search alone cannot improve the

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ts. Therefore, binary search alone cannot improve the worst-case running time of INSERTION-SORT to Θ(j). Solution to Exercise 4.3-5 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.3-6 Upper bound: Guess: for some positive constant c. IH: , for all k&lt;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.

Ask a homework question - tutors are online