Question
Q1) Sort the following steps to design an algorithm for sorting a list of n integers using a PRAM model with p processors where n
Q1)
Sort the following steps to design an algorithm for sorting a list of n integers using a PRAM model with p processors where n is divisible by p, p is an even number, and n>p.
Repeat the merge-sort process until the entire list is sorted.
Assign the arrays to different processors.
Sort and split the arrays to get p arrays of size n/p each.
Each processor sorts the array using a serial sorting algorithm (e.g., quicksort).
Divide the list into p equal-sized arrays.
Perform an odd-even merge on the processors arrays to create p/2 arrays of size 2n/p each.
Q2)
What is the type of this PRAM algorithm (EREW, CRCW, ERCW, CREW) used in Q1
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