title: How are negative numbers used in expression parse trees?
body: <p>I'm doing a homework assignment where I'm supposed to look at trees to find the expression, and build my own trees based on expressions, but I'm a little confused about how negative numbers are used. The first problem on the assignment is to find the expression for this tree:
  <img src="https://i.stack.imgur.com/IxG0Y.png" alt="first parse tree"></p>
  
  <p>To me, this looks like a poorly made tree, since if you use in-order traversal, you end up with this: <code>X*(50/y)-*(z-36)</code>. Does that negative sign mean that the entire left branch is negative, like this?: <code>-(x*(50/y))*(z-36)</code>.</p>
  
  <p>It seems to me that it should be done like this:
  <img src="https://i.stack.imgur.com/c69Hl.png" alt="second parse tree"></p>
  
  <p>The expression here is <code>(–(50*x)+y)/z</code>, and it reads correctly with in-order traversal. Am I correct in thinking that my professor is wrong here?</p>
  
  <p>Edit: I also have a question about another one of the trees made by my professor. This is the tree:</p>
  
  <p><img src="https://i.stack.imgur.com/SJDWy.png" alt="Third parse tree"></p>
  
  <p>I'm not sure what the extra + sign means on the far right side. It looks like the answer is (x-(y*80))-((z+4)+20), but since there are two plus signs, I'm not sure what the second one is supposed to do.</p>