Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-21 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found