For any string w=w1,w2,···,wn, the reverse of w, written wR , is the string w in reverse order,wn···w2w1. For any language A,letAR=wR|wA.Show that if A is regular, so is AR.

Short Answer

Expert verified

It means thatwA ifwRAR

Step by step solution

01

To Convert the state for M

It recognizes A,

We have built a NFA for as follows:

Convert the start state for M as the only accept state qaccept'for M'.

Add a new start state qo'for M', and from qo', add -transitions to M'each state of corresponding to accept states of M.

02

To Accept the State M

Here qo'=qaccept'

For any w*there is a path following w from the start state to an accept sate in M if there is a path following wRfrom qo'to qaccept'in M'

That means that wAif wRAR.

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

Let M=(Q,Σ,δ,q0,F)be a DFA and let be a state of Mcalled its “home”. A synchronizing sequence for M and h is a string s∈Σ∗whereδ(q,s)=hforeveryqQ. (Here we have extended to strings, so thatδ(q,s) equals the state where M ends up when M starts at state q and reads input s .) Say that M is synchronizable if it has a synchronizing sequence for some state h . Prove that if M is a k-state synchronizable DFA, then it has a synchronizing sequence of length at mostk3 . Can you improve upon this bound?

  1. Show that ifis a DFA that recognizes languageB, swapping the accept and non accept states inyields a new DFA recognizing the complement ofB. Conclude that the class of regular languages is closed under complement.
  2. Show by giving an example that ifM is an NFA that recognizes language C swapping the accept and non accept states in Mdoesn’t necessarily yield a new NFA that recognizes the complement of C. Is the class of languages recognized by NFAs closed under complement? Explain your answer.

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.

Question: The following are the state diagrams of two DFAs , M1 and M2 . Answer the following questions about each of these machines.

a. What is the start state ?

b. What is the set of accept states ?

c. What sequence of states does the machine go through on input aabb ?

d. Does the machine accept the string aabb ?

e. Does the machine accept the string ε ?

Prove that for each n>0, a languageBn exists where

  1. Bnis recognizable by an NFA that hasn states, and
  2. If Bn=A1Ak, for regular languages Ai, then at least one of theAi requires a DFA with exponentially many 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