Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[Randomized Algorithms]. Consider the following (unusual) randomized algorithm for nding the maximum among a set of numbers X (there is a context where such approach

[Randomized Algorithms]. Consider the following (unusual) randomized algorithm for nding the maximum among a set of numbers X (there is a context where such approach is useful).

For simplicity, we assume that the numbers in X are all dierent. random(X) returns one of the elements in X uniformly at random (each is equally likely).

(a) Obtain a recurrence for the expected number of recursive calls in the execution of FindMax. (You need to take into account in the recurrence that x is chosen at random; you shouldnt simply assume that x is in the middle on the average.)

(b) Solve the recurrence obtained in the previous part.

(c) Obtain a recurrence for the expected running time of Find-Max.

(Same remark as

above.)

(d) Solve the recurrence obtained in the previous part.

(e) What is the probability that Find-Max(X) compares the i-th largest and the j-th largest items in X ? Here, we mean the i-th and j-th largest in the linear order (1-st largest is the max, n-th largest is the min). We also mean the probability over all the execution of the algorithm, including recursive calls.image text in transcribed

(Randomized Algorithms, 30 points). Consider the following (unusual) randomized al- gorithm for finding the maximum among a set of numbers X (there is a context where such approach is useful). FIND-MAX (X) 1.n+ X 2.x* + random(X) 3.Y + 4. for each I e X do 5. if r*

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

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students also viewed these Databases questions

Question

Question What integration level should an employer choose?

Answered: 1 week ago