22

In mathematics, there are many existence proofs that are non-constructive, so we know that a certain object exists although we don't know how to find it.

I am looking for similar results in computer science. In particular: is there a problem that we can prove it is decidable without showing an algorithm for it? I.e. we know that it can be solved by an algorithm, but we don't know what the algorithm looks like?

Erel Segal-Halevi
  • 6,088
  • 1
  • 25
  • 60

3 Answers3

15

The simplest case I know of an algorithm that exists, though it is not known which algorithm, concerns finite state automata.

The quotient $L_1/L_2$ of a language $L_1$ by a language $L_2$ is defined as $L_1/L_2=\{x \mid \exists y\in L_2 \text{ such that } xy\in L_1\}$.

It is easily proved that regular set are closed under quotient by an arbitrary set. In other words, if $L_1$ is regular and $L_2$ is arbitrary (not necessarily regular), then $L_1/L_2$ is regular, too.

The proof is quite simple. Let $M=(Q,\Sigma,\delta,q_0,F)$ be a FSA accepting the regular set $R$, where $Q$ and $F$ are respectively the set of states and the set of accepting states, and let $L$ be an arbitrary language. Let $F'=\{q\in Q\mid \exists y\in L \;\;\delta(q,y)\in F\}$ be the set of states from which a final state can be reached by accepting a string from $L$.

The automaton $M'=(Q,\Sigma,\delta,q_0,F')$, which differs from $M$ only in its set $F'$ of final states recognizes precisely $R/L$. (Or see Hopcroft-Ullman 1979, page 62 for a proof of this fact.)

However, when the set $L$ is not decidable, there may be no algorithm to decide which states have the property that defines $F'$. So, while we know that the set $F'$ is a subset of $Q$, we have no algorithm to determine which subset. Consequently, while we know that $R$ is accepted by one of $2^{|Q|}$ possible FSA, we do not know which it is. Though I must confess we know to a large extent what it looks like.

This is an example of what is sometimes called an almost constructive proof, that is a proof that one of a finite number of answers is the right one.

I suppose an extension of that could be a proof that one of an enumerable set of answers is the right one. But I do not know any. Nor do I know a purely non-constructive proof that some problem is decidable, for example using only contradiction.

D.W.
  • 167,959
  • 22
  • 232
  • 500
babou
  • 19,645
  • 43
  • 77
12

To expand on Hendrick's original comment, consider this problem

Given an integer $n\ge 0$ is there a run of $n$ or more consecutive 7s in the decimal expansion of $\pi$?

This problem is decidable, since one of two cases may obtain:

  1. There is an integer $N$ for which the decimal expansion of $\pi$ contains a run of $N$ consecutive 7s, but no longer run.
  2. For any $n$, the expansion of $\pi$ has a run of $n$ consecutive 7s.

In case (1) a decision algorithm for the problem would be one of

If $n > N$ answer "no" else answer "yes".

and in case (2) the algorithm would be

Answer "yes".

Clearly each of these is a decision algorithm; we just don't know which. That suffices, though, since decidability only requires the existence of an algorithm, not the specification of which algorithm to use.

Rick Decker
  • 15,016
  • 5
  • 43
  • 54
2

Here is a non-answer. I'm posting because I believe it's instructive, because I originally claimed the opposite and eight people agreed enough to upvote before @sdcwc pointed out the mistake. I didn't want to just edit my first answer because I'm not sure as many people would have upvoted it if they knew it was wrong.

I originally claimed that it sufficed to take any set $S$ that we know to be finite but for which we don't know the members. Since $S$ is finite, it is recursive, so there is an algorithm but I claimed that we don't know what it is.

However, this is incorrect. For example, by the Robertson–Seymour theorem, we know that the class of graphs of treewidth at most 10 has a finite set of forbidden minors. We don't know what this set is so I claimed we don't have an algorithm to decide if a graph $H$ is a forbidden minor of the class of graphs of treewidth at most 10. But @sdcwc points out that there is an algorithm: just check that $H$ has treewidth more than 10 and all its proper minors have treewidth at most 10.

David Richerby
  • 82,470
  • 26
  • 145
  • 239