hw2 - CS 573: Graduate Algorithms, Fall 2011 HW 2 (due in...

Info iconThis preview shows pages 1–2. 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: CS 573: Graduate Algorithms, Fall 2011 HW 2 (due in class on Tuesday, September 27th) This homework contains five problems. Read the instructions for submitting homework on the course webpage . In particular, make sure that you write the solutions for the problems on separate sheets of paper. Write your name and netid on each sheet. Collaboration Policy: For this home work students can work in groups of up to three students each. Only one copy of the homework is to be submitted for each group. Make sure to list all the names/netids clearly on each page. Note on Proofs: Details are important in proofs but so is conciseness. Striking a good balance between them is a skill that is very useful to develop, especially at the graduate level. 1. (20 pts) In the selection problem we are given an array A of n numbers (not necessarily sorted) and an integer k and the goal is output the rank k element of A . We saw a linear time deterministic algorithm for this problem. Consider a randomized version where we pick a number x uniformly at random from A and use it as a pivot as in quick sort to partition A into numbers less than equal to x and numbers greater than x . The algorithm recurses on one of these arrays depending on k and the size of the two arrays. It can be shown thatand the size of the two arrays....
View Full Document

This note was uploaded on 01/22/2012 for the course CS 573 taught by Professor Chekuri,c during the Fall '08 term at University of Illinois, Urbana Champaign.

Page1 / 2

hw2 - CS 573: Graduate Algorithms, Fall 2011 HW 2 (due in...

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