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|xyzAwherex,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.

Short Answer

Expert verified

The class of regular languages is closed under DROP_OUToperation.

Step by step solution

01

To Operation the DROP_ OUT

A is any language and DROP-OUT(A)={xz|xyzAwherex,z*,y}.

We have to prove that the class of the regular languages closed under the DROP_OUT operation.

If A is a regular language, then DROP-OUT(A)is also regular language.

We have to take that A is regular and we have to prove that the DROP-OUT(A)is regular.

Since A is a regular language, it must be recognized by a DFA.

Let M=Q,,δ,q0,Fbe the DFA that recognizes A.

02

To Construct the NFA

Now we will construct the NFA N=Q',{},δ',q0',F'that recognizes DROP-OUT(A).

There are two copies of Machine M.

Copy 1:Copy 1 corresponds to the state of having ‘not yet skipped a symbol’

Copy 2:Copy 2 corresponds to the state of having “already skipped a symbol”.

(i) Proof by picture: -

N=Q',{},δ',q0',F'

Q={q,b|qQ,b{0,1}}= set of states

q0'=start state

=q0,0

F'=set of final states

={(q,1|qF}.

δ'is gives as follows:

localid="1663243041084" δ'((a,b),a)={(δ(q,a),b)}qQ,b{0,1},a

This means that both the copy1 and copy2 of the machineMdo exactly as the original machine does on every symbol a of the alphabet

localid="1663243051646" δ'((q,0),)={(q^,1)a,δ(q,a)=q^}

Also at every stage, the machine has the option to skip a character. The only accepting sates are in copy 2. This means, the machine cannot accept a string without skipping a character.

03

To Proof the given length of the string

The formal proof is given by induction on the length of the string.

An appropriate inductive hypothesis is to assume that, for any string w of length k,

The machine M stays in the copy -1 if it has not yet skipped a symbol.

i.e. δ'*((q0,0),ω)=(q1,0)iffδ(q0,ω)=q1

The machine M jumps to the copy-2 if there is some symbol a that is skipped.

i.e. δ'*((q0,0),ω)=(q1,1)ifδ(q0,ω1aω2)=q1 .

So, in both (i) and (ii) we constructed and NFAN that recognizes the language role="math" localid="1663242954164" DROP-OUT(A).

Thus DROP-OUT(A)is regular.

Hence class of regular languages is closed under DROP-OUT(A)operation.

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

If A is any language, let A12− be the set of all first halves of strings in A so that ,

A12-={x|forsomey,|x|=|y|andxyA}.

Show that if A is regular, then so is A12

A homomorphism is a function f:Σ-Γ*from one alphabet to strings over another alphabet. We can extend f to operate on strings by defining:f(w)=f(w1)f(w2)···f(wn),wherew=w1w2···wnandeachwiΣ.

We further extend fto operate on languages by defining f(A)={f(w)|wA},for any language A.

a. Show, by giving a formal construction, that the class of regular languages is closed under homomorphism. In other words, given a DFA Mthat recognizes Band a homomorphism f, construct a finite automaton role="math" localid="1660800566802" M0that recognizes f(B).Consider the machine role="math" localid="1660800575641" M0that you constructed. Is it a DFA in every case?

b. Show, by giving an example, that the class of non-regular languages is not closed under homomorphism.

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

In the traditional method for cutting a deck of playing cards, the deck is arbitrarily split two parts, which are exchanged before reassembling the deck. In a more complex cut, called Scarne’s cut, the deck is broken into three parts and the middle part in placed first in the reassembly. We’ll take Scarne’s cut as the inspiration for an operation on languages. For a language A, let CUT(A)={yxz|xyzA}.

a. Exhibit a languageB for whichCUT(B)CUT(CUT(B)).

b. Show that the class of regular languages is closed under CUT.

The construction in Theorem 1.54 shows that every GNFA is equivalent to a GNFA with only two states. We can show that an opposite phenomenon occurs for DFAs. Prove that for every k>1, a language xAk{0,1}exists that is recognized by a DFA with k states but not by one with onlyk-1 states

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