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

For languages AandB, let the shuffle of AandBbe the language

{ω|ω=a1b1...akbk,where  a1...akA  and  b1...bkB,each  ai,bi}.

Show that the class of regular languages is closed under shuffle.

Short Answer

Expert verified

The class of regular languages is closed under shuffle.

Step by step solution

01

Introduction 

The given two languages AandB is shuffle on theAandB is as follows:

{ω|ω=a1b1...akbk,where  a1...akA  and  b1...bkB,each  ai,bi}..

Assume, DFAA=(QA,,δA,SA,FA) and DFAB=(QB,,δB,SB,FB)be the twoDFA s that recognizethe, Aand Brespectively. DFAPerfect-shuffle=(Q,,δ,S,F), and also recognizes the language is perfect shuffle on,A and B.

02

Explanation

TheDFA for perfect shuffle switches fromDFAA toDFAB after each character is read and it tracks the current states of DFAAand DFAB.

Each character should belong to DFAAor DFABi.e., ai,bi. For each character read, DFAPerfect-shufflemakes moves in the correspondingDFA (either DFAAor DFAB).

After the whole string is read, if bothDFAA andDFAB reaches to the final state, then the input string is accepted byDFAPerfect-shuffle.

q=q0

03

Simplification

The DFAPerfect-shuffleis defined as follows:

Q=QA×QB×{A,B}: set of all possible states of DFAAand DFABwhich should match with DFAPerfect-shuffle.

The input alphabet for DFAPerfect-shuffleis .

q=(qA,qB,A):qAandqBare the initial states forDFAA and DFABrespectively.DFAPerfect-shuffle starts withqAin DFAA,qBin DFABand the next character should be read from DFAA.

F=FA×FB×{A}: FAand FBare the final states forDFAA andDFAB respectively. DFAPerfect-shuffleAccepts if both DFAAand DFABreaches to the final states and the next character should be read from DFAA.

04

Transition function

The transition function δis,

  1.   δ((m,n,A),a)=(δA(m,a),n,B)
  2. δ((m,n,B),b)=(m,δB(n,b),n,A)

Consider, the current state of DFAAism and the current state ofDFAB is n. Change the current state of AtoδA(m,a)if the next character is to be read fromDFAA whenais the next character. After the character is read, read the next character from DFAB.

Change the current state ofB toδB(n,b) if the next character is to be read fromDFAB when bis the next character.

The languageL is said to be regular if there exist anFA that recognizes the language L. Here, the DFAPerfect-shuffleis defined for the language perfect shuffle.

Therefore, the class of regular languages is closed under shuffle.

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 2{[00],[01][10][11]}Here, contains all columns of localid="1663175934749" 0sand1sof height two. A string of symbols in gives two rows of 0sand1s. Consider each row to be a binary number and let C={wΣ*2|thebottomrowofwisthreetimesthetoprow}. For example, [00][01][11][00]cbut [01][01][10]EC. Show that C is regular. (You may assume the result claimed in Problem 1.31.)

a. Let Abe an infinite regular language. Prove thatA can be split into two infinite disjoint regular subsets.

b. LetBandD be two languages. Write BDifBDand Dcontains infinitely many strings that are not in B. Show that if BandD are two regular languages whereBD , then we can find a regular languageC where BCD.

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.

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

Question:Read the informal definition of the finite state transducer given in Exercise 1.24. Prove that no FST can output WR for every input if the input and output alphabets are {0,1}

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