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

Give a counter example to show that the following construction fails to prove that the class of context-free languages is closed under star. Let A be a CFL that is generated by the CFG G=(V,,R,S). Add the new ruleSSS and call the resulting grammar. This grammar is supposed to generate A*.

Short Answer

Expert verified

Answer.

The construction fails for L={a}.

Step by step solution

01

Define Context Free Language

The context free language is generated by context free grammar.These languages are accepted by Pushdown Automata. These are the superset of regular languages.

Consider context-free languages L1described as G1=(V1,S,R1,S1).

Consider context-free language L2described as G2=(V2,S,R2,S2).

02

Determine the counter example

Consider the languageL={a}.

The given grammar and the language is in context free grammar in the form of .G=(V,,R,S).

Note that L*={ε,a,aa,aaa,...}

A grammar of L is localid="1662050454885" G=({S},{a},{(Sa)},S).

The construction gives :G'=({S},{a},{(Sa),(SSS)},S).

However, L (G) does not contain ε so the construction doesn’t produce a grammar for L*.

Hence, the construction fails for L={a}.

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 counterexample to show that the following construction fails to prove Theorem 1.49, the closure of the class of regular languages under the star operationLet N1=Q1,Σ,δ1,q1,F1 recognize . Construct N=Q1,Σ,δ,q1,F as follows. Nis supposed to recognize A*1.

a. The states of Nare the states of N1.

b. The start state ofN is the same as the start state ofN1 .

c. . F=q1F1.The accept states are the old accept states plus its start state.

d. Defineδso that for any and any aΣε, δq,a=(δ1q,aq6F1ora6=εδ1q,aq1qF1anda=ε

Recall, in our discussion of the Church–Turing thesis, that we introduced the language is a polynomial in several variables having an integral root}. We stated, but didn’t prove, thatis undecidable. In this problem, you are to prove a different property of—namely, thatDis -hard. A problem is -hard if all problems in are polynomial time reducible to it, even though it may not be inNPitself. So you must show that all problems in NPare polynomial time reducible to D .

Consider the problem of determining whether a Turing machine Mon an input w ever attempts to move its head left at any point during its computation on w. Formulate this problem as a language and show that it is decidable.

Modify the proof of Theorem 3.16 to obtain Corollary 3.19, showing that a language is decidable if some nondeterministic Turing machine decides it. (You may assume the following theorem about trees. If every node in a tree has finitely many children and every branch of the tree has finitely many nodes, the tree itself has finitely many nodes.)

Show that the Post Correspondence Problem is undecidable over the binary alphabet.=0,1.

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