/*! 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} Q49P Question: a. Let B={1ky|y∈{0,... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

Question:

a. Let B={1ky|y∈{0,1}*and ycontainsatleastk1s,fork⩾1}. Show that B is a regular language.

b. Let C={1ky|y∈{0,1}* and ycontainsatmostk1s,fork⩾1}. Show that C isn’t a regular language.

Short Answer

Expert verified

Answer:

a). B is a regular language is proved.

b).C is not a regular language is proved.

Step by step solution

01

Regular language.

A language is regular if it can be expressed in terms of regular expression. A regular expression can also be described as a sequence of pattern that defines a string. Regular expressions are used to match character combinations in strings.

02

The given language is regular.a)

The pumping lemma for regular languages B={1ky|y^I0,1*} is only a tool for showing that a language is not regular; it cannot be used to show that a language is regular. The two most straightforward ways to demonstrate that a language is regular are one to write a regular grammar that generates it, and two to design a finite state automaton that recognizes it.

Fig: Deterministic finite automata for language

It’s not at all hard to design a regular grammar that generates this language, or a finite state machine that recognizes it.

03

The given language is not regular.

b).

Suppose C is a regular language. Let p be the pumping length given by the pumping lemma.

Let s=1p01p

Because s∈Cands⩾p,

by the pumping lemma we can split s into three pieces

s=xyzsuchthatfori⩾0xyiz∈C.

xy⩽pandy≥0

By the pumping lemma, y must consist of ones. The string xz results in fewer ones before the zero than after. Thus d will always have more than k1s,sos/∈C. This violates the pumping lemma, therefore is not regular.

Hence, Cis nota regular language is proved.

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Σ={0,1,+,=} and

ADD ={x=y+z|x,y,zarebinaryintegers,andxisthesumofyandz}.

Show that ADD is not regular.

The pumping lemma says that every regular language has a pumping length P , such that every string in the language can be pumped if it has length p or more. If P is a pumping length for language A, so is any length p'⩾pThe minimum pumping length for A is the smallest p that is a pumping length for A . For example, if A=01*, the minimum pumping length is 2.The reason is that the string s=0is in A and has length 1 yet s cannot be pumped; but any string A in of length 2 or more contains a 1 and hence can be pumped by dividing it so that x=0,y=1,andzis the rest. For each of the following languages, give the minimum pumping length and justify your answer.

a).0001*b).0*1*c).001∪0*1*d).0*1+0+1*∪10*1

role="math" localid="1660797009042" e).(01)*f).∈g).1*01*01*h).10(11*0)*

i).1011j).∑*

Let A be any language. Define DROP-OUT(A)to be the language containing all strings that can be obtained by removing one symbol from a string in A. Thus,DROP-OUT(A)={xz|xyz∈A  where  x,z∈∑*,y∈∑} . Show that the class of regular languages is closed under the DROP-OUT operation. Give both a proof by picture and a more formal proof by construction as in Theorem 1.47.

We define the avoids operation for languages A and B to be

AavoidsB={w|w∈Aandwdoesn’tcontainanystringinBasasubstring}.

Prove that the class of regular languages is closed under the avoids operation.

Let Cn={x|xis a binary number that is a multiple of n}. Show that for each n⩾1, the language Cnis regular

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.