Question: Cloud Array is the new upcoming company that has an innovative business model. They offer services in secure array accesses. For this they charge their
Cloud Array is the new upcoming company that has an innovative business model. They offer services
in secure array accesses. For this they charge their customers per array access. They have different types
of cloud arrays and their pricing for cost per access is as follows:
Redk Bluek Greenk
log k k log k k
Starc is running the following code on his machine:
Algorithm Starcs Algorithm
: function ProgramToRunn: A natural number
: k
: sum
: for i to n step do
: sum sum Redi
: if i k then
: sum sum Bluei
: for j to k do
: sum sum Greenj
: end for
: k times k
: end if
: end for
: return sum
: end function
a Analyze the code and give the total asymptotic cost for accessing the Red array.
b Analyze the code and give the total asymptotic cost for accessing the Blue array.
c Analyze the code and give the total asymptotic cost for accessing the Green array.
d Starc feels he is spending too much money on array accesses. He switches to a new plan where
the costs are: Redk k Bluek log k and Greenk Is this plan better in terms of total
asymptotic cost?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
