Question

Consider the following decision problems. Indicate which of these problems are undecidable and which are decidable....

Consider the following decision problems. Indicate which of these problems are undecidable and which are decidable. For decidable problems, sketch an algorithm to decide/solve the problem; for undecidable problems, justify why they are undecidable.

  1. To decide whether a PDA accepts the empty string.

  2. To decide whether the languages accepted by two context-free grammars have strings in common.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Whether a PDA accepts the empty string is decidable. To observe this, do the following. First, convert the PDA into its equivalent context free grammar, which can be done by an algorithm. Now, convert this grammar into its equivalent Chomsky normal form. This can also be done by an algorithm. Note that in Chomsky normal form, no non-terminal can have a production rule using except for the starting non-terminal. Hence, the language contains if and only if the starting non-terminal has a production rule going to . As each of the above steps can be done by an algorithm, the problem is decidable.

The second language is undecidable. To prove this, use the fact that ambiguity of a context-free grammar is undecidable. A context-free grammar is ambiguous if there is a word which has two separate derivation trees. Reduce the given problem into ambiguity problem as follows: create a new start symbol S and add the rule for the start symbols of the two grammars. The new grammar is ambiguous if and only if the given grammars have a non-empty intersection. Thus the given problem is undecidable.

Comment in case of any doubts.

Add a comment
Know the answer?
Add Answer to:
Consider the following decision problems. Indicate which of these problems are undecidable and which are decidable....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT