Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code should be written in Java. a word document containing the two Excel plots (as required above for each 'm' value) and your explanation interpreting
Code should be written in Java. a word document containing the two Excel plots (as required above for each 'm' value) and your explanation interpreting the results.
Project 1: Brute Force Algorithm for the Element Uniqueness Problem Due by: Feb. 8th, 1 PM In this project, you will implement the brute force algorithm discussed in Module 1 for the "Element Uniqueness Problem." Each of you have been assigned two 'm' values that correspond to the maximum value for an element in the array. The two 'm' values are independent of each other and should be considered separately For a particular 'm' value, the values for the array size'n' are: 0.1m, 0.2m, 0.3m, 0.4m, 0.5m, 0.6m, 0.7m. 0.8m, 0.9m, m. For example, if m = 100, the values of the array size 'n' are: 10, 20, 30, 40, 50, 60, 70, 80. 90, 100. As part of your code, you should generate an array of size 'n' whose values are generated randomly in the range [1...m]. Your algorithm should keep track of the number of comparisons needed to determine whether the array of random elements (generated as above) is unique or not. You should run your algorithm/code several times (say. 10000 times using an automated loop) for each (n, m) pair and determine the average number of comparisons For each of the two 'm' values (with 'n' varying from 0.I m to m as described above), plot the values for 'n vs. the average number of comparisons for the n valueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started