Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

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_2

Step: 3

blur-text-image_3

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

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions

Question

What strategy does Heineken follow in the global beer market?

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago