Question

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.

  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 \epsilon except for the starting non-terminal. Hence, the language contains \epsilon if and only if the starting non-terminal has a production rule going to \epsilon. 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 S \to S_1 \mid S_2 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. For decidable problems, sketch an algorithm to decide/solve the problem; for undecid...
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
  • 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....

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

  • I need help with the following problems, any help you can provide is deeply appreciated! CSC...

    I need help with the following problems, any help you can provide is deeply appreciated! CSC 404 Exam 1 Question I continued - 9. The syntax rules for most languages ignore spaces. An exception is which tises indents and therefore spaces to form the indents) to group statements (a) FORTRAN (6) Pascal (e) Python (d) Lip (e) C++ 10. Identifiers, constants and operators are typical examples of (a) tokens. (b) leafons. (c) signifiers. (d) lexicons. (e) parsicles. 0) non-terminals. 11....

  • NAME: 1of 1 Solve the following problems and answer the following questions. Justify your solutio...

    please use EXCEL preferably NAME: 1of 1 Solve the following problems and answer the following questions. Justify your solutions and answers with verbal and/or quantitative explanations in order to receive full credit. Even if working as a group, each group member must still submit her or his own copy of the solutions as documentation. Using appropriate technology to expedite these calculations is expected; however, such work must be fully documented or explained. Software printouts or spreadsheet copies should include your...

  • please solve all 3 Differential Equation problems 3.8.7 Question Help Consider the following eigenvalue problem for which all of its eigenvalues are nonnegative y',thy-0; y(0)-0, y(1) + y'(1)...

    please solve all 3 Differential Equation problems 3.8.7 Question Help Consider the following eigenvalue problem for which all of its eigenvalues are nonnegative y',thy-0; y(0)-0, y(1) + y'(1)-0 (a) Show that λ =0 is not an eigenvalue (b) Show that the eigenfunctions are the functions {sin α11,o, where αη įs the nth positive root of the equation tan z -z (c) Draw a sketch indicating the roots as the points of intersection of the curves y tan z and y...

  • what discuss can you make about medicalization and chronic disease and illness? Adult Lealth Nursing Ethics...

    what discuss can you make about medicalization and chronic disease and illness? Adult Lealth Nursing Ethics mie B. Butts OBJECTIVES After reading this chapter, the reader should be able to do the following: 1. Explore the concept of medicalization as it relates to the societal shift away from physician predominance of the 1970s. 2. Differentiate among the following terms: compliance, noncompliance, adherence, nonadherence, and concordance. 3. Examine cultural views with regard to self-determination, decision making, and American healthcare professionals' values...

  • Hi there! I need to compare two essay into 1 essay, and make it interesting and...

    Hi there! I need to compare two essay into 1 essay, and make it interesting and choose couple topics which im going to talk about in my essay FIRST ESSAY “Teaching New Worlds/New Words” bell hooks Like desire, language disrupts, refuses to be contained within boundaries. It speaks itself against our will, in words and thoughts that intrude, even violate the most private spaces of mind and body. It was in my first year of college that I read Adrienne...

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