A new algorithm MaxPack for optimally packing furniture in a transportation container claims to have worst case complexity O(n2 log n), where n is the number of items to be packed.
From this, we can conclude that:
a. For every sufficiently large n, for every input of size n, MaxPack requires time proportional to n2 log n.
b. For some n, for every input of size n, MaxPack requires time proportional to n2 log n.
c. For every sufficiently large n, every input of size n can be solved by MaxPack within time proportional to n2 log n.
d. For every sufficiently large n, there is an input of size n for which MaxPack requires time proportional to n2 log n.
Answers
Answered by
1
In computer programming, the worst and best case scenario are specific cases in an algorithm which determines the minimum and maximum resource usage.
The worst case scenario helps in determining the maximum time an algorithm may need to complete its execution.
On the other hand, best case scenario helps in setting benchmark times for the algorithm.
Answered by
1
Thank you for asking this question. Here is your answer.
The correct answer to this question is:
C) For every n, every input of size n can be solved by MaxPack within time proportional to n2 log n.
I hope this helps you understand, if there is still any confusion please leave a comment below.
Similar questions