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
  • 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 undecid...

    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. To decide whether a PDA accepts the empty string. To decide whether the languages accepted by two context-free grammars have strings in common.

  • determine if the language is regular, context-free, Turing-decidable, or undecidable. For languages that are regular, give...

    determine if the language is regular, context-free, Turing-decidable, or undecidable. For languages that are regular, give a DFA that accepts the language, a regular expression that generates the language, and a maximal list of strings that are pairwise distinguishable with respect to the language. For languages that are context-free but not regular, prove that the language is not regular and either give a context- free grammar that generates the language or a pushdown automaton that accepts the language. You need...

  • determine if the language is regular, context-free, Turing-decidable, or undecidable. For languages that are regular, give...

    determine if the language is regular, context-free, Turing-decidable, or undecidable. For languages that are regular, give a DFA that accepts the language, a regular expression that generates the language, and a maximal list of strings that arc pairwise distinguishable with respect to the language. For languages that are context-free but not regular, prove that the language is not regular and either give a context- free grammar that generates the language or a pushdown automaton that accepts the language. You need...

  • For the following problems (except problem 8), state whether the problem is decidable or undecidable. If...

    For the following problems (except problem 8), state whether the problem is decidable or undecidable. If you claim the problem is decidable, then give a high-level, English description of an algorithm to solve the problem. If you claim the problem is undecidable, then describe a proof- by-reduction to verify your claim. If your proof involves some kind of transformation of M into M', as was done for the BlankTape problem, then provide a high -level, English description of your transformation....

  • State whether the problem is decidable or undecidable. If you claim the problem is decidable, then...

    State whether the problem is decidable or undecidable. If you claim the problem is decidable, then give a high-level, English description of an algorithm to solve the problem. If you claim the problem is undecidable, then describe a proof-by-reduction to verify your claim. If your proof involves some kind of transformation of M into M’ , then provide a high-level, English description of your transformation. Be sure to specify precisely for each “box” in your proof, what are the inputs...

  • 2. (10 points) Determine whether the following languages are decidable, recognizable, or undecidable. Briefly justify y...

    2. (10 points) Determine whether the following languages are decidable, recognizable, or undecidable. Briefly justify your answer for each statement. 1) L! = {< D,w >. D is a DFA and w E L(D)} 2) L2- N, w> N is a NF A and w L(N) 3) L,-{< P, w >: P is a PDA and w ㅌ L(P); 4) L,-{< M, w >: M is a TM and w e L(M)} 5) L,-{< M, w >: M is a...

  • Find if the following problems are algorithmically decidable and prove that your answers are correct. Given...

    Find if the following problems are algorithmically decidable and prove that your answers are correct. Given three context-free languages N, L and M, find if the language (L⋂N)⋃(N⋂M) is empty Please help.

  • UueSLIORS! 1. Find the error in logic in the following statement: We know that a b'...

    UueSLIORS! 1. Find the error in logic in the following statement: We know that a b' is a context-free, not regular language. The class of context-free languages are not closed under complement, so its complement is not context free. But we know that its complement is context-free. 2. We have proved that the regular languages are closed under string reversal. Prove here that the context-free languages are closed under string reversal. 3. Part 1: Find an NFA with 3 states...

  • Stacks and Java 1. Using Java design and implement a stack on an array. Implement the...

    Stacks and Java 1. Using Java design and implement a stack on an array. Implement the following operations: push, pop, top, size, isEmpty. Make sure that your program checks whether the stack is full in the push operation, and whether the stack is empty in the pop operation. None of the built-in classes/methods/functions of Java can be used and must be user implemented. Practical application 1: Arithmetic operations. (a) Design an algorithm that takes a string, which represents an arithmetic...

  • 1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the...

    1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the following regular expression. 6* (ab U bc)(aa)* ccb* Which of the following strings are in the language: bccc, babbcaacc, cbcaaaaccbb, and bbbbaaaaccccbbb (Give reasons for why the string are or are not in the language). 2. Let G be a context free grammar in Chomsky normal form. Let w be a string produced by that grammar with W = n 1. Prove that the...

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