SlideShare a Scribd company logo
1 of 20
Top School in Ghaziabad 
By: 
school.edhole.com
COMP 482 
Order Statistics 
school.edhole.com
3 
Your To-Do List 
• Read [CLRS] 9. 
• Assignment 3. 
school.edhole.com
4 
What are Order Statistics? 
Selecting ith-ranked item from a collection. 
– First: i = 1 
– Last: i = n 
ù 
, é 
n 
2 
ê 
– Median(s): i = úú 
êê 
úûú 
êë 
2 
n 
school.edhole.com
5 
Order Statistics Overview 
Assume collection is unordered, otherwise trivial. 
Can sort first – O(n lg n), but can do better – Q(n). 
school.edhole.com
6 
Order Statistics Overview 
Algorithms for i=1 & i=n are easy. 
What are they? 
? ? 
Scan data, keeping track of smallest/largest school.edhole.com element seen so far.
7 
Order Statistics Overview 
How can we modify Quicksort to obtain 
expected-case Q(n)? 
? 
? 
Pivot, partition, but recur only on one set school.edhole.com of data. No join.
8 
Order Statistics 
We’ll use this idea. 
But, by guaranteeing a good split, can get worst-case 
Q(n). 
Warning: Non-obvious & unintuitive 
algorithm ahead! 
Blum, Floyd, Pratt, Rivest, Tarjan (1973) 
school.edhole.com
9 
Order Statistics: Algorithm 
Select(A,n,i): 
Divide input into groups of size 5. 
/* Partition on median-of-medians */ 
medians = array of each group’s median. 
pivot = Select(medians, , ) 
L,G = partition(A, pivot) 
/* Find ith element in L, pivot, or G */ 
k = # of lesser elements + 1 
If i=k, return pivot 
If i<k, return Select(L, k-1, i) 
If i>k, return Select(G, n-k, i-k) 
T(n) 
O(n) 
O(n) 
O(n) 
O(1) 
O(1) 
T(k-1) 
T(n-k) 
All this 
to find a 
good split. 
Only one 
done. 
én/5ù 
én/5ù én/10ù T( é n / 5 ù ) 
school.edhole.com
10 
Order Statistics: Analysis 
T n = T æ 
é 
n ö 
÷ + + ÷ø( ) T(max(k -1,n-k)) O(n) 
5 
ç çè 
úúù 
êê 
#less #greater 
How to simplify? 
school.edhole.com
11 
Order Statistics: Analysis 
Lesser 
Elements 
Median 
Greater 
Elements 
One group of 5 elements. 
school.edhole.com
12 
Order Statistics: Analysis 
Median of 
Medians 
Greater 
Medians 
Lesser 
Medians 
All groups of 5 elements. 
(And at most one smaller group.) 
school.edhole.com
13 
Order Statistics: Analysis 
Definitely Lesser 
Elements 
Definitely Greater 
school.edhole.com Elements
14 
Order Statistics: Analysis 1 
Must recur on all elements outside one of these boxes. 
school.edhole.com How many?
15 
Order Statistics: Analysis 1 
ëén 5ù 2û full groups of 5 één 5ù 2ù partial groups of 2 
At most 
5 n 2 2 n 2 7n 7 
êé ù ú éé ù ù êëêê úú úû + êêêê úú úú 
£ + 5 5 10 
Count elements 
scouhtsoidoel sm.aellderh booxl.e.com
16 
Order Statistics: Analysis 2 
Equivalently, must recur on all elements not inside one of these boxes. 
school.edhole.com How many?
17 
Order Statistics: Analysis 2 
Count elements in ³1 
smaller box & pivot. 
éêéên 5ùú 2ùú -1 groups of 3 
At most 
æ æ éé ù ù ö ö çç ç êê ú ú ¸ ¸¸£ è è êê ú ú ø ø 
n- 3 n 2 -1 +1 7n +2 
5 10
18 
Order Statistics: Analysis 
T n T n T 7n 2 O n 
( ) = æçéê ùúö¸+ æç + ¸ö+ ( ) èê 5 úø è 10 
ø 
A very unusual recurrence. How to solve? 
? ? 
school.edhole.com
19 
Order Statistics: Analysis 
$ ( ) £ ´ " ³ 0 0 Substitution: Prove c,n > 0, T n c n, n n 
T n c n c 7n 2 kn 
( ) £ éê ùú+ æç + ö¸+ ê 5 ú è 10 
ø 
c n 1 c 7n 2 kn 
£ æ æ çè + ø¸ ö+ èç + ø¸ 
ö+ 5 10 
Overestimate ceiling 
= 9 cn+3c +kn 
10 
Algebra 
£c´n 
0 £ 1 n-3c -kn 
when 10 
" c,k, can find a n0 such that this holds "n≥n0. 
school.edhole.com
20 
Order Statistics 
Why groups of 5? 
? ? 
Sum of two recurrence sizes must be < 1. 
Grouping by 5 is smallest size that works. 
school.edhole.com

More Related Content

Similar to Top school in ghaziabad

Similar to Top school in ghaziabad (20)

lecture 10
lecture 10lecture 10
lecture 10
 
Bs,qs,divide and conquer 1
Bs,qs,divide and conquer 1Bs,qs,divide and conquer 1
Bs,qs,divide and conquer 1
 
Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysis
 
algorithm Unit 2
algorithm Unit 2 algorithm Unit 2
algorithm Unit 2
 
Unit 2 in daa
Unit 2 in daaUnit 2 in daa
Unit 2 in daa
 
Medians and order statistics
Medians and order statisticsMedians and order statistics
Medians and order statistics
 
5.ppt
5.ppt5.ppt
5.ppt
 
Topic11 sortingandsearching
Topic11 sortingandsearchingTopic11 sortingandsearching
Topic11 sortingandsearching
 
n-squared_sorts
n-squared_sortsn-squared_sorts
n-squared_sorts
 
07 Analysis of Algorithms: Order Statistics
07 Analysis of Algorithms: Order Statistics07 Analysis of Algorithms: Order Statistics
07 Analysis of Algorithms: Order Statistics
 
Top school in noida
Top school in noidaTop school in noida
Top school in noida
 
Unit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdfUnit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdf
 
Class 6 - Maths (Integers).pptx
Class 6 - Maths (Integers).pptxClass 6 - Maths (Integers).pptx
Class 6 - Maths (Integers).pptx
 
lecture 11
lecture 11lecture 11
lecture 11
 
Lect01
Lect01Lect01
Lect01
 
Cs1311lecture23wdl
Cs1311lecture23wdlCs1311lecture23wdl
Cs1311lecture23wdl
 
sort search in C
 sort search in C  sort search in C
sort search in C
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
 
Daa chapter5
Daa chapter5Daa chapter5
Daa chapter5
 
Data Structure (MC501)
Data Structure (MC501)Data Structure (MC501)
Data Structure (MC501)
 

More from Edhole.com

Chartered accountant in dwarka
Chartered accountant in dwarkaChartered accountant in dwarka
Chartered accountant in dwarkaEdhole.com
 
Ca firm in dwarka
Ca firm in dwarkaCa firm in dwarka
Ca firm in dwarkaEdhole.com
 
Website development company surat
Website development company suratWebsite development company surat
Website development company suratEdhole.com
 
Website designing company in surat
Website designing company in suratWebsite designing company in surat
Website designing company in suratEdhole.com
 
Website dsigning company in india
Website dsigning company in indiaWebsite dsigning company in india
Website dsigning company in indiaEdhole.com
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhiEdhole.com
 
Chartered accountant in dwarka
Chartered accountant in dwarkaChartered accountant in dwarka
Chartered accountant in dwarkaEdhole.com
 
Ca firm in dwarka
Ca firm in dwarkaCa firm in dwarka
Ca firm in dwarkaEdhole.com
 
Website development company surat
Website development company suratWebsite development company surat
Website development company suratEdhole.com
 
Website designing company in surat
Website designing company in suratWebsite designing company in surat
Website designing company in suratEdhole.com
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in indiaEdhole.com
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhiEdhole.com
 
Website designing company in mumbai
Website designing company in mumbaiWebsite designing company in mumbai
Website designing company in mumbaiEdhole.com
 
Website development company surat
Website development company suratWebsite development company surat
Website development company suratEdhole.com
 
Website desinging company in surat
Website desinging company in suratWebsite desinging company in surat
Website desinging company in suratEdhole.com
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in indiaEdhole.com
 

More from Edhole.com (20)

Ca in patna
Ca in patnaCa in patna
Ca in patna
 
Chartered accountant in dwarka
Chartered accountant in dwarkaChartered accountant in dwarka
Chartered accountant in dwarka
 
Ca in dwarka
Ca in dwarkaCa in dwarka
Ca in dwarka
 
Ca firm in dwarka
Ca firm in dwarkaCa firm in dwarka
Ca firm in dwarka
 
Website development company surat
Website development company suratWebsite development company surat
Website development company surat
 
Website designing company in surat
Website designing company in suratWebsite designing company in surat
Website designing company in surat
 
Website dsigning company in india
Website dsigning company in indiaWebsite dsigning company in india
Website dsigning company in india
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhi
 
Ca in patna
Ca in patnaCa in patna
Ca in patna
 
Chartered accountant in dwarka
Chartered accountant in dwarkaChartered accountant in dwarka
Chartered accountant in dwarka
 
Ca firm in dwarka
Ca firm in dwarkaCa firm in dwarka
Ca firm in dwarka
 
Ca in dwarka
Ca in dwarkaCa in dwarka
Ca in dwarka
 
Website development company surat
Website development company suratWebsite development company surat
Website development company surat
 
Website designing company in surat
Website designing company in suratWebsite designing company in surat
Website designing company in surat
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in india
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhi
 
Website designing company in mumbai
Website designing company in mumbaiWebsite designing company in mumbai
Website designing company in mumbai
 
Website development company surat
Website development company suratWebsite development company surat
Website development company surat
 
Website desinging company in surat
Website desinging company in suratWebsite desinging company in surat
Website desinging company in surat
 
Website designing company in india
Website designing company in indiaWebsite designing company in india
Website designing company in india
 

Recently uploaded

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Top school in ghaziabad

  • 1. Top School in Ghaziabad By: school.edhole.com
  • 2. COMP 482 Order Statistics school.edhole.com
  • 3. 3 Your To-Do List • Read [CLRS] 9. • Assignment 3. school.edhole.com
  • 4. 4 What are Order Statistics? Selecting ith-ranked item from a collection. – First: i = 1 – Last: i = n ù , é n 2 ê – Median(s): i = úú êê úûú êë 2 n school.edhole.com
  • 5. 5 Order Statistics Overview Assume collection is unordered, otherwise trivial. Can sort first – O(n lg n), but can do better – Q(n). school.edhole.com
  • 6. 6 Order Statistics Overview Algorithms for i=1 & i=n are easy. What are they? ? ? Scan data, keeping track of smallest/largest school.edhole.com element seen so far.
  • 7. 7 Order Statistics Overview How can we modify Quicksort to obtain expected-case Q(n)? ? ? Pivot, partition, but recur only on one set school.edhole.com of data. No join.
  • 8. 8 Order Statistics We’ll use this idea. But, by guaranteeing a good split, can get worst-case Q(n). Warning: Non-obvious & unintuitive algorithm ahead! Blum, Floyd, Pratt, Rivest, Tarjan (1973) school.edhole.com
  • 9. 9 Order Statistics: Algorithm Select(A,n,i): Divide input into groups of size 5. /* Partition on median-of-medians */ medians = array of each group’s median. pivot = Select(medians, , ) L,G = partition(A, pivot) /* Find ith element in L, pivot, or G */ k = # of lesser elements + 1 If i=k, return pivot If i<k, return Select(L, k-1, i) If i>k, return Select(G, n-k, i-k) T(n) O(n) O(n) O(n) O(1) O(1) T(k-1) T(n-k) All this to find a good split. Only one done. én/5ù én/5ù én/10ù T( é n / 5 ù ) school.edhole.com
  • 10. 10 Order Statistics: Analysis T n = T æ é n ö ÷ + + ÷ø( ) T(max(k -1,n-k)) O(n) 5 ç çè úúù êê #less #greater How to simplify? school.edhole.com
  • 11. 11 Order Statistics: Analysis Lesser Elements Median Greater Elements One group of 5 elements. school.edhole.com
  • 12. 12 Order Statistics: Analysis Median of Medians Greater Medians Lesser Medians All groups of 5 elements. (And at most one smaller group.) school.edhole.com
  • 13. 13 Order Statistics: Analysis Definitely Lesser Elements Definitely Greater school.edhole.com Elements
  • 14. 14 Order Statistics: Analysis 1 Must recur on all elements outside one of these boxes. school.edhole.com How many?
  • 15. 15 Order Statistics: Analysis 1 ëén 5ù 2û full groups of 5 één 5ù 2ù partial groups of 2 At most 5 n 2 2 n 2 7n 7 êé ù ú éé ù ù êëêê úú úû + êêêê úú úú £ + 5 5 10 Count elements scouhtsoidoel sm.aellderh booxl.e.com
  • 16. 16 Order Statistics: Analysis 2 Equivalently, must recur on all elements not inside one of these boxes. school.edhole.com How many?
  • 17. 17 Order Statistics: Analysis 2 Count elements in ³1 smaller box & pivot. éêéên 5ùú 2ùú -1 groups of 3 At most æ æ éé ù ù ö ö çç ç êê ú ú ¸ ¸¸£ è è êê ú ú ø ø n- 3 n 2 -1 +1 7n +2 5 10
  • 18. 18 Order Statistics: Analysis T n T n T 7n 2 O n ( ) = æçéê ùúö¸+ æç + ¸ö+ ( ) èê 5 úø è 10 ø A very unusual recurrence. How to solve? ? ? school.edhole.com
  • 19. 19 Order Statistics: Analysis $ ( ) £ ´ " ³ 0 0 Substitution: Prove c,n > 0, T n c n, n n T n c n c 7n 2 kn ( ) £ éê ùú+ æç + ö¸+ ê 5 ú è 10 ø c n 1 c 7n 2 kn £ æ æ çè + ø¸ ö+ èç + ø¸ ö+ 5 10 Overestimate ceiling = 9 cn+3c +kn 10 Algebra £c´n 0 £ 1 n-3c -kn when 10 " c,k, can find a n0 such that this holds "n≥n0. school.edhole.com
  • 20. 20 Order Statistics Why groups of 5? ? ? Sum of two recurrence sizes must be < 1. Grouping by 5 is smallest size that works. school.edhole.com