Write a program in Clojure that will read a textfile containing unsigned integers. Your program will read in a large collection of integers and put them into a list. Using code in your program (i.e....


Write a program in Clojure that will read a textfile containing unsigned integers. Your program will read in a large collection of integers and put them into a list. Using code in your program (i.e. NOT calling a library routine), sort the integers into order, using either the quicksort or mergesort algorithm. For the first pass, carry this out in a single-threaded program. Then, using Clojure's parallelism options, repeat the sort of the original list, using 2, 4, 8, 16, and 32 threads. Repeat all sorts 5 times on the same hardware and report the average times.Do not count file access time as part of the sorting time.Plot the completion time as a function of the number of threads, and produce a short (1-2 page) document summarizing and explaining your results.The summary document should include charts or graphs as appropriate to summarize your data and support your findings.


Submit your Clojure code and summary document.


Two sample input files are attached--one with 500 integers, the other with 10,000. (The smaller will be faster for testing; use the larger one to get your final results.) In both, the first thing in the file is the number of integers in the file, followed by the specified number of values.




100 97 75 21 80 74 81 17 48 40 27 26 79 4 82 84 13 26 97 86 60 5 63 45 81 36 16 63 73 50 9 10 6 14 58 24 79 83 24 29 38 25 73 56 46 30 98 21 9 86 80 97 11 26 83 25 96 82 2 19 38 68 66 39 86 76 78 32 80 39 53 95 12 30 54 88 38 57 9 79 85 27 19 85 62 70 61 90 32 75 38 66 12 1 9 75 80 89 95 1 58
May 11, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here