You are on page 1of 3

Computer Science and Engineering, UCSD Spring 04

CSE 105: Introduction to the Theory of Computation Instructor: Mihir Bellare


Crib Sheet May 11, 2004

Computability Crib Sheet

Solving problems related to decidability and undecidability requires that you know and be able
to exploit various facts that we have seen in class and are in the text. Many of these pertain to
properties of regular and context-free languages. Here we will summarize the facts and point you
to examples. If you can’t understand what is stated here, or, having looked at the solutions of
the example problems, don’t understand why they work, you have a lot of studying to do. On
the quizzes and exams you will be expected to have these facts at your fingertips and be able to
exploit them effectively. (For the final, all this is in the syllabus. For Quiz 3, whatever part we
have covered by then.)
There are three classes of facts, as described below.

1 Computable transforms

We have seen that the classes of regular and context-free languages possess numerous closure
properties. The proofs of these closure properties, as per our template, are constructive. For
example, to show that the class of regular languages is closed under complement, we take a DFA
D1 and show how to obtain from it a DFA D2 such that L(D2 ) is the complement of L(D1 ). In
this case, transforming D1 into D2 is easy: we only change the set of final states, setting the set
of final states of D2 to the set of non-final states of D1 . Notice that this simple transformation is
easily automated, in the sense that we can write a program (and thus by the Church-Turing thesis
a TM) that on input hD1 i returns hD2 i. What you need to remember is that this TM exists. You
will need to use it as a subroutine in solving problems on the final.
It turns out that this type of property is true for all closure properties that we have seen. The
table of Figure 1 summarizes the different resulting TMs that can be built and which you should
assume are available to you. In the exam, refer to them by name in your solutions.
Make sure you understand what these TMs accomplish, in the sense of the property they have.
These are not the only such transforms. There are many others, underlying other closure properties
that we have seen.

2 Decidable languages

The second set of facts that you need to remember and be able to use is that certain specific
languages that we have seen are decidable. Below, we will list these languages. For each language,
spend time to look at the definition of the language and understand what it describes. Then, go

1
2 Bellare

TM Input Output Property


comp
Tdfa hD1 i where D1 is DFA hD2 i where D2 is a DFA L(D2 ) = L(D1 )

Tdfa hD1 , D2 i where D1 , D2 are DFAs hDi where D is a DFA L(D) = L(D1 ) ∩ L(D2 )

Tdfa hD1 , D2 i where D1 , D2 are DFAs hDi where D is a DFA L(D) = L(D1 ) ∪ L(D2 )

Tdfa hD1 , D2 i where D1 , D2 are DFAs hDi where D is a DFA L(D) = L(D1 ) · L(D2 )

Tdfa hD1 i where D1 is a DFA hD2 i where D2 is a DFA L(D2 ) = L(D1 )∗
Tnfa→dfa hN i where N is a NFA hDi where D is a DFA L(D) = L(N )

Tcfg hG1 , G2 i where G1 , G2 are CFGs hGi where G is a CFG L(G) = L(G1 ) ∪ L(G2 )

Tcfg hG1 , G2 i where G1 , G2 are CFGs hGi where G is a CFG L(G) = L(G1 ) · L(G2 )

Tcfg hG1 i where G1 is a CFG hG2 i where G2 is a CFG L(G2 ) = L(G1 )∗
Tdfa→cfg hDi where D is a DFA hGi where G is a CFG L(G) = L(D)
0 0
Tcfg→cnf hGi where G is a CFG hG i where G is a CFG in CNF L(G) = L(G0 )

Figure 1: Transform-computing TMs to know. CNF stands for Chomsky Normal Form.

find in the text the theorem that says it is decidable, and make sure you understand what this
claim means.
Your solutions to problems may use the TMs given in Figure 2 as subroutines in the TMs you
design. For each machine, we state the language it decides.
These are not the only decidable languages we have seen. There are many others as well.

2.1 Undecidable languages

The third set of facts that you need to remember and be able to use is that certain specific languages
that we have seen are undecidable. (That is, they are not decidable.) Below, we will list these
languages. For each language, spend time to look at the definition of the language and understand
what it describes. Then, go find in the text the theorem that says it is undecidable, and make sure
you understand what this claim means.
The following languages are undecidable. In your solutions on the exam, refer to these languages
by name:

HALT TM = { hM, wi : M is a TM and M (w) halts }


ATM = { hM, wi : M is a TM and M (w) accepts }
ETM = { hM i : M is a TM and L(M ) = ∅ }
ALLCFG = { hGi : G is a CFG and L(G) = Σ∗ }

These are not the only undecidable languages we have seen. There are many others as well.
CSE 105 Sp04, Crib Sheet 3

TM Language that it decides

Mdfa ADFA = { hD, wi : D is a DFA and D accepts w }


Mnfa ANFA = { hN, wi : N is a NFA and N accepts w }

Mdfa EDFA = { hDi : D is a DFA and L(D) = ∅ }
=
Mdfa EQ DFA = { hD1 , D2 i : D1 , D2 are DFAs and L(D1 ) = L(D2 ) }
Mcfg ACFG = { hG, wi : G is a CFG and w ∈ L(G) }

Mcfg ECFG = { hGi : G is a CFG and L(G) = ∅ }

Figure 2: Language-deciding TMs to know.

You might also like