/*! 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} Q60P Let Σ = {a, b} . For each k... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

LetΣ={a,b} . For each k⩾1, let Ckbe the language consisting of all strings that contain an a exactly K places from the right-hand end.

ThusCk=Σ*²¹Î£k-1 . Describe an NFA with k+1states that recognizes Ckin terms of both a state diagram and a formal description.

Short Answer

Expert verified

A non deterministic finite automaton withk+1 states that recognizesCk in terms of both a state diagram and a formal description is given below.

Step by step solution

01

Non deterministic finite automata.

Context free language is a grammar where its language or string that formed by context free grammar is supports pushdown deterministic automata.InNon deterministic finite automata, for a particular input symbol, the machine can move to any combination of the states in the machine. In other words, the exact state to which the machine moves cannot be determined.

02

Solution.

C1=a+b*aC2=a+b*aa+bC3=a+b*aa+ba+bC4=a+b*aa+b........a+btherearek-1a+btermsappendedaftera

Formaldescription=M(Q,∑,δ,q0,F)Q=q0,q1,..........,qk∑=a,bq0=initialstate

localid="1660806669374" F=qkTransition:δ(q0,b)=q0,:δ(q0,a)=q0δ(q0,a)=1:δ(i-1,b)=qi,δ(i-1,a)=qfor2⩽i⩽k

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

Give a counterexample to show that the following construction fails to prove Theorem 1.49, the closure of the class of regular languages under the star operationLet N1=Q1,Σ,δ1,q1,F1 recognize . Construct N=Q1,Σ,δ,q1,F as follows. Nis supposed to recognize A*1.

a. The states of Nare the states of N1.

b. The start state ofN is the same as the start state ofN1 .

c. . F=q1∪F1.The accept states are the old accept states plus its start state.

d. Defineδso that for any and any a∈Σε, δq,a=(δ1q,aq6∈F1ora6=εδ1q,a∪q1q∈F1anda=ε

Give state diagrams of DFAs recognizing the following languages. In all parts, the alphabet is {0,1}

a. {w|wbeginswitha1andendswitha0}

b. {w|wcontainsatleastthree1s}

c. {w|wcontainsthesubstring0101i.ew=x0101yforsomexandy}

d. {w|whaslengthatleast3anditsthirdsymbolis0}

e. {w|wstartswith0andhasoddlength,orstartswith1andhasevenlength}

f. {w|wdoesn'tcontainthesubstring110}

g.{w|thelengthofwisatmost5}

h.{w|wisanystringexcept11and111}

i. {w|everyoddpositionofwis1}

j.{w|wcontainsatleasttwo0sandatmostone1}

k.{ε,0}

l.{w|wcontainsevennumberof0sorcontainsexactlytwo1s}

m. The empty set

n. All strings except the empty string

a). Let C be a context-free language and R be a regular language. Prove that the languageC∩Ris context free.

b). Let A= { w|w∈{a,b,c}*andwcontains equal numbers of a’s,b’s,andc’s}. Use part(a) to show that A is not a CFL

Let CNFk= is a satisfiable cnf-formula where each variable appears in at most k places}.

a. Show thatCNF2?P .

b. Show thatCNF3 isNP-complete.

Question: Let B be the set of all infinite sequences over {0 , 1}. Show that B is uncountable using a proof by diagonalization.

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.