Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Let AMBIGCFG=<G>|GisanambiguousCFG. Show that AMBIGCFG is undecidable. (Hint: Use a reduction from PCP. Given an instance

P=t1b1,t2b2,,tkbk

of the Post Correspondence Problem, construct a CFG Gwith the rules

ST|B

Tt1Ta1|.....|tkTak|t1a1|....|tkak

Bb1B|...|b1Bak|...|bkak

where a1,...,ak are new terminal symbols. Prove that this reduction works.)

Short Answer

Expert verified

It is proved that AMBIGCFG is undecidable.

Step by step solution

01

Introduction to PCP and Undecidable

Post Correspondence Problem (PCP)

Post Corresponding Problem is undecidable problem where we have more than one tile which contains multiple strings. The goal of this problem is to arrange the order of strings such that the numerator and denominator are identical.

In Post Correspondence Problem (PCP), we try to find the pattern in which upper and lower strings are identical.

Undecidable

A problem is undecidable if no Turing Machine exist which will halt in finite amount of time

02

Proving AMBIGCFG undecidable

We need to notice that:

  • 1. If it is possible that P has a match like ti1ti2....til=bi1bi2...bil, then we can observe that the string ti1ti2...tilail...ai2ai1 have two derivations where, one derivative is from T and other one is from B .
  • 2. If Context Free Grammar G is ambiguous, in such case some strings ‘s’ will have more then two derivations.
  • Now as s is produced by G , so we can express it as: waj1aj2.....ajm for some value of w which didn’t contain symbol from set ai's .

    By looking at the grammar G , we can see that the derivative of T and B can generate at most one string of form ‘s’.

    So, the multiple derivation of ‘s’ must be express for T and B as follows:

    ST˙s=tjmtjm-1tj1aj1aj2ajm

    SB˙s=bjmbjm-1bj1aj1aj2ajmS

  • so clearly from above two equations we observe that,
    tjmtjm-1tj1=bjmbjm-1bj1

    And we can get a match of P from above equation.
    So, on combining the observation (1) and (2) which we mentions at starting of our answer, P have a match if and only if G is ambiguous grammar.
    We are able to reduce from Post Correspondence Problem to AMBIGCFG .
    Thus, AMBIGCFG is undecidable.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Give a formal definition of an enumerator. Consider it to be a type of two-tape Turing machine that uses its second tape as the printer. Include a definition of the enumerated language

Rice’s theorem. Let P be any nontrivial property of the language of a Turing machine. Prove that the problem of determining whether a given Turing machine’s language has property P is undecidable. In more formal terms, let P be a language consisting of Turing machine descriptions where P fulfils two conditions. First, P is nontrivial—it contains some, but not all, TM descriptions. Second, P is a property of the TM’s language—whenever LM1=LM2, we haveM1P if and only iffM2P . Here, M1 and M2 are any TMs. Prove that P is an undecidable language.

Question:Consider the algorithm MINIMIZE, which takes a DFA as input and outputs DFA .

MINIMIZE = “On input , where M=(Q,Σ,δ,q0,A) is a DFA:

1.Remove all states of G that are unreachable from the start state.

2. Construct the following undirected graph G whose nodes are the states of .

3. Place an edge in G connecting every accept state with every non accept state. Add additional edges as follows.

4. Repeat until no new edges are added to G :

5. For every pair of distinct states q and r of and every aΣ :

6. Add the edge (q,r) to G if δq,a,δr,a is an edge of G .

7. For each state q,let[q] be the collection of statesq={rQ|noedge joins q and r in G }.

8.Form a new DFA M'=Q',Σ,δ',q'0,A'where

Q'={[q]|qQ}(ifq=r,onlyoneofthemisinQ'),δ'(q,a)=[δq,a]foreveryqQandaΣ,q00=[q0],andA0={[q]|qA}

9. Output ( M')”

a. Show that M and M' are equivalent.

b. Show that M0 is minimal—that is, no DFA with fewer states recognizes the same language. You may use the result of Problem 1.52 without proof.

c. Show that MINIMIZE operates in polynomial time.

Show that EQTM'mEQTM'

Recall the Post Correspondence Problem that we defined in Section 5.2 and its associated language PCP. Show that PCP is decidable relative to ATM.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free