Is this Tree of Algebraic Expression Correct?

In summary, the conversation involved constructing a tree for the algebraic expression and evaluating it using different search methods. The correct tree was determined and the results of performing preorder, inorder, and postorder searches were shown.
  • #1
Brian82784
19
0
Hello I just wanted to see if I did this right. I've come up with two trees and I'm pretty sure one of them is correct, I'm just not sure.

Construct the Tree of the algebraic expression:
((x - 2) + 3) / ((2 - (3 + y)) x (w - 8))
 

Attachments

  • Tree.jpg
    Tree.jpg
    5.9 KB · Views: 89
  • tree2.jpg
    tree2.jpg
    5.7 KB · Views: 88
Last edited:
Physics news on Phys.org
  • #2
Kristen said:
Hello I just wanted to see if I did this right. I've come up with two trees and I'm pretty sure one of them is correct, I'm just not sure.

Construct the Tree of the algebraic expression:
((x - 2) + 3) / ((2 - (3 + y)) x (w - 8))

Hi! :) I think that both of them are right,but it would be better to include also the parentheses of the algebraic expression at the trees,that you constructed.
 
  • #3
Okay thank you. I also had to do this with one of the trees. So I picked the first tree. Does this look correct?

1) Show the results of performing a preorder search.
× ÷ + - X 2 3 - - 2 3 Y - W 82) Show the results of performing an inorder search.
X – 2 + 3 ÷ 2 – 3 – Y × W - 8 3) Show the results of performing a postorder search.
X 2 - 3 + 2 3 - y - ÷ W 8 - ×
 
  • #4
Kristen said:
Okay thank you. I also had to do this with one of the trees. So I picked the first tree. Does this look correct?

1) Show the results of performing a preorder search.
× ÷ + - X 2 3 - - 2 3 Y - W 82) Show the results of performing an inorder search.
X – 2 + 3 ÷ 2 – 3 – Y × W - 8 3) Show the results of performing a postorder search.
X 2 - 3 + 2 3 - y - ÷ W 8 - ×

I also tried it,and found the same result as yours!It should be right! (Nod) (Yes)
 
  • #5
The one on the right is correct, the one on the left is incorrect. The one on the left is evaluating the expression $\dfrac{(x-2)+3}{(2-3)-y}(w-8),$ whereas the one on the right is evaluating the expression $\dfrac{(x+2)-3}{(2-(3+y)) \cdot (w-8)}$. You can see that in the left version, $w-8$ is in the numerator, whereas in the right version, $w-8$ is in the denominator.
 
  • #6
So the one I did starting with Division is actually correct
 
  • #7
Ackbach said:
The one on the right is correct, the one on the left is incorrect. The one on the left is evaluating the expression $\dfrac{(x-2)+3}{(2-3)-y}(w-8),$ whereas the one on the right is evaluating the expression $\dfrac{(x+2)-3}{(2-(3+y)) \cdot (w-8)}$. You can see that in the left version, $w-8$ is in the numerator, whereas in the right version, $w-8$ is in the denominator.

Oh,yes you are right! Sorry for assuming that the left tree is also right.. (Sadface)
 
  • #8
Kristen said:
So the one I did starting with Division is actually correct

Right - the "biggest" mathematical operator is the last one you'd evaluate.

By the way, the only reason I can answer this question is that http://mathhelpboards.com/mathematics-software-calculator-discussion-29/hp-50g-1953.html?highlight=calculator, with Reverse Polish Notation (postfix notation) and a stack. That's a very nice combination, because it let's you play with calculations as you go.
 
  • #9
So then would this be correct for the tree on the right?

1) Show the results of performing a preorder search.
÷ + - X 2 3 × - 2 + 3 Y- W 82) Show the results of performing an inorder search.
X – 2 + 3 ÷ 2 – 3 +Y × W - 8 3) Show the results of performing a postorder search.
X 2 - 3 + 2 3 y +- W 8 - ×÷
 
  • #10
Kristen said:
So then would this be correct for the tree on the right?
Yes, they seem correct.
 

FAQ: Is this Tree of Algebraic Expression Correct?

What is a "Tree of Algebraic Expression"?

A "Tree of Algebraic Expression" is a visual representation of a mathematical expression using branches and nodes. It helps to organize and simplify complex expressions by breaking them down into smaller, more manageable parts.

How is a "Tree of Algebraic Expression" useful?

A "Tree of Algebraic Expression" is useful for understanding and solving complex mathematical expressions. It allows you to see the relationships between different parts of the expression and identify any errors or simplifications that can be made.

How do you create a "Tree of Algebraic Expression"?

To create a "Tree of Algebraic Expression", start by writing the expression in a vertical format. Then, identify the main operations and place them at the top of the tree. Next, break down the expression into smaller parts and place them as branches connected to the main operations. Continue breaking down the expression until you have simplified it as much as possible.

Can a "Tree of Algebraic Expression" be used for any type of expression?

Yes, a "Tree of Algebraic Expression" can be used for any type of expression, including numerical, variable, and algebraic expressions. It can also be used for equations and inequalities.

How does a "Tree of Algebraic Expression" help with solving equations?

A "Tree of Algebraic Expression" helps with solving equations by breaking down the equation into smaller parts and allowing you to see the steps needed to solve it. It also helps to identify any errors or simplifications that can be made in the process of solving the equation.

Similar threads

Replies
16
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
6
Views
1K
Replies
10
Views
1K
Replies
3
Views
2K
Replies
5
Views
1K
Replies
4
Views
964
Back
Top