14.2 PROJECT

ALGEBRA TREES

In this project, you will explore the use of trees to represent algebraic expressions and other mathematical formulas. Writing expressions in this way can be useful when trying to create a computer program that performs complicated calculations. For example, if we want to represent the expression x + y we could use the following tree.

A tree of x+y

A tree where the top node is +. The left child node is x and the right child node is y.

A slightly more complicated expression, such as 2 x + y , would result in a tree with more levels.

A tree of 2(x+y)

A tree where the top node is . The left child node is 2 and the right child node is + and has two child nodes. The children of the right node, the left child node is x and the right child node is y.

  1. Would the following tree also represent the expression 2 x + y ? Explain why or why not.

    A tree for question 1

    A tree where the top node is +. The left child node is 2 and the right child node is and has two child nodes. The children of the right node, the left child node is x and the right child node is y.

  2. Write an algebraic expression that can be represented by the tree below?

    Hint: Start from the leaves and move your way up.

    A tree for question 2

    A tree where the top node is +. The left node is 7, the middle node is with two children nodes, and the right node is . The children of middle node, the left child node is x and the right child node is x. The children of the right node, the left children node is 2 and the right child node is x.

  3. Explain how the order of operations are related to this type of tree.

  4. The formula to convert a temperature from degrees Fahrenheit to degrees Celsius is given by the equation Using only the operations C = 5 9 F 32 . ⊕, and ⊙ draw a tree to represent the right-hand side of the equation.

  5. Draw a tree for the same formula from part 4 where this time you are allowed to also use the operation of division and all the numbers involved must be integers.