- When two 16-bit numbers are multiplied, what two registers hold the product? Show the registers that contain the most and least significant portions of the product.
- Suppose you need to sort a relation of 40 gigabytes with 4-kilobyte blocks using a memory size of 40 megabytes. Suppose the cost of a seek is 5 milliseconds, while the disk transfer rate is 40 megabytes per second.
- Find the cost, in seconds, of sorting the relation with bb = 1 and with bb = 100.
- In each case, how many merge passes are required?
- Suppose a flash storage device is used instead of a disk, and it has a seek time of 1 microsecond and a transfer rate of 40 megabytes per second. Recompute the cost, in seconds, of sorting the relation with bb = 1 and with bb = 100.

- a): Show the result of inserting 9, 3, 15, 8, 5, 6, 2, 13, 11, 4, 7, 14, 1, 12 and 10 into an initially empty binary heap. b): Show the result of performing three deleteMin operations in the heap of the previous exercise. c): Show the results of using the linear-time algorithm to build a binary heap using the same input.

Binary Heap

A binary heap tree can be a min heap and max heap.

A binary tree can be a heap if tree satisfies the 2 properties:

1.)A tree is a complete binary tree.

2.)key root must be minimum among all keys in min heap and root maximum among all heaps is a max heap.