Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: NP-complete sometimes isn't

by tilly (Archbishop)
on Sep 02, 2008 at 08:34 UTC ( [id://708419]=note: print w/replies, xml ) Need Help??

in reply to Re: NP-complete sometimes isn't
in thread NP-complete sometimes isn't

The initial version that I posted did indeed have a bug. If it wound up not using any of the initial greedy guess, it would repeat the last element from the greedy guess. In your case that would explain why 191 repeated.

I fixed that bug, but obviously not before you downloaded the buggy version of the code.

Replies are listed 'Best First'.
Re^3: NP-complete sometimes isn't
by BrowserUk (Patriarch) on Sep 02, 2008 at 09:19 UTC

    Indeed the updated version works much better. I was a bit quick of the mark because I was looking to use your code to verify the veracity of the claims I was making for my own :)

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-21 23:53 GMT
Find Nodes?
    Voting Booth?

    No recent polls found