/*! 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} Q18P a). Let C be a context-free lang... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

a). Let C be a context-free language and R be a regular language. Prove that the languageC∩Ris context free.

b). Let A= { w|w∈{a,b,c}*andwcontains equal numbers of a’s,b’s,andc’s}. Use part(a) to show that A is not a CFL

Short Answer

Expert verified
  1. The languageC∩R is context free.
  2. A is not a CFL.

Step by step solution

01

Consider the information

Consider C be the context-free language. Consider be the regular language. The objective of the question is to prove that the intersection of two languages and is context-free.The intersection of two languages is the set of the strings that both languages has in common.

02

Prove that C ∩ R is context free

Let N=(QN,∑,δN,q0,FM)be a DFA recognizing R . Let M=(QN,Γ,∑,δM,q0,FM)be a PDA that recognizes C .

Combine the machines to construct a PDA machine. The PDA machine recognizesC ∩ R . Each state of this PDA consists of two states (p,q).

Here, P is a state of PDA and q is a state of N .

The formal definition is:

M'=(QM,QN,∑,Γ,δM,(poq0),FM×FN)

The transition function δM' is defined by

δM'((p,q),a,x)={((p',q'),y)|(p',y)∈δM(p,a,x)andδN(q,a,)=q'}

Thus, this shows that C ∩ R is context-free.

03

Prove that language is not CFL language

Assume A is a context free grammar. Let B be the regular language a*b*c*. Then, by Part (a), A∩Bis context-free. But A∩B= {anbncn|n≥0}this language is not context-free.

Thus, A is not 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

Show that every infinite Turing-recognizable language has an infinite decidable subset.

Question:Let T={i,j,k|i,j,k∈N}.Show that is countable.

Find the error in the following proof that 2 = 1. Consider the equation a = b. Multiply both sides by a to obtain a2 = ab. Subtract b2from both sides to get a2 - b2 = ab - b2. Now factor each side, (a+b) (a-b) = b (a-b),and divide each side by (a-b)to get a + b = bFinally, letequal 1, which shows that 2 = 1

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 haveM1∈P if and only iffM2∈P . Here, M1 and M2 are any TMs. Prove that P is an undecidable language.

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.

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.