The following algorithm describes a postorder tree traversal

Postorder(tree)

If left subtree exists then Postorder(left subtree)

If right subtree exists then Postorder(right subtree)

Print root

end

 

Can you apply that to the following  tree

 

 

                                            +

                                        /       \

                                       /         \

                                       *            -

                                      /  \       /     \

                                     2   3    *       +

                                              /  \     /  \

                                             4   2  1   5

What is the result of the executing the algorithm?  what kind of algorithm are we considering here?

in Other Math Topics by Level 1 User (180 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

Start at left subtree: operands 2, 3; operator is multiply (*), result=2*3=6.

Right subtree: 4*2=8 and 1+5=6; next level up: 8-6=2. Where the operands are derived from the operations at the previous level.

Root: operands 6, 2 operator + gives 6+2=8. Root=8.

Algorithm is (2*3)+(4*2)-(1+5)=8, an arithmetic problem.

The binary operation at each branch appears to be an arithmetic operation (at the root) between two operands (children of the root).

by Top Rated User (1.2m points)

Related questions

1 answer
asked Feb 1, 2014 in Calculus Answers by Halimah Level 1 User (200 points) | 775 views
1 answer
1 answer
asked Sep 10, 2013 in Other Math Topics by vareesha | 523 views
1 answer
asked Jun 17, 2022 in Statistics Answers by Happiness | 456 views
1 answer
asked Oct 8, 2019 in Pre-Algebra Answers by anonymous | 2.1k views
1 answer
asked Apr 29, 2019 in Algebra 1 Answers by anonymous | 461 views
Welcome to MathHomeworkAnswers.org, where students, teachers and math enthusiasts can ask and answer any math question. Get help and answers to any math problem including algebra, trigonometry, geometry, calculus, trigonometry, fractions, solving expression, simplifying expressions and more. Get answers to math questions. Help is always 100% free!
87,516 questions
100,279 answers
2,420 comments
732,444 users