If the base logic follows the below rule, it should work. If any operator within parenthesis is of less precedence to the operator before the opening parenthesis, the parenthesis can not be removed.
For cases of equal precedence of operators before parenthesis and within parenthesis, transitivity condition should be checked. If transitive, parenthesis can be removed else should be retained. Eg: parenthesis cannot be removed for division operator while can be removed for multiplicative or addition or subtraction operator. On 6/3/10, Rohit Saraf <rohit.kumar.sa...@gmail.com> wrote: > So there is a prob algoose.... A*(B*C) and a*(b*c+d) > i hope you understood.... > > -- > -------------------------------------------------- > Rohit Saraf > Second Year Undergraduate, > Dept. of Computer Science and Engineering > IIT Bombay > http://www.cse.iitb.ac.in/~rohitfeb14 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Sent from my mobile device Luv, S.Antony Vincent Pandian -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.