Question: Question 1 : Which factor results in the difference between the average and worst case efficiencies of quick sort? ( 1 0 points ) Question
Question : Which factor results in the difference between the average and worst case
efficiencies of quick sort? points
Question : Let be a collection of objects. Describe an efficient method for converting A into a
set. That is remove all duplicates from What is the running time of this method? points
Question : Suppose we are given two element sorted sequences A and that should not be
viewed as sets that is A and may contain duplicate entries Describe an time method
for computing a sequence representing the set with no duplicates points
Question : For each of the following questions, trace the time taken by your programs ie
plot the time vs inputsize graph You can choose a language of your choice. Briefly discuss
how do your experimental results compare with the theoretical algorithm analysis ie the
bestcase and worstcase discussions that was studied in the class.
A Difference between Linear Search and Binary Search running times: Implement the
linear search and the binary search algorithms in a language of your choice. points
B Difference between Bubble Sort and Quick Sort running times: Implement the bubble
sort and the quick sort algorithms in a language of your choice. points
C Implementing Merge Sort on Linked Lists: Convert your listarray sequence that you
used as the input for the above sorting algorithms into the linked list format. Implement
the merge sort algorithm on this linked list. points
Create a list or an array comprising numbers from to where is the input size. You can use
an inbuilt function to generate the abovementioned list of numbers. You need to generate
your list in the following ways: points
I The list should be sorted in nondecreasing order.
II The list should be sorted in nonincreasing order.
III The list should contain numbers in a random order.
For the searching algorithms, randomly select a number within or outside the generated list,
which will be used as the input number that needs to be searched.
Run your experiments for input size Also, for each input
size, run each of the codes a number of times, say or times, and take the average of the
running time over all those runs. Then, use this average number in your graph plot. Taking the
average time over multiple runs ensures that your time recordings are independent of any
interruptions caused by background services that may be running on your machines.
Your outputs should comprise of the "input vs time" graph for each of the three
implementations and mentioned above. Additionally, within each implementation,
you need to show plots corresponding to the different data generation methods I II and III
mentioned above. You can use a language's builtin functions to record the running time of a
program.
The goal of this question is to understand, through experimental analysis, how different inputs
can affect the performance of different searching and sorting algorithms.
Question : Which factor results in the difference between the average and worst case
efficiencies of quick sort? points
Question : Let be a collection of objects. Describe an efficient method for converting A into a
set. That is remove all duplicates from What is the running time of this method? points
Question : Suppose we are given two element sorted sequences A and that should not be
viewed as sets that is A and may contain duplicate entries Describe an time method
for computing a sequence representing the set with no duplicates points
Question : For each of the following questions, trace the time taken by your programs ie
plot the time vs inputsize graph You can choose a language of your choice. Briefly discuss
how do your experimental results compare with the theoretical algorithm analysis ie the
bestcase and worstcase discussions that was studied in the class.
A Difference between Linear Search and Binary Search running times: Implement the
linear search and the binary search algorithms in a language of your choice. points
B Difference between Bubble Sort and Quick Sort
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
