# Lec9 - COT 6936: Topics in Algorithms Giri Narasimhan ECS...

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

1 1/12/10 COT 6936 1 COT 6936: Topics in Algorithms Giri Narasimhan ECS 254A / EC 2443; Phone: x3748 [email protected] http://www.cs.fiu.edu/~giri/teach/COT6936_S10.html https://online.cis.fiu.edu/portal/course/view.php?id=427 Randomization • Randomized Algorithms: Uses values generated by random number generator to decide next step • Often easier to implement and/or more efficient • Applications – Used in protocol in “Ethernet Cards” to decide when it next tries to access the shared medium – Primality testing & cryptography – Monte Carlo simulations 1/12/10 COT 6936 2 QuickSort vs Randomized QuickSort QuickSort • Pick a fixed pivot • Partition input based on pivot into two sets • Recursively sort the two partitions Randomized QuickSort • Pick a random pivot • Partition input based on pivot into two sets • Recursively sort the two partitions 1/12/10 COT 6936 3

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

View Full Document
2 QuickSort : Probabilistic Analysis • Expected rank of pivot = n/2 ( Why ?) • Thus expected size of sublists after
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/18/2012 for the course CIS 6936 taught by Professor Giri during the Spring '12 term at FIU.

### Page1 / 5

Lec9 - COT 6936: Topics in Algorithms Giri Narasimhan ECS...

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

View Full Document
Ask a homework question - tutors are online