http://www.perlmonks.org?node_id=1031952


in reply to Re^5: Divide an array into 2 subsets to verify their sum is equal or not. (NP != unsolvable))
in thread Divide an array into 2 subsets to verify their sum is equal or not.

too long didn't read all, but

> > And if kcott or BrowserUK manage to fix their programs, there is a $1,000,000 price on it:

> No. Those prizes -- and in particular, the P v NP prize -- are not up for grabs for finding solutions to particular, restricted or bounded examples of particular NP problems. The prize is for proving that there is a whole class of problems for which there are no solutions. Quite a different matter indeed.

Well not in this case!

A consequence of this definition is that if we had a polynomial time algorithm (on a UTM, or any other Turing-equivalent abstract machine) for C, we could solve all problems in NP in polynomial time.

So finding an algorithm for the partition problem, proven to find a solution (or it's non-existence) in polynomial time (including for the worst case) means solving P vs NP!!!

> Upon analysis, the code required to implement that requirement is identified as being some variation upon one or more of the classical NP-Complete problems; and the CS majors and half-well-reads in the room will throw their collective hands up saying, "It can't be done"!

Well, bad trained personnel!

Problem classes are classified by their worst case. But normally most cases can still be solved pretty fast with already well known algorithms.

In praxis stopping after a timeout for few remaining cases is acceptable.

Edit

Especially if they calculate an approximate solution.

In many cases something like (sum @part1 -sum @part2) < min @all is already sufficient.

Cheers Rolf

( addicted to the Perl Programming Language)

  • Comment on Re^6: Divide an array into 2 subsets to verify their sum is equal or not. (NP != unsolvable))
  • Download Code

Replies are listed 'Best First'.
Re^7: Divide an array into 2 subsets to verify their sum is equal or not. (NP != unsolvable))
by BrowserUk (Patriarch) on May 03, 2013 at 22:32 UTC
    too long didn't read all

    Shame you have such a limited attention span. Otherwise you might have bothered to read the whole of the sentences you quoted.

    I draw your attention to: finding solutions to particular, restricted or bounded examples of particular NP problems

    Well, bad trained personnel!

    You'd know. YOU are one of them.

    Especially if they calculate an approximate solution.

    Again, if you could've maintained your attention span for the whole 45-50 seconds it would've taken you to read the entire post, you'd realise that all you doing it repeating what *I said* in my post.

    Please don't respond further as I can't be bothered with having to repeat myself over and over.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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.
      > Again, if you could've maintained your attention span for the whole 45-50 seconds it would've taken you to read the entire post, you'd realise that all you doing it repeating what *I said* in my post.

      Apparently clearer and with less words.

      I tried to read it again and gave up.

      > > Well, bad trained personnel!

      > You'd know. YOU are one of them.

      hdb was pretty clear that you would win this contest, if your algorithm did what you are claimingı it does.

      You denied it.

      I don't enjoy discussing with your propaganda machine, but from a logical POV thats plain wrong!

      Somebody needed to say it, no matter how many insults your piling on people with other opinions.

      plonk

      Cheers Rolf

      ( addicted to the Perl Programming Language)

      1) "This will very quickly (less than 0.001 of a second) find a solution, if one exists, for sets of 100s or 1000s of elements."

        Plonk

        I knew it; you're a plonker.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        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.