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

Find the output string generated by the Moore machine in Exercise 21 with each of the input strings in Exercise 22.

Short Answer

Expert verified

(a): So, the output is 11111.

(b): Hence, the output is 1000000.

(c): Therefore, the output is 100011001100.

Step by step solution

01

General form

Moore machine (Definition):

A Moore machine\({\bf{M = }}\left( {{\bf{S,}}\,\,{\bf{I,}}\,\,{\bf{O,}}\,\,{\bf{f,}}\,\,{\bf{g,}}\,\,{{\bf{s}}_0}} \right)\)consists of a finite set of states, an input alphabet I, an output alphabet O, a transition function fthat assigns a next state to every pair of a state and an input, an output function g that assigns an output to every state, and a starting state\({{\bf{s}}_0}\). A Moore machine can be represented either by a table listing the transitions for each pair of state and input and the outputs for each state, or by a state diagram that displays the states, the transitions between states, and the output for each state. In the diagram, transitions are indicated with arrows labelled with the input, and the outputs are shown next to the states.

Concept of input string and output:

An input string takes the starting state through a sequence of states, as determined by the transition function. As we read the input string symbol by symbol (from left to right), each input symbol takes the machine from one state to another. Because each transition produces an output, an input string also produces an output string.

02

Step 2: Generate the output using state diagram

Referring to Exercise 22:An input string 0101

Referring to Exercise 21: The state diagram is shown below:

Using the diagram generate the output.

Let us use the input string to find the output.

The output obtained is 11111. The successive states and outputs are shown below table:

So, the output is 1111.

03

Generate the output using state diagram

Referring to Exercise 22: An input string 111111

Using the table generate the output.

Let us use the input string to find the output.

The output obtained is 1000000. The successive states and outputs are shown below table:

Hence, the output is 100000.

Referring to Exercise 22: An input string 11101110111

Using the table generate the output.

Let us use the input string to find the output.

The output obtained is 10001100110. The successive states and outputs are shown below table:

Therefore, the output is 10001100110.

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 V = {S, A, B, a, b} and T = {a, b}. Determine whether G = (V, T, S, P) is a type 0 grammar but not a type 1 grammar, a type 1 grammar but not a type 2 grammar, or a type 2 grammar but not a type 3 grammar if P, the set of productions, is

\(\begin{array}{*{20}{l}}{{\bf{a) S }} \to {\bf{ aAB, A }} \to {\bf{ Bb, B }} \to {\bf{ \lambda }}{\bf{.}}}\\{{\bf{b) S }} \to {\bf{ aA, A }} \to {\bf{ a, A }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{c) S }} \to {\bf{ABa, AB }} \to {\bf{ a}}{\bf{.}}}\\{{\bf{d) S }} \to {\bf{ ABA, A }} \to {\bf{ aB, B }} \to {\bf{ ab}}{\bf{.}}}\\{{\bf{e) S }} \to {\bf{ bA, A }} \to {\bf{ B, B }} \to {\bf{ a}}{\bf{.}}}\\{{\bf{f ) S }} \to {\bf{ aA, aA }} \to {\bf{ B, B }} \to {\bf{ aA, A }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{g) S }} \to {\bf{ bA, A }} \to {\bf{ b, S }} \to {\bf{ \lambda }}{\bf{.}}}\\{{\bf{h) S }} \to {\bf{ AB, B }} \to {\bf{ aAb, aAb }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{i) S }} \to {\bf{ aA, A }} \to {\bf{ bB, B }} \to {\bf{ b, B }} \to {\bf{ \lambda }}{\bf{.}}}\\{{\bf{j) S }} \to {\bf{ A, A }} \to {\bf{ B, B }} \to {\bf{ \lambda }}{\bf{.}}}\end{array}\)

Construct phrase-structure grammars to generate each of these sets.

a) \(\left\{ {\left. {{{\bf{0}}^{\bf{n}}}} \right|{\bf{n}} \ge {\bf{0}}} \right\}\)

b) \(\left\{ {\left. {{{\bf{1}}^{\bf{n}}}{\bf{0}}} \right|{\bf{n}} \ge {\bf{0}}} \right\}\)

c) \(\left\{ {\left. {{{\left( {{\bf{000}}} \right)}^{\bf{n}}}} \right|{\bf{n}} \ge {\bf{0}}} \right\}\)

Construct a derivation of \({{\bf{0}}^{\bf{2}}}{{\bf{1}}^{\bf{2}}}{{\bf{2}}^{\bf{2}}}\) in the grammar given in Example 7.

Use the set of productions to show that each of these sentences is a valid sentence.

a) The happy hare runs.

b) The sleepy tortoise runs quickly.

c) The tortoise passes the hare.

d) The sleepy hare passes the happy tortoise.

Determine whether each of these strings is recognized by the deterministic finite-state automaton in Figure 1.

a)010b) 1101 c) 1111110d) 010101010

See all solutions

Recommended explanations on Math 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