#optimize this pseudo code as real code in your language of choice #create two sets of random data of the same shape with values between 0 and 100, whole integers data1 = random(shape of 1000,1000) data2 = random(shape of 1000,1000) #between the two sets of 2d data, # 1. find the top 10 values with the smallest difference for the same x,y location # 2. find the top 10 values with the largest difference for the same x,y location # 3. assume the coordinate system x = 0 to 1000 and y = 0 to 1000 represents meters # (that is, the entire 2d array represents 1 square km) # 4. Out of the 10 locations with the smallest difference in values, find the two points that are farthest away. # 5. Out of the 10 locations with the largest difference in values, find the two points that are closest together. # Optimize this the best you can with your language of choice. # you MUST start this exercise using a nested loop structure to find all of the items noted above. # After that, you can do as you please to solve this problem as efficiently as possible, # optimized for time (cpu). #Time the performance #least for all x positions for all y positions find least difference 1 to 10 #greatest for all x positions for all y positions find greatest difference 1 to 10 #time it for 10 least difference for 10 least difference find farthest away points #print them out #time it for 10 greatest difference for 10 greatest difference find closest away points #print them out #Deliverables # 1. One version of working code that uses the nested loops to arrive at the solution # 2. One version of working code that uses any other technique you please. # 3. Document the iterations of your optimization attempts in the code as comments. # for examples, you might run the code once in certain state, note the time it took to complete and then comment on that # note 1) for x for y loop takes 1.3 seconds to find the first smallest difference # note 2) changed nested for loop to array aggregate function and used a where function to find small values. took .017 seconds # email these two code files to chris.galli@utah.edu with a subject of "ATMOS 6910 HW 10" # due Nov 23 close of business. Just get it done before the Thanksgiving break. No need to carry any homework across the holiday break.