Is there any one could help me on assignment? For this assignment, we will use the following array of 16 numbers:   [8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15]   Answer the Multiple Choice questions below based on the progression of applying the Mergesort algorithm on this array. As usual, more than one answer can be highlighted and D is always going to be “None of the above”.   When we first start Mergesort on this array, we will split it to look at 2 sub arrays. The 2 sub arrays are:   [8 12 14 1 3 5 11 10] [9 7 4 2 6 13 16 15]   Which of the following is true at this point of the algorithm? The two subarrays are now ready to merged and then Mergesort is called recursively on the left and right side of each sub array When the subarray [8 12 14 1 3 5 11 10] has completed its own recursive Mergesort calls, the array will look like [1 8 12 14 3 5 10 11] which will then call Merge to make [1 3 5 8 10 11 12 14] When the subarray [9 7 4 2 6 13 16 15] has completed its own recursive Mergesort calls, the array will look like [2 4 6 7 9 13 15 16] which will then call Merge to make [2 4 6 7 9 13 15 16] None of the above   Now looking just at Mergesort for the subarray [8 12 14 1], this will split and call Mergesort recursively.   Which of the following is true about reaching this point of the Mergesort algorithm? [8 12] will be one of the sub arrays and will result in [8 12] after merging [8] and [12] [14 1] will be the other sub array and will result in [1 14] after merging [14] and [1] When the merge is performed on these 2 subarrays, we expect it to result in the subarray [8 12 1 14] None of the above       We will next look at Quicksort on the same array of 16 numbers:   [8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15]   Answer the Multiple Choice questions below based on the progression of applying the Quicksort algorithm on this array.   When we start Quicksort on this array, we begin with partitioning it.   Which of the following is true at this point of the algorithm? The selected pivot value will be 13 After partition, the array will be [8 12 14 1 3 5 11 10 9 7 4 2 6 13 15 16] The next action immediately after this partitioning is to first recursively apply Quicksort on [15 16] and then Quicksort on [8 12 14 1 3 5 11 10 9 7 4 2 6] None of the above   short answer:- From the original array of [8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15], show what the entire array looks like after each time the partition function is called within the Quicksort algorithm. Indicate each time what the selected pivot value is for that partition.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Is there any one could help me on assignment?

For this assignment, we will use the following array of 16 numbers:

 

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

 

Answer the Multiple Choice questions below based on the progression of applying the Mergesort algorithm on this array. As usual, more than one answer can be highlighted and D is always going to be “None of the above”.

 

When we first start Mergesort on this array, we will split it to look at 2 sub arrays. The 2 sub arrays are:

 

[8 12 14 1 3 5 11 10]

[9 7 4 2 6 13 16 15]

 

  • Which of the following is true at this point of the algorithm?
    1. The two subarrays are now ready to merged and then Mergesort is called recursively on the left and right side of each sub array
    2. When the subarray [8 12 14 1 3 5 11 10] has completed its own recursive Mergesort calls, the array will look like [1 8 12 14 3 5 10 11] which will then call Merge to make [1 3 5 8 10 11 12 14]
    3. When the subarray [9 7 4 2 6 13 16 15] has completed its own recursive Mergesort calls, the array will look like [2 4 6 7 9 13 15 16] which will then call Merge to make [2 4 6 7 9 13 15 16]
    4. None of the above

 

Now looking just at Mergesort for the subarray [8 12 14 1], this will split and call Mergesort recursively.

 

  • Which of the following is true about reaching this point of the Mergesort algorithm?
  1. [8 12] will be one of the sub arrays and will result in [8 12] after merging [8] and [12]
  2. [14 1] will be the other sub array and will result in [1 14] after merging [14] and [1]
  3. When the merge is performed on these 2 subarrays, we expect it to result in the subarray [8 12 1 14]
  4. None of the above

 

 

 

We will next look at Quicksort on the same array of 16 numbers:

 

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

 

Answer the Multiple Choice questions below based on the progression of applying the Quicksort algorithm on this array.

 

When we start Quicksort on this array, we begin with partitioning it.

 

  • Which of the following is true at this point of the algorithm?
    1. The selected pivot value will be 13
    2. After partition, the array will be [8 12 14 1 3 5 11 10 9 7 4 2 6 13 15 16]
    3. The next action immediately after this partitioning is to first recursively apply Quicksort on [15 16] and then Quicksort on [8 12 14 1 3 5 11 10 9 7 4 2 6]
    4. None of the above

 

short answer:-

From the original array of [8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15], show what the entire array looks like after each time the partition function is called within the Quicksort algorithm. Indicate each time what the selected pivot value is for that partition.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Mergesort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education