Mnbspis annbspn-by-nnbspmatrix in which the entries in each


1. Propose an algorithm to sort a large ?le using only two tapes.

2. a. Show that a lower bound of N!/22on the number of heaps is implied by the fact that buildHeap uses at most 2comparisons.

b. Use Stirling's formula to expand this bound.

3. is an N-by-matrix in which the entries in each rows are in increasing order and the entries in each column are in increasing order (reading top to bottom). Consider the problem of determining if is inusing three-way comparisons (i.e., one comparison of with M[i][j] tells you either that is less than, equal to, or greater than M[i][j]).

a. Give an algorithm that uses at most 2- 1 comparisons.

b. Prove that any algorithm must use at least 2- 1 comparisons.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Mnbspis annbspn-by-nnbspmatrix in which the entries in each
Reference No:- TGS01274703

Expected delivery within 24 Hours