Question: Each of the following languages is the complement of a simpler language. In each part, construct a DFA for the simpler language, and then use it to give the state diagram of a DFA for the language given. In all parts, Σ=a,b.

a.w|wdoesnotcontainthesubstringabAb.{w|wdoesnotcontainthesubstringbaba}c.{w|wcontainsneitherthesubstringsabnorba}d.{w|wisanystringnotina*b*}e.{w|wisanystringnotin(ab+)*}f.{w|wisanystringnotina*b*}g.{w|wisanystringthatdoesntcontainexactlytwoas}h.{w|wisanystringexceptaandb}

Short Answer

Expert verified

(a)The complementary of a simplified language L¯={w|wLisindeedthelanguageL¯ is indeed the language L¯ does not include substring ab

(b) L = w it does not contains / allow sub-string as ab .

(c) L = w contains / accepting sub-string

(d)Go together of L=w does not contains sub-string.

(e)L=w contains neither .

(f)L=wina*b*.(g)L=wnotina*b*.(h)L=winab+*.(i)L=wnotinab+*.(j)L=wina*+b*.(k)L=wnotina*+b*.(l)L=winab+*.(m)L=whasexactly2a's(n)L=wdoesnothaveexactly2a's

Step by step solution

01

Simple language

In the above question we can see there is total different part of question. Let’s see step by step in short here in step-1. A. Part show that it doesn’t contain any substring. B. Part show that it’s not contain substring like baba which is different than part A.

Part C is not containing any substrings which is either ab or ba . Same way other part is display multiplication and addition related string. And checking weather this string contains or not.

02

prefix, infix and post fix operation of alphabet

a. L = w contains / accepts sub-string ab . The complementary of a simplified language L¯={w|wLisindeedthelanguageL¯ does not include substring ab . Then it's only a matter of saying "contain the string ab ." The language L is recognised by DFA as follows:


b. go together L = w it does not contains / allow sub-string as

c. L = w contains / accepting sub-string from given drawing like: baba

d. go together of L = w does not contains sub-string

e. L = w contains neither ba nor ab


f.L=wina*b*

gL=wnotina*b*

h.L=winab+*

i.L=wnotinab+*

jL=wina*+b*

mrole="math" localid="1663238225966" L=whasexactly2a's

nL=wdoesn'thave2a's

L=wisanystringexcept'a'and'b'

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 informal English descriptions of PDAs for the languages in Exercise 2.6

Give context-free grammars generating the following languages.

a. The set of strings over the alphabet a,bwith more a's than b's

b. The complement of the language anbnn0.

c. w#xwRis a substring of x for w,x 0,1*

d. localid="1662105288591" x1#x2#...#xkk1,each xilocalid="1662105304877" a,b*,and for some i and j ,localid="1662105320570" xi=xjR

A two-dimensional finite automaton (2DIM-DFA) is defined as follows. The input is an m×nrectangle, for any m,n2. The squares along the boundary of the rectangle contain the symbol # and the internal squares contain symbols over the input alphabet . The transition function δ:Q×#Q×L,R,U,Dindicates the next state and the new head position (Left, Right, Up, Down). The machine accepts when it enters one of the designated accept states. It rejects if it tries to move off the input rectangle or if it never halts. Two such machines are equivalent if they accept the same rectangles. Consider the problem of determining whether two of these machines are equivalent. Formulate this problem as a language and show that it is undecidable.

Show that EQTM'mEQTM'

Let

A/B={w|wxaAforsomexB}Show that ifAis context free andBis regular, thenA/Bis context free

If we disallow ε- in CFGs, we can simplify the DK-test. In the simplified test, we only need to check that each of DK’s accept states has a single rule. Prove that a CFG without ε- passes the simplified DK-testiff it is a DCFG.

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