Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement a C# application to sort 'N' randomly generated numbers using Rank sort. The Program should use following three design techniques: a) Serial (single

image text in transcribed  image text in transcribed image text in transcribed

Implement a C# application to sort 'N' randomly generated numbers using Rank sort. The Program should use following three design techniques: a) Serial (single threaded) application b) Multithreaded application (using Thread objects) c) Multithreaded application (using a ThreadPool) Compute the execution time of these three techniques using randomly generated arrays of different sizes (for N = 100, 500, 1000, 2000, 5000, 10000, 20000, 50000 and 100000). Prepare a comparison table to compare the performance of these three techniques. Conclude your findings. (Hint: Stopwatch class can be used to log execution time). N 100 500 1000 5000 10000 20000 50000 100000 Serial Time Multithreaded Time ThreadPool Time Rank Sort: The idea of Rank sort is simple: The numbers that are smaller than each selected number are counted. This count provides the position of selected number in sorted list; that is, its "rank". First a[0] is read and compared with each of the other numbers, a[1] ... a[n-1], recording the number of numbers less than a[0]. Suppose this number is x. This is the index of the a[0] in the final sorted list. The number a[0] is copied into the final sorted list b[0] ... b[n-1], at location b[x]. The same actions are repeated with the other numbers.

Step by Step Solution

3.52 Rating (159 Votes )

There are 3 Steps involved in it

Step: 1

using System using SystemDiagnostics using SystemThreading class Program static void Main int sizes 100 500 1000 2000 5000 10000 20000 50000 100000 ConsoleWriteLineSizetSerial TimetMultithreaded Timet... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Auditing and Assurance services an integrated approach

Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley

14th Edition

133081605, 132575957, 9780133081602, 978-0132575959

More Books

Students also viewed these Accounting questions

Question

Who was the highest paid athlete in sports in the 1 9 9 0 s ?

Answered: 1 week ago

Question

What is the EPEAT tool? How is it used?

Answered: 1 week ago

Question

understand the restrictions of top-down job redesign approaches;

Answered: 1 week ago