Week 13. Memory
Algorithms and Data Structures
14 Week 13. Memory
Reading 13 Goodrich & Tamassia: Chapter 14
14.0.1 Compulsory Assignment
Problem 14.1 Describe an external-memory data structure to implement the double-ended queue ADT so that the total number of disk transfers needed to process a sequence of push and pop operations is , where is the block size, i.e. number of elements fitting in a block.
Problem 14.2 The B-tree as described in the textbook uses the map ADT to hold the contents of each node. The time to retrieve an element from this data structure is described as , where is the maximum number of elements in the map. For a map, .
Suppose we change this constituent data type to a sorted tree. What would be the resulting value of ? And how does it affect the total run time of get() in the B-tree.
14.0.2 Exercises
Problem 14.3 Describe an external-memory data structure to implement the stack ADT so that the total number of disk transfers needed to process a sequence of push and pop operations is , where is the block size, i.e. number of elements fitting in a block.