0

I have read that the Post Correspondence Problem is undecidable. Let's say this is the problem of having a finite set of "dominoes" with a string in the top and another string on the bottom. The question is whether it is possible to lay the dominoes in a sequence, aligning the tops and bottoms of each, such that the resulting top string and bottom string are equal.

However, I wonder why the following isn't a decision procedure: Write down a random sequence of tiles and check if the strings match.

I'm sure I must be misunderstanding something, but it sure seems like this is a style of showing that something is NP, which I've seen applied to other problems.

Addem
  • 387
  • 1
  • 13

1 Answers1

1

A decision procedure must always terminate. Your procedure never terminates if there is no possible way to make a match. If you run your procedure for a year and don't find any match, do you conclude that no match is possible, or do you conclude that there's a match but you just haven't found it yet and you need to keep looking? There's no way to tell. Hence your procedure need not terminate.


In a comment, you indicated that you intended this to be a non-deterministic procedure. I'll give a few responses to that:

  1. Pedantic nitpick: Random is not the same as non-deterministic. See Differences and relationships between randomized and nondeterministic algorithms?.

  2. Pedantic nitpick: A language is said to be decidable if it has a decision procedure (or decider), and a deterministic Turing machine is said to be a decision procedure if it always halts and correctly answers whether the input is in the language. This means that your algorithm must be deterministic to count as a decision procedure.

  3. Fundamental answer: There is no way to turn your English description into a valid deterministic Turing machine that decides the problem, or even into a non-deterministic Turing machine that decides the problem. The core problem is that there is no upper bound on the number of dominoes that you might need to lay out, to find the shortest match. It might require a very very long sequence of dominoes.

    To see why in more detail, you might have to write pseudocode for your procedure. I'll try to give you some hints why you're going to get stuck. How do we pick the sequence of dominoes? One obvious approach is to pick some fixed maximum length, say 1 million, and non-deterministically (loosely, "randomly") pick a number $k$ between 1 and 1 million, then non-deterministically (loosely, "randomly") lay out a sequence of $k$ dominoes on the top and bottom, and check if this gives a valid match. However, this doesn't work. For some problem instances, you might need 2 million dominoes for the shortest match, and this algorithm will wrongly declare there is no match. For any fixed maximum length, there is a problem instance that requires more dominoes and thus that will cause the algorithm to be wrong.

    Next try: suppose we repeat the following loop: non-deterministically choose one domino to place at the top and one to place at the bottom; non-deterministically choose whether to stop or continue; if you chose to continue, go back to the beginning and keep laying out dominoes; if you chose to stop, check whether the sequence of dominoes is a match and then halt. The problem is that this procedure is not guaranteed to terminate. All decision procedures must be guaranteed to terminate. Moreover, if you try to convert it to a deterministic algorithm (by standard methods, i.e., enumerate all possible non-deterministic choices), you will find that the deterministic algorithm might run forever without terminating. So this does not yield a valid decision procedure.

    I think if you try to patch up these problems, you will find that everything you try runs into one of these two dead ends: either your algorithm does not correctly decide the Post Correspondence Problem, or your algorithm is not guaranteed to terminate (well, more precisely, your algorithm cannot be converted to a deterministic Turing machine that is guaranteed to terminate on all inputs).

D.W.
  • 167,959
  • 22
  • 232
  • 500