Re: is this NP-Hard?



Talha Lateef wrote:

I am thinking of creating a tree with temp Result in each node, each
node has five childs {+,-,*,/,.}, if temp result of a node is greater
than my Result then i will stop calculating that branch.

But would that be justified? It appears that / or - can later decrease the
result. So, if you had

S = { 1, 2, 3, 4, 7 }
R = 2

(1+2+3) / (7-4) = 2

would do it, right? But in the evaluation, there are many subtrees that
evaluate to something bigger than 2.


Best

Kai-Uwe Bux
.