Invariants of six true programs including bubble sort, merge sort
, insertion sort, shell sort, compute sum of array elements and search into array are added to software database initially.
For example, Figure 2 shows the solved example of a merge sort where there is no word indicating that it is an example.
Also, for ruling out cases like recursion tree for merge sort (see Figure 5), only those slides in which the count on numerals is more than a threshold [beta] are considered.
Consider the merge sort
program sort in Figure 1 and input change operation x [direct sum] y = cons(y,x).
Floyd's lower bound for transposition also applied to the problems of permuting and sorting (since they are more general problems), and the bound matched the number of I/Os used by merge sort
. For these restricted values of M, B, and P, the bound showed that essentially [omega](log N) passes are needed to sort the file (since each pass takes O(N/B) I/Os), and that merge sorting and the permutation phase of key sorting both perform the optimum number of I/Os.