Question

Need to sort these 16 numbers according to the bitonic mergesort by hand. explained answers are...

Need to sort these 16 numbers according to the bitonic mergesort by hand. explained answers are appreciated

12 11 2 9 4 1 10 5 15 7 14 8 3 13 16 6

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Bitonic Merge Sort is Sorting technique based on Merge sort that works on Bitonic sequence.

A Bitonic Sequence is a sequence where half of the elements are in increasing order and half elements are in decreasing order.

To change the given 12 11 2 9 4 1 10 5 15 7 14 8 3 13 16 6 to a Bitonic sequence we perform transformation .TRANSFORMATION TO BITONIC SEQUENCE - - 11 12 € 9 No = - 00 L - - 1D - 14 | 1o e 1o 5 O 5 DOI Ø - 1st operator - 2nd operator.

The 1st + operator when applied on 2 elements,IF 1st element is smaller than the 2nd element than the position remains the same ,otherwise the position is exchanged.

The 2nd - operator when applied on 2 elements. IF 1st element is larger than the 2nd element then no change in position,otherwise if 1st element is smaller it will exchange place with 2nd element,

we get the following Bitonic Sequence after transformation

1 2 4 5 9 10 11 12 16 15 14 13 8 7 6 3

We then apply the Bitonic Merge Sort on this bitonic sequence

BITONIC MERGE SORT 4 0 3 118 1 . 6 5 5 6 € 3 5 5 6 7 8 15 © 13 0 10 1 0 16 15 14 13 14 CP 9 13 16 @ 6 15 6 13 14 15 16 CHI 1

Since there are 16 elements the, IT sorts elements in group of 8 (16/2),

Then by in those to 8 element groups sorting takes place in group of 4 elements

Then the elements are sorted in group of 4 .And lastly in Group of 2 .

This Gives us the Full Sorted List using Bitonic Merge Sort.

Add a comment
Know the answer?
Add Answer to:
Need to sort these 16 numbers according to the bitonic mergesort by hand. explained answers are...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • For C++ Write a program that randomly generates 100 integers and sorts them using radix sort....

    For C++ Write a program that randomly generates 100 integers and sorts them using radix sort. Note: Your output would not be the same as this sample output due to the randomness. Sample output: 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7...

  • 1. Show the steps in order to sort {11,5,6,3,8,1,9,2} using Mergesort algorithm. 2. Show the element...

    1. Show the steps in order to sort {11,5,6,3,8,1,9,2} using Mergesort algorithm. 2. Show the element sequences of running Shellsort on the input {15,2,8,1,10,7,4,3,9,11,12,6} at the increments {7, 3, 1}, respectively. 3. Show the steps in details of sorting {15, 2, 8, 1, 10, 7, 4, 3, 9, 11, 12, 6} using quicksort with median-of-three partitioning and a cutoff 3 (if the elements are less than 3, using insertion sort).

  • I need to create a C++ program to simulate a Round Robin Tournament. For example: if...

    I need to create a C++ program to simulate a Round Robin Tournament. For example: if a user enters 4, a 4 team tournament would output: 1 2 3 4 2 1 4 3 3 4 1 2 4 3 2 1 My goal is to create this program using a two dimentional array, however I am unsure how to go about doing initializing everything. How do I write a constructor for this? The following is the class declaration I...

  • Cork price: 16 10 15 10 17 11 14 13 11 14 11 16 18 16...

    Cork price: 16 10 15 10 17 11 14 13 11 14 11 16 18 16 10 17 14 14 16 7 10 12 19 15 16 14 9 12 21 13 10 16 12 16 13 17 17 13 14 18 11 12 15 16 13 18 16 17 12 12 14 9 11 14 19 13 11 17 11 13 15 14 18 18 18 12 10 11 13 14 11 14 18 13 13 19 17 14...

  • Java Magic Square: A n x n matrix that is filled with the numbers 1, 2,...

    Java Magic Square: A n x n matrix that is filled with the numbers 1, 2, 3,.... n^2 is a magic square if the sum of the elements in each row, in each column, and in the two diagonals is the same value. I need to write an application that gets 16 values as user input, in any order. Store these values in an ArrayList. When the numbers are put into a square, this would be a 4x4 two-dimensional array....

  • Cork price: 16 10 15 10 17 11 14 13 11 14 11 16 18 16...

    Cork price: 16 10 15 10 17 11 14 13 11 14 11 16 18 16 10 17 14 14 16 7 10 12 19 15 16 14 9 12 21 13 10 16 12 16 13 17 17 13 14 18 11 12 15 16 13 18 16 17 12 12 14 9 11 14 19 13 11 17 11 13 15 14 18 18 18 12 10 11 13 14 11 14 18 13 13 19 17 14...

  • Match the numbers with the descriptions. Numbers may be used more than once. Not all the...

    Match the numbers with the descriptions. Numbers may be used more than once. Not all the numbers will be used. 1. 1 2. 2 3. 3 4. 4 The number of electrons in a 7f subshell 5. 5 6. 6 < The number of electrons in a 2s subshell 7. 7 The number of orbitals in a 5p subshell 00 8 5. 5 The number of electrons in a 7f subshell 6. 6 V The number of electrons in a...

  • Problem 6. The set (Z19 − {0}, ·19) is a group with the indicated operation; see...

    Problem 6. The set (Z19 − {0}, ·19) is a group with the indicated operation; see the attached table. a.) Show that H = {1, 7, 8, 11, 12, 18} is a subgroup. b.) List all the right cosets of H. c.) Show that if Hy = Hx then xy−1 ∈ H. [Make sure to give a reason for each step.] d.) Show that φ : H → Hx defined by φ(h) = hx is one-to-one and onto. [Use the...

  • When answering, please refer to your answers according to the NUMBER in the box. Need to...

    When answering, please refer to your answers according to the NUMBER in the box. Need to know answer but also if there was change or no change in column #9 Finding Equilibrium for I = 50, G = 50, and T = 50 (1) Output (Income) Y (2) Net Taxes T (3) Disposable Income YdY-T (4) Consumption Spending C = 100+ .25Yd (5) Saving Yd-C (6) Planned Investment Spending I (7) Government Purchases G (8) Planned Aggregate Expenditure C+I+G (9)...

  • Show step by step how the merge procedure of merge sort will merge the arrays 1,...

    Show step by step how the merge procedure of merge sort will merge the arrays 1, 3, 4, 7, 9, 11, 13, 14 and 2, 5, 6, 8, 10, 12

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT