Question: Binary Search vs. Brute Force Search Algorithms for Finding a Local Minimum in a Two- Dimensional Array Due: March 6th, 2018: 1 PM In this

 Binary Search vs. Brute Force Search Algorithms for Finding a Local

Binary Search vs. Brute Force Search Algorithms for Finding a Local Minimum in a Two- Dimensional Array Due: March 6th, 2018: 1 PM In this project, you will use C++ programming language to implement the binary search-based 0(n) algorithm to determine the local minimurm in an 'n, x 'n' two-dimensional array (as discussed in Module 2) and compare its run-time performance with that of a brute force O(n2) algorithm that searches for the local minimum element by element until one is found. Note that both the binary search and the brute force search algorithms should stop once a local minimum is found. You should create random two-dimensional arays (with numRows- numCols) with unique elements in the range [1... numRows numCols] for the following values of numRows (numCols) and determine the average execution time of the binary search and the brute force search algorithms by running 200 trials for each of the numRows (numCols) values. Determine the running times in nano seconds or milliseconds, as appropriate. num Rows (numCols) values: 4,6, 8, 10, 15, 20, 25, 30, 35. 40, 50, 75, 100, 150, 200, 250, 300. 350 ot the results with numRows in X-axis and the average execution times (in nanoseconds or Pl milliseconds) of the binary search and the brute force search algorithms in the Y-axi

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 Databases Questions!