Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(7 points) Let Lk={w{a,b}w contains a substring having k more b 's than a 's }. (a) Although at first glance this may seem to

image text in transcribed

(7 points) Let Lk={w{a,b}w contains a substring having k more b 's than a 's }. (a) Although at first glance this may seem to be a non-regular language, it is in fact a regular language. Give the state diagram of an NFA that recognizes L3 using the following design: - Loop continuously in the start state for any symbol read. - Any time a b symbol is read, also spawn a new branch that tests whether a substring beginning with this symbol reaches 3 more b 's than a 's at any point. - Any such spawned branch that hasn't yet reached this accepting state can be allowed to die out if it would otherwise return to an equal number of a 's and b 's (there's no need to retain the extra branch when there are equal a 's and b 's or an excess of a 's; a new branch will take over from the start state if another b is read). (b) Give a 5-tuple specifying NFA Nk such that L(Nk)=Lk. (Assume k3 )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Derive formula (8). a + 2 cosa+cos3 = 2 cos- COS a - 2

Answered: 1 week ago