Note the revised due date listed above.
Do the following exercises from chapter 9 of the Brassard and Bratley textbook:
Suppose that an arithmetic expression is given by a directed acyclic
graph similar to that shown in Figure 9.7 on page 300. Assume that
the internal nodes of the graph hold addition, subtraction,
multiplication, and division operations and that the leaves (i.e.,
those with no successors) hold integer constants. Devise an efficient
(i.e., O(n)
) algorithm for evaluating the expression
graph.
UP to ENGR 691 assignments document?