Parenthesization, which minimizes expression values

I need to find the brackets for E= c1 O1 c2 O2 .... On-1 cn, where c(i)are integers, or O(i)maybe +or *, which minimizes the resulting value through the brackets.

I know that this is probably a very simple question, but I just started to learn dynamic programming.

My main problem is how can I tell if O(i)there is +either *(or is it useless?)

+3
source share

All Articles