Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Recursive Algorithm to Find the Minimum Integer in an Array and its SpaceTime Tradeoff Performance Comparison Analysis with an Iterative Algorithm Design and implement a

Recursive Algorithm to Find the Minimum Integer in an Array and its SpaceTime Tradeoff Performance Comparison Analysis with an Iterative Algorithm

Design and implement a recursive algorithm to find the minimum integer in an array of integers. The recursive algorithm should be in-place (i.e., its memory requirements should not grow with the input size). You will also implement an iterative version of the algorithm to find the minimum integer in an array of integers and compare the performance of the recursive vs. iterative versions.

Run the implementations for 100 times (automated via a loop) for each of the following values of array size and average the results of the run-time (in milliseconds or nanoseconds, if the former is a very small value) for the recursive and iterative versions. Array Size: 10, 102 , 103 , 104 , 105.

The value of the elements in the array can range from 0 to 9999.

Submit:

CODE Should Be In Java

(a - 15 pts) Pseudo code for the recursive algorithm and the explanation of its working

(b - 8 pts) Justify the space-complexity of the algorithm is (1), i.e., it is in-place.

(c - 12 pts) Analyze the time-complexity of the algorithm and show that it is (n) for an array of size 'n'

(d - 45 pts) Code for the implementations of the recursive (30 pts) and iterative algorithms (15 pts)

(e - 10 pts) Excel chart comparing the average run-time of the recursive vs. iterative algorithms for the different array sizes (consider plotting the X and Y values on a logarithmic scale, to the base 10)

(f - 10 pts) Your interpretation of the results for the average run-time of the iterative and recursive versions.

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

Step: 3

blur-text-image

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

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

=+multiplicity 1). If A + 1, then |A| Answered: 1 week ago

Answered: 1 week ago