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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/27/2008 for the course CS 445 taught by Professor Williams during the Spring '06 term at University of Arizona- Tucson.

Page1 / 3

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

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

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