Results 1 to 1 of 1
- 10-20-2012, 02:12 AM #1Banned
- 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 02:17 AM.
- By MrPosotive in forum New To JavaReplies: 2Last Post: 09-24-2012, 08:54 AM
- By bitzz in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 08-29-2011, 10:21 AM
- By 357mag in forum New To JavaReplies: 2Last Post: 07-03-2011, 08:58 PM
- By msa0127a in forum New To JavaReplies: 9Last Post: 10-05-2010, 11:37 PM
- By vivvy in forum JDBCReplies: 1Last Post: 02-17-2010, 06:17 PM