Re: is this NP-Hard?
- From: Kai-Uwe Bux <jkherciueh@xxxxxxx>
- Date: Mon, 03 May 2010 12:00:30 +0200
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
.
- Follow-Ups:
- Re: is this NP-Hard?
- From: Talha Lateef
- Re: is this NP-Hard?
- References:
- Re: is this NP-Hard?
- From: Kai-Uwe Bux
- Re: is this NP-Hard?
- From: Talha Lateef
- Re: is this NP-Hard?
- Prev by Date: Re: is this NP-Hard?
- Next by Date: Re: Finding the common elements in two strings .
- Previous by thread: Re: is this NP-Hard?
- Next by thread: Re: is this NP-Hard?
- Index(es):