Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^4: NP-complete sometimes isn't (A benchmark)

by tilly (Archbishop)
on Sep 23, 2008 at 05:33 UTC ( #713154=note: print w/replies, xml ) Need Help??

in reply to Re^3: NP-complete sometimes isn't (A benchmark)
in thread NP-complete sometimes isn't

That's a nice approach.

If you want to extend it to negative numbers, it will be less work than you think if you use the right hack. As far as the difference is concerned, having, say, -16 in one partition is exactly the same as having 16 in the other one. So flip all of your signs to positive, then when you've found the solution, delete the appropriate positive ones from one partition while inserting negatives in the other. Voila! Rather than a pervasive logic change you just have to pre-process the list and post-process your answer.

  • Comment on Re^4: NP-complete sometimes isn't (A benchmark)

Replies are listed 'Best First'.
Re^5: NP-complete sometimes isn't (A benchmark)
by Pepe (Sexton) on Sep 24, 2008 at 23:43 UTC
    It's late for this now, but thanks a lot for the effort.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://713154]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2019-11-20 07:07 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (96 votes). Check out past polls.