Top/Hwk2Solns

Top | Top | recent changes | Preferences

1. L = { <D> | DFA D accepts some input having three consecutive 1's }

This language is decidable. Here is a proof:

The following algorithm decides L, given <D>.

1. Construct (the encoding of) a DFA B such that L(B) = { Σ* 111 Σ* }, the set of strings having at least three consecutive 1's.

2. Construct the DFA C such that L(C) = L(D) ∩ L(B), using the standard construction that shows that the regular languages are closed under intersection.

3. Test whether L(C) = ∅, using the algorithm from the book (check for a path from the start state to any accept state).

4. If L(C) is empty, reject, else accept.

We leave as an exercise that this algorithm decides L.

2. L = { <M> | M is a Turing machine that accepts an even palindrome }

L is not decidable. To prove this, note that the following Turing machine reduces ATM to L:

1. On input <M,w>:

2. Construct Turing machine M' that does the following on input x:

1. Simulate M on w. If M accepts w, accept x.

Then <M,w> ∈ ATM if and only if <M'> ∈ L.

To see why, note that if M accepts w, then L(M') = Σ*, so <M'>∈ L,

and otherwise (M does not accept w), then L(M') = ∅, so <M'> is not in L,

Since ATM reduces to L, and ATM is undecidable, so is L.

3. L = {<M> | M is a Turing machine that accepts more than 10 strings }

L is undecidable. To prove it, note that the reduction from the previous problem also works here. That is, that reduction, given <M,w>, produces <M'> such that

if M accepts w, then L(M') = Σ*, so <M'>∈ L,

and otherwise (M does not accept w), then L(M') = ∅, so <M'>¬∈ L.

Since ATM reduces to L, and ATM is undecidable, so is L.


Top | Top | recent changes | Preferences
This page is read-only | View other revisions
Last edited October 22, 2004 9:04 am by Neal Young (diff)
Search: