Consider the expression tree shown. Each leaf represents a numerical value, which can either be or . Over all possible choices of the values at the leaves, the maximum possible value of the expression represented by the tree is ___.

View worked solution
Answer: 6
The given expression tree represents the following algebraic expression:
where each leaf variable . To maximize the overall value of , we must maximize the left subtree and minimize the right subtree of the root subtraction operator:
- Maximize the left subtree: Setting gives the maximum value:
- Minimize the right subtree: Setting and gives the minimum value:
Substituting these values back into the main expression:
Free practice · Your answers on this page are not saved.
