Mealy to Moore conversion: June 2020
AnswerThe incoming outputs are 0 for q0, 1 for q1 and 2 for q2, so no state splitting is needed. Define Moore…
Read more →AnswerThe incoming outputs are 0 for q0, 1 for q1 and 2 for q2, so no state splitting is needed. Define Moore…
Read more →AnswerA Mealy machine produces output on transitions, λ:Q×Σ→Γ. A Moore machine produces output on states, λ:Q→Γ. For a binary identity transducer, a…
Read more →AnswerAssume nonnegative integers a,b encoded in unary as 1ᵃ#1ᵇ. Replace the separator # with 1, then erase the last 1 to leave…
Read more →AnswerIf L is regular, there exists p≥1 such that every w∈L of length at least p can be split w=xyz with |xy|≤p,…
Read more →AnswerB is nonproductive: every production for B contains B. Delete B and all rules containing it. Remaining S→Ca, A→a, C→b. A is…
Read more →AnswerFrom q0 reach q2 for the first time via 1*01*0. From q2 return to q2 either via 01*0 or via 11*01*0 (the…
Read more →AnswerThe word aaa has two distinct leftmost derivations: S⇒SS⇒SSS⇒aSS⇒aaS⇒aaa (left grouping), and S⇒SS⇒aS⇒aSS⇒aaS⇒aaa (right grouping). Their trees group (aa)a and a(aa). Therefore…
Read more →AnswerUse S→aSc|aBc and B→bB|b. Each recursive S step adds a matching a,c pair; the base ensures at least one pair. B generates…
Read more →AnswerAssume decimal integers with optional sign and no leading zeros except zero. Use S→N|+N|-N; N→0|DT; D→1|2|3|4|5|6|7|8|9; T→ET|ε; E→0|D. This generates signed and…
Read more →AnswerUse states s,t,u and initial stack Z. δ(s,a,Z)=(t,Z), δ(t,b,Z)=(u,Z), δ(u,a,Z)=(t,Z), δ(u,ε,Z)=(u,ε). No other moves. The machine must read at least one ab…
Read more →Ask a study question in English or Hindi. I will find relevant passages from our notes.