Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

my teacher wants us to find the efficiency using a data set of 2000 elements. she says to put It into a text file. i

image text in transcribed

my teacher wants us to find the efficiency using a data set of 2000 elements. she says to put It into a text file. i have no idea how to do that. here I show an example of another part of this project where we find the efficiency of an 3 (differently ordered) arrays with the size of 10

image text in transcribed

image text in transcribed

I am assuming it has a similar structure. we use scanner class to read input files.

Step 2: Experimenting with large data sets of 2000 elements. The results must be reported in the same table format. In addition in the report, explain the empirical results generated by your program comparing them to the known theoretical results paying special attention to any discrepancies which must be clearly explained Must submit for grading: the java code ONLY and the report (Word document) containing your empirical results as explained above and MOST IMPORTANTLY the analysis of this results what do they suggest, are they consistent with expected (theoretical) results, why - explain the algorithms, how the algorithms compare based on YOUR results. Also report everything that deviates from expectations and explain it. Note that this report is 95% of the grade - the code is supplemental necessity to allow you to write the report. public class SortsPrepSelection { public static void main (String [] args) { System.out.println (" System.out.println ("Testing selection sort: "); int[] arrayselection int[] array2Selection int[] array3Selection {1, 2, 3, 4, 5, 6, 7, 8, 9, 10); (10, 9, 8, 7, 6, 5, 4, 3, 2, 1); {1, 3, 2, 5, 4, 7, 9, 6, 8, 10); --- System.out.println (" best case ---"); selectionSort (arraySelection); System.out.println (" worst case ---"); selectionsort (array2Selection); System.out.println ( avarage case selectionsort (array3Selection); ---"); System.out.println(" -- public static void selectionsort (int[] array) { int temp, min, exchanges o, comparisons = 0; int numberofitems = array.length; for (int pass=0; pass != numberofitems 1; pass++) { min = pass; for (int index = pass+1; index != numberOfItems; index++) { comparisons++; if (array[index]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

b. What groups were most represented? Why do you think this is so?

Answered: 1 week ago

Question

3. Describe the strategic training and development process.

Answered: 1 week ago

Question

10. Microsoft Corporation

Answered: 1 week ago

Question

4. EMC Corporation

Answered: 1 week ago