39.2k views
5 votes
Assume that for some binary tree node implementation, a pointer requires 4 bytes and a data object requires 32 bytes. Further assume that we are storing a Full binary tree, that the internal nodes are implemented to store only two pointers (no data field), and that the leaf nodes store only a data field. Type a fraction (like "1/2") that represents the fraction of the total space taken up by overhead. Give your fraction in lowest terms.

1 Answer

5 votes

Final answer:

The fraction of the total space taken up by overhead in the binary tree implementation is 1/5.

Step-by-step explanation:

The fraction of the total space taken up by overhead can be calculated by considering the total space required for the binary tree structure. Each internal node requires two pointers, which take up 2 * 4 = 8 bytes. Each leaf node requires a data field, which takes up 32 bytes. Since the internal nodes do not store any data, the overhead is 8 / (8 + 32) = 8/40 = 1/5. Therefore, the fraction of the total space taken up by overhead is 1/5.

User Mroach
by
8.2k points