Timing circuits are a crucial component of VLSI chips. Here’s a simple model of such
a timing circuit. Consider a complete balanced binary tree with n leaves, where n is a
power of two. Each edge e of the tree has am associated length le, which is a positive
number. The distance from the root to a given leaf is the sum of the lengths of all the
edges on the path from the root to the leaf.
The root generates a clock signal which is propagated along the edges to the leaves.
We’ll assume that the time it takes for the signal to reach a given leaf is proportional
to the distance from the root to the leaf.
Now, if all leaves do not have the same distance from the root, then the signal will not
reach the leaves at the same time, and this is a big problem. We want the leaves to be
completely syncronized, and all to receive the signal at the same time. To make this
happen, we will have to increase the lengths of certain edges, so that all roor-to-leaf
path have the same lenght (we’re not able to shrink edge lengths). If we achieve this,
then the tree (with its new edge lengths) will be said to have zero skew. Our goal is
to achieve zero skew in a way that keeps the sum of all the edge lengths as small as
possible.
Give an algorithm that increases the lengths of certain edges so that the resulting tree
has zero skew and the total edge length is as small as possible.