
A New Map Traces the Limits of Computation - ernesto95
https://www.quantamagazine.org/20150929-edit-distance-computational-complexity/
======
tempodox
Question from the article: “ _If you have a formula containing variables that
can be set as true or false rather than as number values, is it possible to
set those variables in such a way that the formula outputs “true”?_ ”

There is a minimalistic web app that answers this question:
[http://symbolabs.de/symboole](http://symbolabs.de/symboole)

Enter a Boolean expression and chose the Solve or Shrink functionality from
the pop-up menu.

~~~
IIAOPSW
Pack it up folks. The webdevs have solved P=NP.

~~~
tempodox
What do you mean?

~~~
valarauca1
The problem outlined, and the parent->parent->parent poster postulated is the
Boolean Satisfiability Problem [1]. The Cook-Levin Theorem [2] more or less
founded the idea that P and NP problems are different classes of problems. It
also hinted that a generalized solution to any NP problem could be a solution
to ANY NP class problem, by showing that several NP problems can be reduced to
the Boolean Satisfiability Problem.

This discovery earned a Turing Award and started the whole P vs NP debate [3].

:.:.:

The joke.

>Pack it up folks. The webdevs have solved P=NP.

Either implies somebody accidentally solved the greatest problem in computer
science... OR that web developers are as naive as their stereotype implies.

[1]
[https://en.wikipedia.org/wiki/Boolean_satisfiability_problem](https://en.wikipedia.org/wiki/Boolean_satisfiability_problem)

[2]
[https://en.wikipedia.org/wiki/Cook%E2%80%93Levin_theorem](https://en.wikipedia.org/wiki/Cook%E2%80%93Levin_theorem)

[3]
[https://en.wikipedia.org/wiki/P_versus_NP_problem](https://en.wikipedia.org/wiki/P_versus_NP_problem)

~~~
jsprogrammer
The joke ignores the obvious though: many instances of NP problems can be
solved completely with our current machines in very short time periods.

~~~
ColinWright
By the way, I was reading an old comment of yours[0] and although I can't
answer there because it's too old, I do have an answer for you ...

You question was:

    
    
        If it were possible to efficiently
        solve a large NP-complete problem,
        the solution to which real-world
        problem would have the largest
        positive impact?
    

As a single problem, graph three coloring is one that has an immediate impact
in a genuine real-world problem. You give me a number to factor, and I can
produce a graph such that if you 3-color it, I can read off the factors of the
given number. Similarly I can solve the discrete log problem. It's not yet
clear that I can do the same for elliptic-curve cryptography, but if you could
graph three color efficiently, you've directly and practically broken most
existing cryptosystems.

Email me if you want more details.

[0]
[https://news.ycombinator.com/item?id=8750542](https://news.ycombinator.com/item?id=8750542)

~~~
jsprogrammer
Thanks for responding here. I probably would have never seen the comment
otherwise. (Perhaps why commenting on old threads is disabled?)

Certainly cryptosystems could be broken, but I'm not sure of the immediate
positive impact of that. It would seem that it could be dangerously disruptive
to drop such an algorithm.

I'm more interested in the "We know there are all these really hard problems
and how to solve them, but we just don't have the computational power to solve
them" aspect that typically comes along with P v. NP discussions.

I understand many of the theoretical problems (3-coloring, subset sum,
subgraph isomorphism, etc), but I want to know what practical problems do we
have that we don't have good solutions to, simply because NP problems are too
hard for us to compute.

~~~
ColinWright

      > I probably would have never seen
      > the comment otherwise.
    

You might want to look into HN Notify[0]

    
    
      > I'm more interested in the "We know
      > there are all these really hard
      > problems and how to solve them, but
      > we just don't have the computational
      > power to solve them" aspect that
      > typically comes along with P v. NP
      > discussions.
    

OK, that makes it clear that I really don't know what you're asking for. The
point is that there are all these problems such that the algorithms we have
are exponential, which makes them infeasible. In that sense we don't know how
to solve them. Why do you claim we _do_ know how to solve them?

    
    
      > I understand many of the theoretical
      > problems (3-coloring, subset sum,
      > subgraph isomorphism, etc), but I want
      > to know what practical problems do we
      > have that we don't have good solutions
      > to, simply because NP problems are too
      > hard for us to compute.
    

??

What do you mean when you say these are theoretical? If we can 3-color then we
can perform better packing, better scheduling, better layouts for processors,
we can break crypto-systems, in what sense are these not practical?

Can you give me any example of anything you would call a practical problem?

[0] [http://hnnotify.com/](http://hnnotify.com/)

~~~
jsprogrammer
>OK, that makes it clear that I really don't know what you're asking for. The
point is that there are all these problems such that the algorithms we have
are exponential, which makes them infeasible. In that sense we don't know how
to solve them. Why do you claim we do know how to solve them?

I claim we can solve them, because we know the basic algorithm that will solve
any particular problem given enough time and space: brute-force search and
verify.

>What do you mean when you say these are theoretical?

There is the theoretical, "This entire class of problems is hard.", NP problem
and there is the, "Provide me with a 3-coloring of this specific graph", NP
problem.

I claim that while it is widely believed that we cannot solve the entire class
of NP problems, we may be able to solve particular, realized instances of
problems from that class.

Yes, the algorithms are exponential, but if you choose your parameter space
appropriately, you may be able to run an exponential algorithm in a reasonable
amount of time and space.

So, there are parameters for algorithms that we can compute solutions for, but
we are still limited to the amount of physical computational ability that we
can control. This puts limits on which particular problems we can solve.

>If we can 3-color then we can perform better packing, better scheduling,
better layouts for processors, we can break crypto-systems, in what sense are
these not practical?

Only in the sense that I'm looking for a _specific_ packing problem. For
example, here are the dimensions and locations of UPS's fleet. Here are the
dimensions, locations, and destinations of the packages. Give me the optimal
routes. Practically, you'd probably want to model and solve failure modes as
well to find the most "robust" route.

>better packing, better scheduling, better layouts for processors

What you are referring to here, I have been referring to as "theoretical".

Optimizing UPS may or may not have much tangible benefit, depending on how
close their current solutions are to the optimal. My question is asking:
solving which particular problem would provide the most benefit?

>Can you give me any example of anything you would call a practical problem?

That is my question. :)

But, a toy example would be roughly (though could could possibly be attacked
another way):

Provide a subset of [-12,30,7,9,-84,24,1,8,3,-5,2] that sums to 0.

Edit: Thanks for the link. I'm not sure if I want an email from every reply
that I get here...but I'll think about it.

~~~
ColinWright

      >> ... there are all these problems such that
      >> the algorithms we have are exponential,
      >> which makes them infeasible.  In that
      >> sense we don't know how to solve them.
      >> Why do you claim we do know how to solve
      >> them?
    
      > I claim we can solve them, because we know
      > the basic algorithm that will solve any
      > particular problem given enough time and
      > space: brute-force search and verify.
    

Of course.

    
    
      >> What do you mean when you say these are
      >> theoretical?
    
      > There is the theoretical,
      > "This entire class of problems is hard.",
      > NP problem and there is the,
      > "Provide me with a 3-coloring of this
      > specific graph", NP problem.
    

Technically the latter is not a problem, it's an instance. It's widely
believed that for most problems, most instances are comparatively easy to
solve using the "obvious" techniques.

    
    
      > I claim that while it is widely believed
      > that we cannot solve the entire class of
      > NP problems, we may be able to solve
      > particular, realized instances of problems
      > from that class.
    

That's pretty much the belief of everyone.

    
    
      > Yes, the algorithms are exponential,
      > but if you choose your parameter space
      > appropriately, you may be able to run
      > an exponential algorithm in a reasonable
      > amount of time and space.
    

Well, when you have an instance to solve, you don't have a choice. If it's an
easy instance then it's an easy instance. But if it's a hard instance then
it's a hard instance, and it will take exponential time (using the algorithms
we currently have).

    
    
      > So, there are parameters for algorithms
      > that we can compute solutions for, but
      > we are still limited to the amount of
      > physical computational ability that we
      > can control. This puts limits on which
      > particular problems we can solve.
    

You keep using the word "problem" in different senses. There aren't parameters
for algorithms, there are instances of problems, and we don't get to choose.

    
    
      >> If we can 3-color then we can perform
      >> better packing, better scheduling,
      >> better layouts for processors, we can
      >> break crypto-systems, in what sense are
      >> these not practical?
    
      > Only in the sense that I'm looking for
      > a specific packing problem. For example,
      > here are the dimensions and locations
      > of UPS's fleet. Here are the dimensions,
      > locations, and destinations of the packages.
      > Give me the optimal routes. " Practically,
      > you'd probably want to model and solve
      > failure modes as well to find the most
      > "robust" route."
    

So if I give you a specific graph to three colour, is that a practical
problem? I'm still struggling to understand what you mean - you keep changing
the way you use words, or using them in non-standard ways.

Are you just looking for a specific instance of a problem?

    
    
      >> better packing, better scheduling, better
      >> layouts for processors
    
      > What you are referring to here, I have been
      > referring to as "theoretical".
    

I still don't understand what you mean by the word "theoretical". These are
practical problems, instances of which turn up all over the world every day.
Given that we want to solve these instances of these problems, in what sense
are the problems "theoretical"?

    
    
      > Optimizing UPS may or may not have much
      > tangible benefit, depending on how close
      > their current solutions are to the optimal.
      > My question is asking: solving which
      > particular problem would provide the most
      > benefit?
    

What do you mean by "solving", "problem", and "benefit"? These are genuine
questions - you seem to be using these words in ways I don't recognise.

    
    
      >> Can you give me any example of anything
      >> you would call a practical problem?
    
      > That is my question. :)
    

So you don't know what a practical problem is?

    
    
      > But, a toy example would be roughly
      > ...
      > Provide a subset of
      > [-12,30,7,9,-84,24,1,8,3,-5,2]
      > that sums to 0.
    

Is that what you're calling a practical problem? Is what you're calling a
"practical problem" simply a specific instance?

I can provide for you a specific instance of a three-coloring problem.

~~~
jsprogrammer
I admit that I may be using terms in non-standard ways and that my implied
definitions may not be fully consistent. I apologize for any confusion it may
cause.

If you have a standard glossary of terms I could probably reformulate the
statements in those terms.

>I still don't understand what you mean by the word "theoretical". These are
practical problems, instances of which turn up all over the world every day.
Given that we want to solve these instances of these problems, in what sense
are the problems "theoretical"?

I probably shouldn't have used the word. It's not very good. To answer your
question, though, they are theoretical in the sense that "better packing" is
not an actual driven route that used less resources than the route chosen by
another algorithm would have; rather, it is just a description, or template,
of the result you (or someone) desire.

>What do you mean by "solving", "problem", and "benefit"? These are genuine
questions - you seem to be using these words in ways I don't recognise.

Roughly:

problem = complete data/parameters that can be fed to an NP solver (either
search and verify every permutation of the solution space or (hypothetical)
specialized solver)

solving = the process of computing the solution to the problem and outputting
the answer

benefit = resources saved by applying an optimal solution instead of the sub-
optimal solution that would have been used otherwise

>So you don't know what a practical problem is?

I was being a bit facetious, but the statement is still true, I believe
(depending on what you meant by your question).

I know what a practical problem is, I just do not have have an actual instance
whose solution would be beneficial. My question is to be provided with such a
problem.

>Is that what you're calling a practical problem? Is what you're calling a
"practical problem" simply a specific instance?

I believe we'd call it an instance of some form of the subset sum problem (I
believe it can be formulated more formally).

>I can provide for you a specific instance of a three-coloring problem.

Sure. But, please don't be expecting me to solve it :)

~~~
ColinWright

      > ... I may be using terms in non-standard
      > ways ...
    

This is a typical difficulty. You would do really well to learn and use the
words in the usual way, because then people won't get confused, and indeed,
you may actually find your questions have already been answered.

    
    
      Problem: A collection of instances
      Instance: A specific question to answer
    

Typically in early complexity theory we talk about Yes/No questions, but
usually Yes/No questions can be leveraged into actual answers, so the
distinction is often blurred. For example, the NP question for G3C is "Can
this graph be three-colored?" \- that's a Yes/No question. But there's a
polynomial process for converting that into an actual coloring, if it exists.

    
    
      >> Given that we want to solve these
      >> instances of these problems, in
      >> what sense are the problems
      >> "theoretical"?
    
      > ... they are theoretical in the sense
      > that "better packing" is not an actual
      > driven route that used less resources
      > than the route chosen by another
      > algorithm would have; rather, it is
      > just a description, or template, of
      > the result you (or someone) desire.
    

The Knapsack problem is a very real and practical problem. People have
instances of it every day. Most instances are easily solved by existing
algorithms, but some instances are not. The question is: Here's a knapsack,
and a collection of sizes and values - can you pack things into the knapsack
and get a value bigger than X?

For some instances of that, real instances that turn up in the real world, the
best known algorithms are exponential in performance. I would not call that
"theoretical". I would call that "practical". If you call it "theoretical"
then I don't understand what you mean. Are you simply saying that the general
definition of the problem is "theoretical", as opposed to an actual instance?
That would seem perverse.

    
    
      >> What do you mean by "solving", "problem",
      >> and "benefit"? These are genuine questions
      >> - you seem to be using these words in ways
      >> I don't recognise.
    
      > Roughly:
    
      > problem = complete data/parameters that can
      >           be fed to an NP solver (either
      >           search and verify every permutation
      >           of the solution space or (hypothetical)
      >           specialized solver)
    

What you describe would usually be called an instance.

    
    
      > solving = the process of computing the solution
      >           to the problem and outputting the answer
    

Substituting "instance" for "problem", that's reasonable. But here you've only
computed the answer to the instance. If you want to "solve" the problem, you
need to produce an algorithm. That algorithm is than used to compute the
answer in specific instances.

    
    
      > benefit = resources saved by applying an optimal
      >           solution instead of the sub-optimal
      >           solution that would have been used
      >           otherwise
    

How do you know what would have been used otherwise? This seems poorly
defined.

    
    
      >> So you don't know what a practical problem is?
    
      > I know what a practical problem is, I just do
      > not have have an actual instance whose solution
      > would be beneficial. My question is to be provided
      > with such a problem.
    

Specific instances are specific instances. Different people have different
instances, and they are not universal. I don't see what you're asking for.

    
    
      >> Is that what you're calling a practical problem?
      >> Is what you're calling a "practical problem"
      >> simply a specific instance?
    
      > I believe we'd call it an instance of some form
      > of the subset sum problem (I believe it can be
      > formulated more formally).
    

Yes, that's an instance. You still haven't said if that's an example of what
you mean by a "practical" "problem".

    
    
      >> I can provide for you a specific instance of
      >> a three-coloring problem.
    
      > Sure. But, please don't be expecting me to solve it :)
    

What would you do with it?

~~~
jsprogrammer
Maybe I can define my thoughts using some of your words.

>People have instances of it every day. Most instances are easily solved by
existing algorithms, but some instances are not.

Ok, if you show me an instance an actual person has, I would consider it a
'practical problem', now, 'practical instance'.

Given an instance, you could compute "benefit" as such:
(resources_used_by_using_solution_provided_by_"existing_algorithms") -
(resources_used_by_using_solution_provided_by_sub_NP_space_time_solver|presumably_optimal)

Note, I'm not (directly) talking about the resources used for the computation,
but rather the resources used in the real-world by taking advice from an
algorithm. For instance, in the UPS example, fuel and labor costs depend on
the exact route decided by UPS's logistics algorithm. Most likely that route
is not 'optimal', but may be pretty close (not many resources would be saved
by using the optimal route over whatever other route UPS ends up driving).

>What would you do with it?

I would certainly look at it and at least make a cursory attempt at solving
it. However, the reason I originally asked the question was so that I could
have a legitimate problem (with instances) to give to someone who claims a
P=NP proof in addition to an algorithm.

He can solve most random subset sum problems, of the kind I gave you, with
decently sized sets (thousands of elements) and randomly selected targets very
quickly. However, I think that random subset sum problems might be pretty
easy. Further, I'm not sure of the precise way to measure the complexity of
the algorithm when just given a list of integers in ASCII. I assume you really
need to analyze things at the bit level, instead of just the number of ASCII
characters.

But, assuming P=NP and we have a runnable algorithm (which I don't necessary
believe, but do allow for), I am interested in finding and solving the
problems that would have the largest benefit (as previously defined).

Assume you can only solve a single instance at a time, what order do you solve
them in?

Edit about terminology:

Like I said, if you have a standard glossary I could probably wield it
effectively in our conversation.

However, I typically find that there are few globally standard terms. Instead,
each sub-culture seems to define their own very technical definitions of
words. Sometimes these are similar to other culture's definitions, sometimes
not.

Selecting which sub-cultures to borrow from is tricky and there is certainly
no right answer, but I also see that there is tremendous value in having
similar definitions.

If you do have a good reference, I'd appreciate it.

~~~
ColinWright

      >> People have instances of it every day.
    
      > Ok, if you show me an instance an actual
      > person has, ...
    

School timetabling can be cast as a SAT problem. That's a real problem that
real people have.

    
    
      > I would consider it a 'practical problem',
      > now, 'practical instance'.
    

There seems to be a real mismatch here. I'm not going to be able to get
someone else's commercially sensitive specific instance and give that to you.
I'm not sure what you think you're asking. Your "clarifications" just make me
more confused.

Let me try to state this clearly:

* People have real instances of problems that are known to be NP-Complete.

* Some of those instances are hard to solve.

* There is no way that people will give to you, a random person, their commercially sensitive instances.

Let me be even clearer:

* In one of my companies we run SAT solvers to try to find solutions to instances of known NP-Complete problems, and there is no way I can give you that data.

So, what are you asking for?

    
    
      > I'm ... talking about ... the resources
      > used in the real-world by taking advice
      > from an algorithm.
    

??

    
    
      > For instance, in the UPS example, fuel
      > and labor costs depend on the exact route
      > decided by UPS's logistics algorithm. Most
      > likely that route is not 'optimal', but
      > may be pretty close (not many resources
      > would be saved by using the optimal route
      > over whatever other route UPS ends up
      > driving).
    

Even for instances that are hard there are approximation algorithms that get
approximate solutions. Of course they're close, but sometimes they're not very
close. This is an active area of research.

    
    
      >> What would you do with it?
    
      > I would certainly look at it and at least
      > make a cursory attempt at solving it.
    

Hmm.

    
    
      > However, the reason I originally asked
      > the question was so that I could have a
      > legitimate problem (with instances) to
      > give to someone who claims a P=NP proof
      > in addition to an algorithm.
    

Well, there's the problem. The web is littered with people claiming algorithms
for P=NP. What problem do they claim to have an algorithm for? If I provide a
G3C instance, will they be able to use their algorithm on it?

    
    
      > He can solve most random subset sum problems,
      > of the kind I gave you, with decently sized
      > sets (thousands of elements) and randomly
      > selected targets very quickly.  However,
      > I think that random subset sum problems
      > might be pretty easy.
    

Exactly.

    
    
      > Further, I'm not sure of the precise way
      > to measure the complexity of the algorithm
      > when just given a list of integers in ASCII.
      > I assume you really need to analyze things
      > at the bit level, instead of just the number
      > of ASCII characters.
    

Largely it's the same thing.

    
    
      > But, assuming P=NP and we have a runnable
      > algorithm ... I am interested in finding
      > and solving the problems that would have
      > the largest benefit ...
    

If you, or he, genuinely do have a program to solve hard instances of an NPC
problem, you'll have no problem getting real instances. If marketed properly,
people will throw money at you to solve their instances.

    
    
      > Assume you can only solve a single instance
      > at a time, what order do you solve them in?
    

??

You have an instance, you solve it. I don't understand your question.

Look, it's not NPC, but think about factoring integers. People really do want
to factor big numbers. Each number is an instance, and there are a gazillion
of them that people want factored. Which one do you do? The one people offer
the most money for.

    
    
      > ... if you have a standard glossary I could
      > probably wield it effectively in our conversation.
    

We've mostly covered the terms that matter. The difficulty isn't with the
technical terms, the problem is that I can't find a sensible question that you
might be asking.

    
    
      > If you do have a good reference, I'd appreciate it.
    

This is actually quite reasonable:

[https://en.wikipedia.org/wiki/Computational_complexity_theor...](https://en.wikipedia.org/wiki/Computational_complexity_theory#Problem_instances)

~~~
jsprogrammer
It sounds like you know exactly what I'm asking, but are being intentionally
obtuse.

>and there is no way I can give you that data.

Can't give because it's physically and/or logically impossible? Or, because
you or your superior authority prefer not to?

>Largely it's the same thing.

Largely, but not precisely. A proof would need to be formulated in terms of
bits.

>If marketed properly, people will throw money at you to solve their
instances.

Sure. I think part of my question implies, "How do you market such an
algorithm? At the end of the day, you need instances to feed the solver. How
you get those instances into the solver?"

Assume you have everyone throwing money at you. Which instances do you solve
given the resources you have? Picking the largest bundle of cash headed your
way doesn't seem like it would necessarily give you the 'best results' (in
terms of benefit, as described previously).

~~~
ColinWright
If all else fails, assume good faith. If people are trying to upset you, they
will be thwarted by your reaction. If people really are acting in good faith,
then your reaction is correct.

    
    
      > It sounds like you know exactly what
      > I'm asking, but are being intentionally
      > obtuse.
    

No, I really don't know what you're asking. It sounds like you're asking
people simply to give you big, hard instances of problems that are known to be
NPC. If that's what you're asking, why don't you just say so? What's the
nonsense with "theoretical" and other things? If it's not what you're asking,
then what _are_ you asking?

    
    
      >> ... and there is no way I can give you that data.
    
      > Can't give because it's physically and/or logically
      > impossible? Or, because you or your superior authority
      > prefer not to?
    

It's commercially sensitive data. People are paying us money to provide
systems that solve problems like this. We do it better than anyone else
currently does, and we get paid for it. We are contractually obliged to keep
the data secure, and we are obliged by commercial concerns not to pass it on
anyway.

    
    
      >>> Further, I'm not sure of the precise way
      >>> to measure the complexity of the algorithm
      >>> when just given a list of integers in ASCII.
      >>> I assume you really need to analyze things
      >>> at the bit level, instead of just the number
      >>> of ASCII characters.
    
      >> Largely it's the same thing.
    
      > Largely, but not precisely. A proof would need
      > to be formulated in terms of bits.
    

If you have it in terms of bytes, multiply by eight. Scalar factors simply
don't matter in this field, they really don't. If you can put the instance in
a file, simply count the bytes in the file. In the end it comes to the same
thing because we are talking about big-Oh-type things - worst cases and limits

    
    
      >> If marketed properly, people will throw
      >> money at you to solve their instances.
    
      > I think part of my question implies, "How
      > do you market such an algorithm?  At the
      > end of the day, you need instances to feed
      > the solver.  How you get those instances
      > into the solver?"
    

So is this your problem/question:

    
    
        We have a program that solves instances of
        problem X, which is NPC.  We claim it's
        polynomial, but need to test it.  Please
        can someone give us instances they believe
        are difficult so we can prove our program
        is worth looking at.
    

Is that what you're asking?

Which NPC problem does the algorithm/program solve?

    
    
      > Assume you have everyone throwing money
      > at you. Which instances do you solve given
      > the resources you have? Picking the largest
      > bundle of cash headed your way doesn't seem
      > like it would necessarily give you the 'best
      > results' (in terms of benefit, as described
      > previously).
    

I don't understand why you're asking about "best results" \- the market will
sort that for you. Get a reputation for solving instances of problems believed
to be hard, and the people who will derive the best benefit will have the
greatest incentive to offer you the most money. Or just solve the one that
gets you the most money and buy another machine.

Understand this - what you're asking, and this entire conversation - just
doesn't make sense to me. Either you're not being honest, or there is a
complete mis-match between our respective understandings of the whole problem
area. Going back to my first paragraph I'll assume the latter. I just don't
understand why you are saying what you're saying.

So let me ask this. Is this your question:

    
    
        I claim to have solved P=NP by constructing
        a program/machine that solves hard instances
        problem X - known to be NPC.  I need to test
        it and prove to people that it works.  How
        do I do that?
    

If that's your question then

* I have no idea why you were ever talking about "theoretical" problems,

* I have some suggestions,

* I'd like to know what problem X is.

If that's not your question, perhaps you should re-read this thread and simply
start again with a simple, single, clear question.

~~~
jsprogrammer
I don't claim to have solved P=NP nor do I claim to have an algorithm.

The word "theoretical" was only used to distinguish between problems and
instances.

The question is, "Solving which instances, in which order, would lead to the
most positive outcomes?", where "positive outcomes" is intentionally ill-
defined so that the answerer can inject their own perspective as well.

Imagine you can solve any NP-complete instance of a given size (even with a
P-time/space algorithm there would still be limits on the size of problem that
could be solved in a given time with a given machine). Sure, maybe you could
break most crypto-systems and seize control of very electronic bit of currency
(why wait for someone to decide to give it to you?). It's not clear to me that
would necessarily be a productive use of the algorithm.

Instead, I'm looking for instances where a solution would directly lead to
less suffering. For example, with a given sub-optimal route, drivers must
spend X amount of time. With the optimal route, drivers only spend X - Y time.

>Is that what you're asking?

Not exactly. While it would be nice to have a scheme for validating algorithms
and I would have some use for it, I'm actually more interested in the
instances that need solving.

I think the question is interesting in that it could provide a base of
problems for researchers to play/test with. These problems have been developed
in the literature, but as far as I know, there is no easy to access repository
of them.

I think the question is also interesting because people often talk about how
great the world would be if P=NP and we could easily solve NP problems.
However, this talk is typically only "theoretical" (about problems and not
instances). If someone can claim the world would be better off with faster
solutions, they should be able to provide an instance whose solution would
lead to a better world.

~~~
ColinWright

      > I don't claim to have solved P=NP
      > nor do I claim to have an algorithm.
    

But you know someone who claims to be able to solve subset-sum problems
quickly. I have a graph to 3-color, I wonder if I should convert it into a
subset-sum problem for them to solve. That would take some time, and I'm
pretty sure it won't be worth it. I'll have a think.

    
    
      > The word "theoretical" was only used
      > to distinguish between problems and
      > instances.
    

OK, noted.

    
    
      > The question is,
      > "Solving which instances, in which order,
      > would lead to the most positive outcomes?",
      > where "positive outcomes" is intentionally
      > ill-defined so that the answerer can inject
      > their own perspective as well.
    

Now I'm starting to get some idea of what you're asking. Give me some time
(I'm about to go into a string of meetings) and I'll see if I can phrase it
differently to see if I really do know what you're asking.

    
    
      > I think the question is also interesting
      > because people often talk about how great
      > the world would be if P=NP and we could
      > easily solve NP problems.
    

Actually, people mostly talk about how the world would be much better if NP !=
P.

    
    
      > However, this talk is typically only
      > "theoretical" (about problems and not
      > instances).
    

Of course - people are researching how to solve the problems, specific
instances are specific instances, whereas the research challenge is algorithms
for the problem.

    
    
      > If someone can claim the world would
      > be better off with faster solutions,
      > they should be able to provide an
      > instance whose solution would lead
      > to a better world.
    

Why? Often we don't know the true benefits of an advance in science or
technology until well after it's done, dusted, commercialized, and in the
hands of ordinary people. Given that there currently are no ways to solve big,
hard instances of NPC problems, why should people bother to find specific
instances?

~~~
jsprogrammer
>Actually, people mostly talk about how the world would be much better if NP
!= P.

I know I've seen some arguments stating as such. If you know of a well-founded
one, I'd be interested in reading it. Personally, I don't know or have a
strong opinion. Seems like either could be viewed as "better" in some way.

>But you know someone who claims to be able to solve subset-sum problems
quickly. I have a graph to 3-color, I wonder if I should convert it into a
subset-sum problem for them to solve. That would take some time, and I'm
pretty sure it won't be worth it. I'll have a think.

Well, I actually wrote up some tests for him and he ran his algorithm against
it. I also gave him a ~10MB text file containing a very large list of integers
(I forget the range at the moment. I could find it if you'd like, but I'm not
sure how meaningful it is.) with a randomly selected target sum. He provided
the solution (which I have not verified) in ~6-9 months. He also ran through
many thousands of problem instances (subset sum...in JSON arrays) with varying
parameters (number of integers; range of integers) over the course over
several days. I made a rudimentary plot of the parameters and timings and in
my very limited analysis, it did appear that there was a sub-exponential trend
(at least for the instances that he provided solutions to [:)]).

I've been searching for the results (all instances, solutions, and timings)
that I had collected from the test machine, but I haven't been able to find
them yet. However, all of the test code is on GitHub and packaged into Docker
containers for easy deployment of the test server and basic visualization of
the results. I'd guess he (the person who claims a P=NP proof and sub-
exponential-time subset sum solver) would be willing to run his algorithm
against the test server again.

~~~
ColinWright

      >> Actually, people mostly talk about how
      >> the world would be much better if NP != P.
    
      > Seems like either could be viewed as
      > "better" in some way.
    

Indeed, it depends on your internal axioms about "better". I don't have strong
feelings either way either, and my feelings don't affect what's true and what
isn't. The problem is open, remains open, and we deal with what's in front of
us.

    
    
      >> But you know someone who claims to be
      >> able to solve subset-sum problems quickly.
    
      > ... He also ran through many thousands
      > of problem instances ... with varying
      > parameters ... it did appear that there
      > was a sub-exponential trend ...
    

Unfortunately that means exactly nothing. The whole point is that for many
(perhaps most) problems, the proportion of hard instances gets vanishingly
small, and yet those are the ones that we often need to solve. Showing a sub-
exponential trend for randomly chosen instances, or worse, instances he's
chosen to show you, is no evidence at all.

    
    
      >> I have a graph to 3-color, I wonder if
      >> I should convert it into a subset-sum
      >> problem for them to solve.
    
      > I'd guess he (the person who claims a
      > P=NP proof and sub-exponential-time
      > subset sum solver) would be willing
      > to run his algorithm ...
    

Perhaps that would be interesting. I'll look into how easy the conversion
might be.

~~~
jsprogrammer
>Unfortunately that means exactly nothing. The whole point is that for many
(perhaps most) problems, the proportion of hard instances gets vanishingly
small, and yet those are the ones that we often need to solve. Showing a sub-
exponential trend for randomly chosen instances, or worse, instances he's
chosen to show you, is no evidence at all.

I wouldn't say exactly nothing. If no one can present an algorithm than can do
at least as good on the same instances...that's interesting.

He did not choose the instances. They were generated using multiple calls to a
built-in pseudo-random function. The instances were generated when he
requested an instance and the timer started when the instances were
transmitted to him. The timer was stopped when a response was received and the
response was then verified. He never submitted an incorrect answer.

[Aside: There is a particular web page of a university professor that lists a
smallish subset sum problem and claims that the naive algorithm would take
some 10^large_number years to find the answer. His algorithm solves that
particular instance in some very short period of time (seconds or less I
believe). Is that particular instance "hard"? I don't know. Apparently not.

He likes to use that instance as an example of his algorithm solving a "hard"
problem. My problem is that I don't know how to verify if an instance is hard
(or if such an analysis is even possible/valid). My instincts say that it very
much depends on the "density of solutions" in the particular instance. Maybe
that instance has lots of solutions and so a random walk will easily find one?
On the other hand, maybe there is a limit to the number of solutions that can
exist in a well-formed instance?]

While I do not understand his entire proof (and I do believe he has
intentionally withheld a portion of the proof [and certainly a key piece of
the algorithm (if it exists)]), he does point to some interesting things (such
as an apparent fractal pattern in the sum of all sets in the powerset of a set
of integers). He claims a function that provides an ordering over the sums of
the sets in the powerset, which can apparently be computed on-demand in
polynomial time of the original set. A binary search is then applied over the
ordering.

In my own theory, it seems like it could be possible; after all, there isn't
an exponential number of items, only combinations.

>The whole point

Sorry, the whole point of what? NP-Completeness?

~~~
ColinWright

      >> Showing a sub-exponential trend for
      >> randomly chosen instances ... is no
      >> evidence at all.
    
      > If no one can present an algorithm
      > than can do at least as good on the
      > same instances...that's interesting.
    

It proves nothing about whether it's a polynomial algorithm, or even a sub-
exponential algorithm.

    
    
      > He did not choose the instances. They
      > were generated using multiple calls
      > to a built-in pseudo-random function.
    

Even worse - you know nothing about how the instances were created, or whether
they are supposed to be hard. Does this magic function claim to produce known
hard instances?

    
    
      > ... a particular web page ... that
      > lists a smallish subset sum problem
      > ... claims that the naive algorithm
      > would take some 10^large_number years
      > to find the answer. His algorithm
      > solves that particular instance in
      > some very short period of time ...
      > Is that particular instance "hard"?
      > I don't know. Apparently not.
    

Indeed - apparently not.

This entire discussion is running in circles. You keep feeding me small pieces
of information, one piece at a time, and it's not adding up to anything
convincing. At this point I feel the discussion is going nowhere.

    
    
      > ... I don't know how to verify if an
      > instance is hard ...
    

Largely speaking no one does, which is why we require proofs of worst case
running times. Proofs are difficult, and to present a proof requires full
disclosure of the entire algorithm.

To expend effort on such a proof some evidence is required to make it likely
to be worthwhile. To say:

    
    
        I found this place that gives
        me instances, and I solve them
        all quickly.
    

... is unconvincing.

    
    
      > My instincts say that it very much
      > depends on the "density of solutions"
      > in the particular instance.  Maybe
      > that instance has lots of solutions
      > and so a random walk will easily find
      > one?
    

Or maybe every obvious choice you make is the right one. Hard instances are
hard when you have to make choices early, and you only find out much later
that the choice you made was wrong. That's what creates the exponential search
space.

    
    
      > On the other hand, maybe there is a
      > limit to the number of solutions that
      > can exist in a well-formed instance?
    

Number of solutions to an instance is not usually a good measure, unless there
are exponentially many. Usually there aren't.

    
    
      > While I do not understand his entire
      > proof (and I do believe he has
      > intentionally withheld a portion of
      > the proof [and certainly a key piece
      > of the algorithm (if it exists)]),
    

Making it impossible to provide an effective evaluation ...

    
    
      > ... he does point to some interesting
      > things (such as an apparent fractal
      > pattern in the sum of all sets in the
      > powerset of a set of integers).
    

That seems to be a meaningless comment without more information.

    
    
      > He claims a function that provides an
      > ordering over the sums of the sets in
      > the powerset, which can apparently be
      > computed on-demand in polynomial time
      > of the original set.  A binary search
      > is then applied over the ordering.
    

Again, doesn't seem to mean much. Feels a lot like simple dynamic programming.

    
    
      > In my own theory, it seems like it
      > could be possible; after all, there
      > isn't an exponential number of items,
      > only combinations.
    

But it's the combinations that need to be searched, not simply the items.
There are only a linear number of vertices in graphs, and at most a quadratic
number of edges, and yet that's NP-Complete.

    
    
      >>>> But you know someone who claims to be
      >>>> able to solve subset-sum problems quickly.
    
      >>> ... He also ran through many thousands
      >>> of problem instances ... with varying
      >>> parameters ... it did appear that there
      >>> was a sub-exponential trend ...
    
      >> Unfortunately that means exactly nothing.
      >> The whole point is that for many (perhaps
      >> most) problems, the proportion of hard
      >> instances gets vanishingly small,
    
      > Sorry, the whole point of what? NP-Completeness?
    

No, the whole point of my comments to you. Let me summarize:

* You know someone who claims to have a sub-exponential solution to the Subset Sum problem.

* The evidence provided is that over a large collection of instances, the solution time seems to be sub-exponential.

* The difficulty is that to be a solution to P=NP you need an algorithm that runs sub-exponentially on _all_ cases.

* Most instances are easy, but you/he need to show that the algorithm runs sub-exponentially on _all_ instances, not just the easy ones.

* The whole point of all my comments is that claiming sub-exponential running time on specific examples/instances is no proof, and poor evidence.

~~~
jsprogrammer
>* >* >*

I generally agree with all of that and I don't think I have made a claim that
contradicts your summary.

I haven't re-read this entire thread in awhile, but I believe you came into
this seeking a clarification to what I was asking on a different thread. The
reason it might seem like I am only piecing you pieces of information is that
I am just responding to your questions and points as I perceive them to be
related to my memory of what that thread was about.

If the search space is finite for problems of a certain length [it is], you
may be able to uniformly sample from the instance space of a given problem and
attempt to derive a statistical characterization of a given algorithm.

I do not now if iteratively sampling integers from a uniform distribution is
the "best" way to search the space, but it seems like it would give you a
reasonable/interesting map of a particular area. The only intent of the
exercise was to explore.

To a part of your point:

>Most instances are easy, but you/he need to show that the algorithm runs sub-
exponentially on all instances, not just the easy ones.

Absolutely, a proof requires showing all instances can be solved by a single
[deterministic (non-non-deterministic) [etc....insert your own word here]]
algorithm in polynomial time of the length of the instance (Edit: On second
read, I might change this to 'problem' [which may need to be distinguished
from Problem]).

I have not seen that, so I do not claim or claim to know of any P=NP proof.

>The whole point of all my comments is that claiming sub-exponential running
time on specific examples/instances is no proof, and poor evidence.

The point of my question was to get instances (simulated or real) to feed to
this person's algorithm to see it could actually solve problems people want
solved quicker/much quicker than competing algorithms. Additionally, I am
interested in the topic more generally and was looking for speculation on
which problems (and instances) might be the most "beneficial" (as defined in
our conversation) to solve (ie. give to a hypothesized solver that you trust
to solve in a given polynomial time of the length of the problem).

Since it is impractical to search the entire instance space for problems of
larger than some smallish length, you may test an algorithm with a
specifically [Aside: I believe this may be implied by 'algorithm'...though the
halting problem may prevent such arbitrary analysis of running times...]
claimed polynomial limit on the running time. Any (hypothesized) P=NP
exploiting solver would (speculative) make a polynomial-time running claim
that could be tested.

I don't know what running-time limits he has put on his algorithm. It is one
of the reasons I am skeptical of his proof.

~~~
ColinWright

      > If the search space is finite for problems
      > of a certain length [it is], you may be able
      > to uniformly sample from the instance space
      > of a given problem and attempt to derive a
      > statistical characterization of a given
      > algorithm.
    

I'm not sure what you're referring to about the search space, but the detail
isn't important - what you say here is not the case. When dealing with NPC
problems, the instances form a landscape that's not like rolling hills, but
like a mesa with wells and flagpoles. Most of the time you wander around,
broadly speaking at the same level, and then you might, if you're unbelievably
lucky, fall down a well, or find a flagpole to climb. But this becomes
implausibly difficult as the sizes get properly big.

Sampling the space just doesn't work.

    
    
      > I do not know if iteratively sampling integers
      > from a uniform distribution is the "best" way
      > to search the space, but it seems like it would
      > give you a reasonable/interesting map of a
      > particular area.  The only intent of the
      > exercise was to explore.
    

Doesn't work. Our intuition tends to be drawn from our experience in three
dimensions, but it just doesn't work in higher dimensions. And with NPC
problems we are in huge numbers of dimensions - thousands, tens of thousands.

Here's a link: [http://www.penzba.co.uk/cgi-
bin/PvsNP.py?SpikeySpheres](http://www.penzba.co.uk/cgi-
bin/PvsNP.py?SpikeySpheres)

    
    
      >> The whole point of all my comments
      >> is that claiming sub-exponential
      >> running time on specific examples/
      >> instances is no proof, and poor
      >> evidence.
    
      > The point of my question was to get
      > instances (simulated or real) to
      > feed to this person's algorithm ...
    

Yes, I think I finally understand your question. My intention is to blog the
question using my working and a hypothetical context. Before I make it public
and I can get your comments, but you still haven't given me an email address.
If you don't, I'll have to do it here.

    
    
      > Since it is impractical to search
      > the entire instance space for problems
      > of larger than some smallish length,
      > you may test an algorithm with a
      > specifically ... claimed polynomial
      > limit on the running time. Any
      > (hypothesized) P=NP exploiting
      > solver would (speculative) make a
      > polynomial-time running claim that
      > could be tested.
    

I don't think that makes sense, so obviously I've missed something. I don't
understand what you mean by a "P=NP exploiting solver". I don't see how a
solver would exploit P=NP - that doesn't make sense to me.

    
    
      > I don't know what running-time limits
      > he has put on his algorithm.  It is
      > one of the reasons I am skeptical of
      > his proof.
    

This doesn't make sense to me either. In a proof one shows that the time taken
is always less than some limit, regardless of the input. One doesn't talk
about having a running-time limit - that seems irrelevant to the entire
question.

If you send me an email I'll point you at my post when I write it and before I
publish it, so you can comment.

~~~
jsprogrammer
This convo went to email due to HN's poor interface.

------
WhitneyLand
Great science writing, explaining concepts in an accessible way without
homeopathic dilutions of the substance.

------
bru_
Cool, I did not know that SETH and PvNP were different

~~~
thomasahle
Basically:

\- If you can solve k-sat in time (2-eps)^n, you've refuted SETH.

\- If you can solve 3-sat in time (1+o(1))^n, you've refuted ETH.

\- If you can solve 3-sat in time n^O(1), you've refuted P!=NP.

Since general k-sat is at least as hard as 3-sat, it follows that SETH is the
strongest hypothesis (hence the name) and thus the most likely to fall. P!=NP
is the weakest hypothesis and thus the most likely of the three to be true.

~~~
darkmighty
is (1+o(1)) essentially anything subexponential but hyperpolynomial?

~~~
thomasahle
Yeah anything subexponential. We can also write it as `2^o(n)`.

It doesn't have to by hyperpolynomial, if you solve ETH in linear time, you
also refute it :-)

------
itg
>jsprogrammer

oh my god your really not helping

~~~
dang
We detached this comment from
[https://news.ycombinator.com/item?id=10305170](https://news.ycombinator.com/item?id=10305170)
and marked it off-topic.

