The primary method of proving problems are computationally unsolvable is called reducibility

See Decidability.md for more context

As the name suggestions, if reduces to then can be used to solve . If reduces to a problem, that problem is undecidable.

Theorem: is undecidable

This is a famously known as the halting problem. If we had a solution to , we could easily make a universal decider, so must be undecidable. We can also prove this directly with diagonalization, but reducibility given is simpler.

Theorem: is undecidable

We can construct to simulate on input and reject all others. Then running on tells us whether and therefore accepts . Hence, provides a solution to and is therefore undecidable.

Theorem: is undecidable

This is not as immediately intuitive. The idea is we run a decider on “On input : Accept if has the form , otherwise run on input and accept if accepts ”. is only regular if accepts

Theorem: More generally, determining any property of the languages recognized by Turing machines is undecidable

Theorem: is undecidable

We can use other results to make our proofs simpler. reduces to where one of the machines always rejects. Thus, is undecidable.

Computation Histories

Definition: An accepting computation history for on is a legal sequence of configurations that results in an accept state, while a rejecting computation history results in a reject state

If doesn’t halt on , no accepting or rejecting state exists for on

Nondeterministic machines may have many computation histories, but we don’t focus on this (and they are equivalent computationally)

Definition: A linear bounded automaton is a restricted Turing machine wherein the tape head cannot move off the portion of the tape containing the input

The memory of an LBA is linear in , as a factor of the size of the input alphabet

Despite limited memory, these are actually quite powerful. Conceptually, you should already understand that many problems can be solved in linear memory (using standard algorithmic terms). This includes .

Theorem: is decidable

Since there are a finite number of configurations, we run for steps and reject if it has not halted

Theorem: is undecidable

At first glance, this is surprising. We can’t come up with an algorithm that decides this in limited memory?

Observe that we can make an LBA that verifies an accepting computation history for , allowing us to reduce from

Theorem: is undecidable

The key idea is that we can actually design a CFG that generates all strings that are not valid computation histories for a given . This is pretty easy to do with an equivalent PDA, using 3 branches,

  1. Check the history doesn’t begin with
  2. Check the history doesn’t end with an accept configuration
  3. Verify that it isn’t the case that each configuration leads to the next

A small technical note is that we alternate the configuration history writing configurations forward and then backward. This is necessary for our stack comparison to check the transition function.

My two takeaways are,

  • CFGs can handle certain problems that clearly take unlimited memory
  • The TM transition function has finite size

These are both trivial but important to internalize

Normal Problems

Turns out there are undecidable problems that aren’t about contrived computation models! Good to know if you want to convince anyone you’re learning something useful

Definition: The Post Correspondence Problem takes a collection of dominos and a match is a sequence where . The problem is finding whether has a match. Note that our sequence need not be a permutation (we can repeat or omit as much as we want).

Theorem: is undecidable

The proof idea is designing a set of dominos that can only generate accepting configuration histories of a given

The idea is best demonstrated in MPCP (Modified PCP) where we force the sequence to begin with (I’m not going to include the proof, but you can look it up or think about it)

Then we modify the set of dominoes to look like to enforce the start and end domino

Mapping Reducibility

Reducibility is very important in the theory of computation, so we formalize it

Definition: A function is a computable function if some Turing machine , on every input , halts with just on its tape

Definition: Language is mapping reducible to language , written , if there is a computable reduction function , where for every ,

If one problem is mapping reducible to a second, previously solved problem, we have a solution to our original problem

Theorem: If and is decidable, then is decidable
Vice versa, if is undecidable, then is undecidable

Example:
Show
We need a function such that

The following machine computes the reduction ,
“On input ”:

  1. Construct “On input : Run on , accept if accepts, otherwise loop”
  2. Output

Our proof for the undecidability of PCP shows that and that

As our intuition implies, reducibility is a transitive property

Importantly, mapping reduction is not exactly equivalent to the informal notion of reducibility that we’ve used earlier. For example, look back at how we proved is undecidable. This proof showed (not )

In fact, there is no mapping for ! is not Turing-recognizable (see Theorem right below). However, we can see clearly that is Turing-recognizable.

Theorem: If and is Turing-recognizable, then is Turing-recognizable
Vice versa, if is not Turing-recognizable, then is not Turing-recognizable

We typically apply this by showing that

Theorem: is neither Turing-recognizable nor co-Turing-recognizable

is not Turing-recognizable because , “On any input reject”, “On any input forward the result of on

is not Turing-recognizable because , “On any input accept”, “On any input forward the result of on

Turing Reducibility

Our intuition says that and should be reducible to each other, but this is not the case for mapping reducibility

We introduce another way to think of reducibility

Definition: An oracle for a language is an external device that is capable of reporting whether any string is a member of

An oracle Turing machine is a modified Turing machine with the capability of querying an oracle for a language , denoted

We say that a language is decidable relative to if can decide

Definition: Language is Turing reducible to language , written , if is decidable relative to

This is a generalization of mapping reducibility

Interestingly, we can construct undecidable languages for any given oracle machine