Question: Question 4 : Lower Bounds and Linear time Sorting ( a ) 1 0 points Let ( A [ ] ) be an
Question : Lower Bounds and Linear time Sorting
a points Let A be an array of n real decimal numbers, uniformly distributed from to A student would like to print out the smallest mathrmtsqrtn numbers in increasing order. Consider the three approaches below:
OPTION
ksqrtn
poperatornameSelectA n k
Loop through A and store all items that are less than or equal to p in a list L
Sort list L in increasing order, using QuickSort.
Print L
OPTION
Setup Bucket sort using equallysized buckets in the range to Bucket covers the range to inclusively.
Distribute the points into buckets.
Run insertion sort on the elements of bucket
Print out the sorted elements from bucket
OPTION
Loop through input A and set m to be the maximum element found
Use Counting sort with maximumsized element m
Print out the first sqrtn elements from the resulting sorted array
Your Job:
For each option, determine if the procedure correctly solves the problem.
Determine the Expected runtime of each approach, and justify your answer.
Which option is expected to be asymptotically faster? Or are they expected to be asymptotically equivalent?
b points Draw the decision tree for the inplace partition algorithm on four elements.
c points A car license consists of characters, where the characters alternate between alphabetic characters A to Z and numerical characters to An example of a valid license is B C X Explain how to sort a set of n licenses using Radix sort, and justify the runtime.
I need the answer in written format on paper
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
