/*! 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} Q73P Let ∑={0,1,#} . Let  C={x#x... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

Let ∑={0,1,#}. Let C={x#xR#x|x∈{0,1}*} . Show that C is a CFL.

Short Answer

Expert verified

C¯ is a CFL.

Step by step solution

01

Explain CFL

Context Free grammars generate the context-free languages. The context-free languages are recognized by the automata.

02

Show that C¯ is a CFL.

Consider the given language C={x#xR#x|x∈{0,1}*}, that takes the input ∑={0,1,#}.

To prove is that C is not a context-free language that implies that C is a CFL.

Consider the string k=x#xR#x∈C, contains |x|=|xR| and |k| is a multiple of three. In contradiction, consider that the language C is a context-free language. For a context-free language, the pumping length p. Consider the string k=02p0p1p02pwith |k|>p.The string abcde is a string that has,

  1. abmcdme∈A, for all m≥0.
  2. |bd|>0
  3. |bcd|≤p

Consider the following cases, that proves the contradictory.

Case 1: Since|bd| is not a multiple of three, k'is not a multiple of three wherek'=ab2cd2e

.

Case 2: |bd|=3q, that means it is the multiple of three. Then,

ab2cd2e=03p+3q1p02p=02p+q0p+2q1p−q02p

And it does not belongs to the language C.

Case 3 : |bd|=3q , that means it is the multiple of three, bcdhas only 1s. The resultant third string is ,

ab2cd2e=03p1p+3q02p=02p+q0p−q1p+2q1q02p

And it does not belongs to the language C.

Since, the contradiction occurs at each case, thus the language Cis not a context-free language.

Therefore, it has been proved that the languageC¯is a Context-free Language.

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

Let Σ2be the same as in Problem 1.33. Consider each row to be a binary number and let D={w∈Σ*2|the top row of w is a larger number than is the bottom row}. For example, 00101100∈D, but 000111006∈D. How that D is regular.

Let Bn={ak|k is a multiple of n}Show that for eachn⩾1n, the language Bis regular.

Let N be an NFA with k states that recognizes some language A.

a. Show that if Ais nonempty, Acontains some string of length at most k.

b. Show, by giving an example, that part (a) is not necessarily true if you replace both A’s byA .

c. Show that If Ais nonempty, Acontains some string of length at most 2k.

d. Show that the bound given in part (c) is nearly tight; that is, for each k, demonstrate an NFA recognizing a languagerole="math" localid="1660752484682" Ak' where role="math" localid="1660752479553" Ak'is nonempty and where Ak'’s shortest member strings are of length exponential in k. Come as close to the bound in (c) as you can.

Question: The following are the state diagrams of two DFAs , M1 and M2 . Answer the following questions about each of these machines.

a. What is the start state ?

b. What is the set of accept states ?

c. What sequence of states does the machine go through on input aabb ?

d. Does the machine accept the string aabb ?

e. Does the machine accept the string ε ?

Recall that string x is a prefix of string y if a string z exists where xz=y, and that x is a proper prefix of y if in addition x6=y. In each of the following parts, we define an operation on a language A. Show that the class of regular languages is closed under that operation.

a)NOPREFIXA={w∈A|noproperprefixofwisamemberofA}.b)NOEXTENDA={w∈A|wisnottheproperprefixofanystringinA}.

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.