Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Analyzing Shellsort Gap sequences Project

Analyzing Shellsort Gap sequences Project

Analyzing Shellsort Gap sequences Project

A Flexible ShellSort
Write a version of Shellsort, shellSortX(), that takes, as input, a gap sequence. Use an int array for the gap sequence .
Here is how the client might use the shellSortX():
final int ARRAY_SIZE = 10000; Integer[] arrayOfInts1 = new Integer[ARRAY_SIZE]; Integer[] arrayOfInts2 = new Integer[ARRAY_SIZE]; int[] gapArray = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576}; int[] sedgewickArray = new int[30]; // to be computed using formulas // … other gap arrays … // fill distinct arrays with identical random values so we can compare gaps … shellSortX(arrayOfInts1, gapArray); // time this … shellSortX(arrayOfInts2, sedgewickArray); // time this …
Client Requirements
Write your generic above main() so we can see it along with the client in a single file.
Investigate at least four different gap sequences
Shell’s implied gap sequence which is computed in shellSort1().
Shell’s explicit gap sequence shown above (passed explicitly to shellSortX())
Sedgewick’s gap sequence – use the computational definition in the text, and find a way turn that into a sequence in your client using loops, print it out to be sure you are getting a good sequence, and then use it in shellSortX().
The best gap sequence you can come up with. I don’t care if it’s trial-and-error or based on something you found. If you can’t find anything better than Sedgewick, then show me the best you found that isn’t one of the three above.
Run each gap sequence on six sizes of int arrays ranging from 10,000 to 200,000. If you want to go smaller than 10,000 or larger than 200,000, you may, but at least cover that range. Create a table of the four sequences and six array sizes.
Answer these questions at the end of your file: Why does Shell’s gap sequence implied by shellSort1() give a different timing result than the explicit array described above and passed to shellSortX()? Which is faster and why?
Optional – See if you can determine, estimate, guess, or fudge a theta time estimate for each sequence.
Because this assignment is about your doing research, the instructor’s solution will only show shellSortX() and a sample run on one or two arrays, but not include any tabular results on all four gap sequences or six arrays.

“Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results.”

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Blackboard Experts only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Blackboard Experts are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Blackboard Experts is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Blackboard Experts, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.