/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q34P Consider the language B=L(G), wh... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

Consider the language B=L(G), where Gis the grammar given in

Exercise 2.13. The pumping lemma for context-free languages, Theorem 2.34,

states the existence of a pumping length p for B . What is the minimum value

of p that works in the pumping lemma? Justify your answer.

Short Answer

Expert verified

The minimum values of p that works in the pumping lemma is 3.

Step by step solution

01

Explain Pumping Lemma

Pumping lemma can be used for both regular languages and the Context-free

languages. For Context-free languages, it can pump two substrings any number

of times and be in the same language.

02

What is the minimum value of p that works in the pumping lemma?Justify your answer.

Consider the language B=L(G), where G is the grammar as follows,

G = (V,∑,R,S) defined as,V=S,T,U;∑=0,# and R is,
S→TT|U
T→0T|T0|#
U→0U00|#

Theorem 2.34, states that the pumping lemma p for the CFL L , is the minimum

length of any string s in the context-free language L such that it may be split into

five pieces s=abi cdje, that fulfil the following conditions,

The string s is the part of L ,for all i≥0

The pumped string b and d must be |bd|>0.

|bcd|≤p

Consider the string s=##0 , with the substring a=b=θ=ε,c=##,d=0

The pumping length p is ,

|bcd|=|##0|

The theorem conditions are satisfies as follows,

|bd|=|ε0|=3 1≥0

=|0|

. =1, where,

|bcd|=|ε##0|

=|##0|

=3

For i≥0 , abi cdieεL

Consider, i=0, the string s=uv0xy0z will lie in the language L

. Thus, the theorem

conditions have been satisfied.

Therefore, The minimum values of p that works in the pumping lemma is 3. And the

string satisfies the conditions of the theorem.

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 91Ó°ÊÓ!

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 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 ruleS→SS and call the resulting grammar. This grammar is supposed to generate A*.

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 G=(V,∑,R,S)that is generated by the CFG . Add the new rule S→SSand call the resulting grammar. This grammar is supposed to generate A* .

A queue automaton is like a push-down automaton except that the stack is replaced by a queue. A queue is a tape allowing symbols to be written only on the left-hand end and read only at the right-hand end. Each write operation (we’ll call it a push) adds a symbol to the left-hand end of the queue and each read operation (we’ll call it a pull) reads and removes a symbol at the right-hand end. As with a PDA, the input is placed on a separate read-only input tape, and the head on the input tape can move only from left to right. The input tape contains a cell with a blank symbol following the input, so that the end of the input can be detected. A queue automaton accepts its input by entering a special accept state at any time. Show that a language can be recognized by a deterministic queue automaton iff the language is Turing-recognizable.

LetΣ={a,b} . For each k⩾1, let Ckbe the language consisting of all strings that contain an a exactly K places from the right-hand end.

ThusCk=Σ*²¹Î£k-1 . Describe an NFA with k+1states that recognizes Ckin terms of both a state diagram and a formal description.

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=q1∪F1.The accept states are the old accept states plus its start state.

d. Defineδso that for any and any a∈Σε, δq,a=(δ1q,aq6∈F1ora6=εδ1q,a∪q1q∈F1anda=ε

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.