Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Merge sort is one of divide-and-conquer algorithm to sort a list of items efficiently. The following is the Pseudo code of merge sort. In this
Merge sort is one of divide-and-conquer algorithm to sort a list of items efficiently. The following is the Pseudo code of merge sort. In this homework, you need to 1) write a merge parallelize your merge sort program using OpenMP tasks. 3) test your serial and OpenMP merge sort program using a list of random numbers with size of 10,000,000, report the speedup of your OpenMP program vs. your serial program. Algorithm 1: MergeSort (A) Input : Array A of length n Output: Sorted A 1 if n is 1 then 2return A 3 end 4 else L mergesort(ALO, R mergesort (A [2 , return Merge(L, R) , j) . . . , nj ) 7 8 end Merge sort is one of divide-and-conquer algorithm to sort a list of items efficiently. The following is the Pseudo code of merge sort. In this homework, you need to 1) write a merge parallelize your merge sort program using OpenMP tasks. 3) test your serial and OpenMP merge sort program using a list of random numbers with size of 10,000,000, report the speedup of your OpenMP program vs. your serial program. Algorithm 1: MergeSort (A) Input : Array A of length n Output: Sorted A 1 if n is 1 then 2return A 3 end 4 else L mergesort(ALO, R mergesort (A [2 , return Merge(L, R) , j) . . . , nj ) 7 8 end
Step 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