Question: How do I explain this Now consider the algorithm Merge-Sort below. 01: MergeSort(T): 02: N :2 Length(T) 03: if N > 1 then 04: M
How do I explain this

Now consider the algorithm Merge-Sort below. 01: MergeSort(T): 02: N :2 Length(T) 03: if N > 1 then 04: M := [%J 05: T1 :2 T[1, M] 06: T2 := T[Mr + 1,N] 07: T := Merge(MergeSort(T1), MergeSort(Tg)) 08: return T where T[i, 3'] denotes the subsrray of T consisting of the elements in the places from i to j for i g j (both inclusive). A call MergeSort{T) will return an array with the same elements as T sorted in increasing order. Note how MergeSort solves the problem by calling itself a number of times. On a certain computer one call of MergeSort(T) takes 5 units of time when the length of T is 11 and M units of times when the length of T is N > 1 excluding the calls in line 07. On the same computer, one call of Merge(T1,Tg) takes 2M + 2N + 1 units of time, where M and N are the lengths of T1 and T2, respectively. It can be shown that with the above assumptions, the running time of a call MergeSort{T) only depends on the length of the array T we will denote this running time by R(N), where N is the length of the array. {13) By examining the algorithm1 show that 12(1) : 5, 12(2) : 23, 12(3) : 47, 12(4) 2 71
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
