Question: Problem 1 : An empirical comparative study should be conducted on the following sorting algorithms by counting the number of comparisons: Bubble Sort Insertion Sort

Problem 1:
An empirical comparative study should be conducted on the following sorting algorithms by counting the number of comparisons:
Bubble Sort
Insertion Sort
Selection Sort
Merge Sort
Heap Sort
Quick Sort
A. Generate the input arrays:
Integer arrays of sizes: 10,100,1,000,10,000,100,000,1,000,000, and 10,000,000.( you may change the range of sizes according to your computer's performance)
For each size, generate three types of arrays:
i. Random array.
ii. Sorted array (ascending order, starting from 0).
iii. Inversely sorted array (descending order, from size-1 to 0).
B. Save results in an Excel sheet with the following structure:
Rows represent array sizes.
Columns represent:
i. Theoretical comparisons.
ii. Empirical comparisons for the three array types.
iii. A total of 6 columns per algorithm.
(36 columns in total).
C. Visualize the results:
Plot the relationship between empirical and theoretical complexity for each algorithm separately.
Plot the empirical complexity comparison across all algorithms for each case (random, sorted, and inversely sorted arrays) Using java would be great for the code please create the excel file as well as the visualized graphs (DONT USE AI)
Problem 1 : An empirical comparative study should

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!