A give annbsponnbsplognbspg algorithm to solve this problem


1. Suppose we want to partition items into equal-sized groups of size N/G, such that the smallestN/items are in group 1, the next smallest N/items are in group 2, and so on. The groups themselves do not have to be sorted. For simplicity, you may assume that and are powers of two.

a. Give an O(log G) algorithm to solve this problem.

b. Prove an 0.(log G) lower bound to solve this problem using comparison-based algorithms.

2. Give a linear-time algorithm to sort fractions, each of whose numerators and denominators are integers between 1 and N.

3. Suppose arrays and are both sorted and both contain elements. Give an O(log N) algorithm to ?nd the median of ∪ B.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: A give annbsponnbsplognbspg algorithm to solve this problem
Reference No:- TGS01274687

Expected delivery within 24 Hours