Cs4102 L8 quickselectMedianofMedians - University of Virginia School of ...

CS4102 Algorithms

Spring 2019

Warm up Compare ! " + $ with ! " + !($)

When ! " = ((") When ! " = (")

1

$ ! = O(!)

$)

= )*.,-

$(!)

$(")

$(") $(!)

!"

!+"

$ ! + " $ ! + $(")

2

! ( = (()

!())

= "$.&'

!"

!(()

!())

!(()

()

(+)

! ( + ) ! ( + !())

3

! $ = ($)

!"

="

!($)

!(%)

!(%) !($)

$%

$+%

! $ + % = ! $ + !(%)

4

Today's Keywords

? Divide and Conquer ? Sorting ? Quicksort ? Median ? Order statistic ? Quickselect ? Median of Medians

6

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download