Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Question:

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

b. Let C={1ky|y{0,1}* and ycontainsatmostk1s,fork1}. 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 sCandsp,

by the pumping lemma we can split s into three pieces

s=xyzsuchthatfori0xyizC.

xypandy0

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 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

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