Originally Posted by

**suditi** Given a number of terms, n in an equation containing only addition as the only possible operator, find the different number of valid ways in which they can be evaluated. Order of evaluation is controlled by grouping the terms in brackets

e.g. if n = 4

it means that there are 4 terms in the equation – i.e. something like

a+b+c+d

Now the valid ways in which it can be evaluated :

(a + (b + (c+d)))

(a + ((b+c) + d))

((a+b) + (c+d))

(((a+b) + c) + d)

((a + (b+c)) + d)

So the answer in this case is 5

whats the logic for this problem?