3-ary max heap is an extension of binary max heap in which non-leaf nodes have 3 children instead of 2. Assume that we modified the binary case MAX-HEAPIFY algorithm given in the Appendix to its 3-ary version.
1) Draw a 3-ary max heap for set S of values {5, 8, 2, 12, 10, 6, 15, 1, 18, 20, 24, 19}.
2) In the modified version of 3-ary recursive MAX-HEAPIFY, assume that the time to fix up the relationships among the A[i], A[LEFT(i)], A[MIDDLE(i)] and A[RIGHT(i)] takes (1) time. Write down the recurrence inequality that describes the worst-case running time of the modified version. Explain your reasoning.
3) Solve the recurrence inequality that you defined in part (ii) by using the master method.