Given the following expression tree, identify the correct arithmetic expression:
2018
Given the following expression tree, identify the correct arithmetic expression:


- A.
(A + B) * A − C
- B.
(A + (B * C)) / (A − C)
- C.
A + B * C / A − C
- D.
(A * B + C) / (A − C)
Attempted by 685 students.
Show answer & explanation
Correct answer: B
Concept: In an expression tree, every leaf is an operand and every internal node is an operator whose two children are its operands. The fully parenthesized infix expression is built by recursively wrapping each internal node's left-subtree-expression and right-subtree-expression around its own operator symbol, so the resulting parenthesization is never ambiguous.
The root node is division ( / ), so the final expression has the form (left-subtree expression) / (right-subtree expression).
The left subtree's root is addition ( + ) with children A and a multiplication node; that multiplication node's children are B and C — so the left subtree reads A + (B * C).
The right subtree is a subtraction ( − ) with children A and C — so the right subtree reads (A − C).
Substituting both subtrees into the root gives (A + (B * C)) / (A − C).
Cross-check: Re-parsing (A + (B * C)) / (A − C) under standard precedence confirms division is the outermost operator, the left grouping matches the left subtree, and the right grouping matches the right subtree. Note that dropping the outer parentheses — writing A + (B * C) / (A − C) — would instead parse as A + ((B * C) / (A − C)) under standard precedence, a different expression; the parentheses around the whole numerator are what make the addition happen before the division, exactly as the tree requires.
Hence the correct fully parenthesized expression is (A + (B * C)) / (A − C).