7

I'm a CS undergrad so my math/CS knowledge is not that deep so please correct me if my premise is flawed or I have made some incorrect assumptions.

So I was thinking, much in the way that some primality testers are probabilistic(they give you yes or no but have a chance to be wrong). Would it be possible to build a probabilistic halting problem solver? One that reports within a certain degree of error, whether a problem halts or not?

Igglyboo
  • 211
  • 2
  • 4
  • there exist halt-detection algorithms that succeed in giving the correct answer with some unknown probability and return "inconclusive" otherwise. these algorithms are studied eg in busy beaver research, automated thm proving, program termination analysis, & some other contexts. – vzn Feb 14 '14 at 05:46
  • @vzn The sample algorithm running the input for $T$ steps also has the same properties. How are your algorithms better? Can you quantify it? – Yuval Filmus Feb 14 '14 at 06:12
  • @YuvalFilmus it is probably theoretically impossible to compare these algorithms much; one way is mentioned in my answer on this question algorithm to solve halting problem... its an active area of research but also at the fringes of TCS without much widespread recognition of its significance/interconnection. the algorithms succeed in identifying some inputs that dont halt, which cannot be said of just running the TM on the inputs. intend to write up more detail on a blog at some pt (have various links). – vzn Feb 14 '14 at 16:47

1 Answers1

6

It depends what you mean by "probabilistic". There are at least two interpretations. First, the algorithm has some probability of success for every input. Second, the algorithm succeeds on a certain fraction of inputs.

For the first interpretation, it is easy to rule out such an algorithm: probabilistic computation can be simulated (inefficiently but effectively) using deterministic computation, by trying all possible coin tosses.

For the second interpretation, we will have to work a bit harder. Suppose that your algorithm is guaranteed to work with an asymptotic success probability of $2/3$. That means that the fraction of inputs in $[1,N]$ for which it gives the correct answer is some $p_N \to 2/3$. Now suppose you're interested in a certain program $P$. It seems that under a reasonable encoding of programs, you would be able to come up with a long stretch $[M,10M]$ (say) of programs equivalent to $P$. By taking $M$ large enough, it should be the case that by taking the majority vote on the answer of a "probabilistic" algorithm on all of these equivalent programs, you will be able to ascertain whether $P$ halts or not. This rules out even this interpretation of a "probabilistic" algorithm.

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503
  • nice proof but it doesnt apply to algorithms that have unknown probability. – vzn Feb 14 '14 at 05:49
  • And what might these be? My logic is not intuitionistic, so every program either halts or doesn't halt, even if the axiom system is not strong enough to decide which. – Yuval Filmus Feb 14 '14 at 06:11
  • another assumption here in this proof sketch is that the probabilistic algorithm would have independent probability on equivalent machines ie it would return the correct answer with same independent probability. but thats a big stretch. eg it could not be independent and with high correlation get the wrong answer for equivalent machines etc. – vzn Feb 14 '14 at 16:52
  • 1
    There is no such assumption. In the second interpretation, the algorithm is completely deterministic, it just doesn't always tell the truth. I give an interpretation for a statement like "the algorithm outputs the correct answer on a 99% fraction of the inputs", and under this interpretation the argument should work. More generally, randomized algorithm can be simulated deterministically, so if we're not interested in the running time, we can always assume that the algorithm is deterministic. – Yuval Filmus Feb 14 '14 at 21:44
  • "By taking M large enough, it should be the case that by taking the majority vote on the answer of a "probabilistic" algorithm on all of these equivalent programs," — there seems to be an assumption that if you ran the same experiment on different instances of the same machine, the algorithm has the same independent probability. but what if it is 100% guaranteed to fail on some particular instance, no matter how it is "padded" (where here "padding" refers to adding irrelevant states or structures to the TM that do not alter its function.) so defns must be very careful in this type of proof – vzn Feb 14 '14 at 22:09
  • There's nothing probabilistic going on here. I put "probabilistic" in quotes. The "probability" here is over all different programs; on each of them the algorithm can be assumed, without loss of generality, to be deterministic (by the second paragraph). The algorithm is guaranteed to work on a $2/3$-fraction of inputs in the limit, so in particular, it must report the correct answer on at least $(2/3)10M-M$ inputs in $[M,10M]$. Since $(2/3)10M - M > (10M-M)/2$, if we take a majority vote then we find out whether the given program halts or not. – Yuval Filmus Feb 14 '14 at 22:55
  • ok if you assume the probability to be 2/3 across machines that are padded versions of the same machine, thats a valid proof, maybe, then only saying that assumption doesnt make much sense to me... & it sounds too strong; maybe even an impossible definition itself, & a weaker assumption may lead to a hole that allows algorithms to exist that you are attempting to rule out with the proof. am attempting to make a point similar in this essay no go thms by RJL – vzn Feb 14 '14 at 23:38
  • I think you still miss the point. I'm assuming the limiting success "probability" is $2/3$. Then I'm claiming that I can construct a large interval $[M,10M]$ coding Turing machines equivalent to the given Turing machine. Whether this is possible or not depends on details of the encoding. One can imagine some encodings in which this is perfectly possible. For example, these machines might differ on some unreachable states. So my assumption is not what you mention, but rather that for some encodings, there are padded versions of the same machine constituting an arbitrarily long interval. – Yuval Filmus Feb 14 '14 at 23:53
  • lets both admit its a proof sketch. it seems worth writing up in more detail. it seems to assume the halting algorithm probability has nothing to do with machine encodings, only inputs? but the machine encoding is part of an input to the halting algorithm detector. anyway it is full of all kinds of various assumptions, it seems easy to poke holes in them.... are you familiar with the concept of "no-go" thms? there is a long history of them in science.... how do you reconcile your proof with the demonstrated existence of (incomplete) halt detectors listed in my comment? – vzn Feb 14 '14 at 23:56
  • You're still not understanding my concept of a deterministic algorithm which is correct (say) "$2/3$ of the time", so I see no reason for further discussion until you do. It is easy to reconcile the proof with the demonstrated existence of halt detectors: your halt detectors don't work $2/3$ of the time. Rather, they only (seem to) work on "real-world" inputs. In the same way, NP-hard problems are solved every day by heuristic algorithms, and that doesn't imply that P=NP. – Yuval Filmus Feb 15 '14 at 00:47
  • oh! you really meant a deterministic algorithm where you wrote "probabilistic"... ok! maybe it is clear in your head but it doesnt seem to be clear on paper! thought there could be some benefit to expanding the proof into more technical/rigorous details (imho, an important result if correct...why shouldnt it be in a ref somewhere? if it isnt, its new right?) but its your call! it also works fine as a stackexchange answer! yes se is no good for "discussions" & you dont seem to have ever visited [chat], so fully agreed its kind of a stalemate here... – vzn Feb 15 '14 at 01:27