Homework Assignment #2 Due: Thursday February 1 1. Using a multicore complexity model, describe the asymptotic cost (time and space) as a function of problem size (n) and number of cores (p), for the program you developed in Homework 1. 2. Measure the actual performance of your multicore program, timing ONLY the portion of your code that performs the histogramming. (Do not time startup or initialization of the array.) Plot two graphs as follows. a. Running time versus problem size using default number of threads. Use a log-log plot, and on the on the x-axis, use power-of-two problem sizes starting at 2^10 and increasing (2^11, 2^12, ...) until your data structures no longer fit within memory. b. Running time versus threads. Select the largest problem size that could be run (from part a), and vary the number of threads from 1 to 16. 3. Using SWARM, implement a multicore algorithms that solves the following problem. Input: An array A of size n filled with random integers in the range 0 to 255. Output: Each core should know the location in A of the left-most position in A with value 13. If this value is not contained in the input, then the result should be the location of the left-most position in A that has the next higher value that does appear in the array. Hint: Try using prefix-sums (scans).