{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw2 - Cs445 Homework#2 Lower bound on Sorting Radix Sort...

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

Cs445 — Homework #2 Lower bound on Sorting, Radix Sort, SkipList and Random Variables Due: 3/1/2005 during class meeting. 1. Suggest an algorithm that sort n integers, each with k decimal digits in time O ( nk ). The algorithm uses k passes of counting sort, but does it from the most significant digit to the least significant digit. Discuss possible advantages and disadvantages of this algorithms comparing to the “traditional” radix sort. 2. Assume that the running time of merge sort is O ( n log n ), and the running time of sorting n numbers, each of k decimals digits, using Radix sort, is O ( nk ). Prove that if no two numbers in the input are the same, then radix sort is always not faster than merge sort. Does this implies that you would always use merge sort over radix sort ? 3. This question deals with approximation algorithm for sorting . Let S = { x 1 . . . x n } be a sequence of n different numbers, all between 0 and 1. Assume also that 0 and 1 are in the input. Let π be the permutation of the input numbers describing the input keys in an increasing sorted order. That is

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.

{[ snackBarMessage ]}

### Page1 / 3

hw2 - Cs445 Homework#2 Lower bound on Sorting Radix Sort...

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

View Full Document
Ask a homework question - tutors are online