Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5) You wish to perform a daily re-sorting of the most visited student websites from CS251. You are allowed to consider the following approaches (in

image text in transcribed

5) You wish to perform a daily re-sorting of the most visited student websites from CS251. You are allowed to consider the following approaches (in all of them n is the number of students): Approach A) If you assume that the popularity of the websites among students do not change much from day to day, you can implement an O(n) average running time algorithm to keep the website popularity sorted in daily manner (n is the number of students who search the website on that day). This algorithm costs 100 time units per step to perform Approach B) If you ignore the assumption of constant popularity, you can be provided with an 0(n2) sorting algorithm to keep the website popularity sorted in daily manner(based on the search of student on that day) but we do not know the cost of this algorithm per unit. However, we know that 20 students are registered to CS251 Approach C) Assume you are provided with an O(n log(n)) sorting algorithm and this algorithm costs 50 time units per step to perform Note: Base of the logarithm is 10 for all the calculations. 5-1) What should be the cost per time unit for Approach B so it takes the same amount of time as Approach A? b. 5 C. 100 d. 2000 5-2) How many students should register to CS251 so Approaches A and C take the same amount of time? a. 20 b. 50 C. 100 d. 200

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

What is an interface? What keyword is used to define one?

Answered: 1 week ago