Resolving competing sorting constraints

A scheduling service must preserve arrival order among records with equal priority. It permits batch sizes of only 256, 512, or 1024 records. Its policy accepts an implementation only if its documented worst-case operation bound is at most 500000 operations and its auxiliary-memory requirement is at most 9000 bytes.


For this planning problem, use the following bounds exactly. They include all auxiliary allocations; input storage is funded separately.


Implementation

Stable

Worst-case operation bound

Auxiliary memory in bytes

P

Yes

6n26n^2

4848

Q

Yes

30nlog⁡2n30n\log_2 n

12n12n

R

No

10nlog⁡2n10n\log_2 n

3232


Find the largest permitted batch size that meets every requirement. Then find the smallest increase in the auxiliary-memory limit that would permit a batch of 1024 records while keeping the other requirements unchanged. Give the batch size in records and the increase in bytes, both as exact integers.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Sorting Algorithms Questions: