Apply the selection algorithm to the sequence 9, 12, 5, 17, 20, 30, 8 to find the median. Show the steps of the algorithm in a manner similar to the example shown below for organization(this is not a solution, it is just provided as an example).
Apply the selection algorithm to the sequence 9, 12, 5, 17, 20, 30, 8 to find...
8. (5 points) Trace merge sort algorithm as it sorts the following sequence of integer array into a descending order. 42 45 10 64 55 37 96 7 9. (5 points) Trace shell sort algorithm that halves the gap size at each iteration as it sorts the following sequence of integer array into an ascending order. 42 18 10 64 85 37 96 71 8. (5 points) Trace merge sort algorithm as it sorts the following sequence of integer array...
o8: (5 marks) the maximum-matching algorithm to the following bipartite graph: Apply 2 8 9 10
show your tree clearly Given four sets with priorities S1{10, 15, 3, 8, 20, 5, 17, 15, 19, 12, 7, 113, s,-{18, 2, 16, 5, 9, 7, 12, 8, 16, 9), s,-(10, 15, 3, 8, 20, 5), and S4 (16, 15, 9, 17, 12, 2, 6}
Consider the following data set of skid distance in feet): 12, 17, 8, 9, 11, 5, 22, 17, 11, 16, 17, 15, 20 sa continuation of number 7. Use your work from above. Suppose that the skid distances In what interval would you expect to find 68% of the skid data? 518, 11, 11, 12, 15, 17, 17,17 18,19,20,22 17 a. Sample size: 13 c. Range: b. Mode: d. Mean: 14.8 e. Median: 17 Drmally distributed with a standard deviation...
help with 8, 9 and 10 8. Is the sequence 5, 10, 15, 20, 25, ... arithmetic or geometric? 9. Find the sum of the first 50 terms of the sequence given. 1 1 1 3,1, 3'9'27 10. Find the sum of the infinite series given. į(-1) 3
. Shell sort is a sorting algorithm similar to insertion sort. Research shell sort and apply that to the following array. Show your work in Detail. [15 points] 45 20 50 10 80 30 60 70 40 90 2. Is Shell sort a stable sorting algorithm? Answer this with an example. [10 points] 3. Apply Merge Sort to sort the following list. Show your work in Detail. [15 Points] 45 20 50 10 80 30 60 70 40 90 4....
Sorting Sort the following array using the quick sort algorithm: (4 Marks) a. 12 26 8 9 7 0 4 Pivot selection is defined to be the first element of each sub-list. Show the array before and after each quicksort round (when the array is partitioned after placing the pivot at its correct position). Also, clearly highlight the pivot in each partition b. Consider an unsorted array of integers of size n. Write a Java program to arrange the array...
Subject: Algorithm. solve only part 3 and 4 please. 2.2 Selection- 5 points each 1. Run the simultaneous min-and-max algorithm on the array A 4, 2, 12, 6, 13,9,15). (16, 7, 10, 1,5, 11,3,8, 14, 2. Explain why the above algorithm is better than the naive algorithm for finding minimum and maximum separately. How many comparisons does the naive algorithm do? How many comparisons does the simultaneous min and max do? 3. Use the randomized select algorithm based on partition...
Implement the frame replacement algorithm for virtual memory Assume a computer system have 10 memory frames available inside the physical memory and is required to execute a process containing 20 pages. Assume a process P has been executed in the system and produced a sequence of 40 page demands as follows: Page demands trace of process P Demand 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 cont. Page...
8. [10 points) Consider the following algorithm procedure Algorithm(: integer, n: positive integer; 81,...a s integers with vhilei<r print (l, r, mı, arn, 》 if z > am then 1:= m + 1 if za then anstwer-1 return answer 18 and the (a) Assume that this algorithm receives as input the numbersz-32 and corresponding sequence of integers 2 | 3 1 1 4151617| 8| 9 | 10 İ 11 İ 12 | 13 | 14|15 | 16 | 17 |...