Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 (25pts) As discussed the deterministic algorithm partitions the solution choose to divide into groups of size 5 11. Does the algorithm work in

image text in transcribed

Problem 2 (25pts) As discussed the deterministic algorithm partitions the solution choose to divide into groups of size 5 11. Does the algorithm work in O(n) time, give a proof. . What if we choose groups of size Here is a reminder of the algorithm Deterministic Selection 1) choose pivot number 2.)check if smallest desired number 3.) return item ith smallest else recurse on subset of input let pivot(S,p) return S , S, SB. Clearly pivot is ?(n) time function given IS-n selection(S, , Is, l, k) select(S,, k)-p selection (SB, ISBl,k - IS ISpD k>IS let pivot p-median of medians of each group of size 11 It might help to draw a visual representation of median of the medians of groups of size 11 (a) how big can set S, be (b) how big can set SB be (c) what is mar(S, SB) (d) what is your recurrence relationship for this algorithm e) prove the big-O runtime Problem 2 (25pts) As discussed the deterministic algorithm partitions the solution choose to divide into groups of size 5 11. Does the algorithm work in O(n) time, give a proof. . What if we choose groups of size Here is a reminder of the algorithm Deterministic Selection 1) choose pivot number 2.)check if smallest desired number 3.) return item ith smallest else recurse on subset of input let pivot(S,p) return S , S, SB. Clearly pivot is ?(n) time function given IS-n selection(S, , Is, l, k) select(S,, k)-p selection (SB, ISBl,k - IS ISpD k>IS let pivot p-median of medians of each group of size 11 It might help to draw a visual representation of median of the medians of groups of size 11 (a) how big can set S, be (b) how big can set SB be (c) what is mar(S, SB) (d) what is your recurrence relationship for this algorithm e) prove the big-O runtime

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

=+How has the organization changed its organizational strategy?

Answered: 1 week ago

Question

List the four components of GDP. Give an example of each.

Answered: 1 week ago