Results 1 to 1 of 1
- 10-20-2012, 01:12 AM #1Member
- Join Date
- Aug 2012
- Rep Power
representing trees within parentheses
I have found many examples on how to represent mathematical expressions as binary trees in parentheses but I cannot find how to translate a tree with just values, say integers, in parentheses format.
This is a mathematical expression example I was referring to. These examples are abundant, but how do you do this without operators?
y = m * x + b
( = y ( + ( * m x ) b ) )
(Sorry about all of the periods, I couldn't keep the spacing without them.)
How would this expression look as a tree? Are there general rules on how to convert between the two representations?
( ( ( 3 7 ) 2 8 ) ( 9 7 ) 5 0 )
Last edited by Googol; 10-20-2012 at 01:17 AM.
- By MrPosotive in forum New To JavaReplies: 2Last Post: 09-24-2012, 07:54 AM
- By bitzz in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 08-29-2011, 09:21 AM
- By 357mag in forum New To JavaReplies: 2Last Post: 07-03-2011, 07:58 PM
- By msa0127a in forum New To JavaReplies: 9Last Post: 10-05-2010, 10:37 PM
- By vivvy in forum JDBCReplies: 1Last Post: 02-17-2010, 05:17 PM