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 for each of these input strings when given as input to the finite-state machine in Example 2.

a) 0111

b) 11011011

c) 01010101010

Short Answer

Expert verified

(a) Therefore, the output is 1100.

(b) Therefore, the output is 00110110.

(c) Therefore, the output is 11111111111

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

Over 22 million students worldwide already upgrade their learning with Vaia!

01

General form

Finite-State Machines with Outputs (Definition):

A finite-state machine\({\bf{M = }}\left( {{\bf{S,}}\,\,{\bf{I,}}\,\,{\bf{O,}}\,\,{\bf{f,}}\,\,{\bf{g,}}\,\,{{\bf{s}}_0}} \right)\)consists of a finite set S of states, a finite input alphabet I, a finite output alphabet O, a transition function f that assigns to each state and input pair a new state, an output function g that assigns to each state and input pair output and an initial state\({{\bf{s}}_0}\).

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

Generate the output using the state table

Referring to Example 2: The state table is shown below.

Given that, an input string is 0111.

Using the table generates the output.

Let us use the input string to find the output.

The output obtained is 1100. The successive states and outputs are shown below the table.

Hence, the output is 1100.

03

Generate the output using the state table

The given input string is 11011011.

Using the table generates the output.

Let us use the input string to find the output.

The output obtained is 00110110. The successive states and outputs are shown below the table.

Therefore, the output is 00110110.

Given that, an input string 01010101010.

Using the table generates the output.

Let us use the input string to find the output.

The output obtained is 11111111111. The successive states and outputs are shown below the table.

So, the output is 11111111111.

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

a) Construct a phrase-structure grammar for the set of all fractions of the form a/b, where a is a signed integer in decimal notation and b is a positive integer.

b) What is the Backusโ€“Naur form for this grammar?

c) Construct a derivation tree for +311/17 in this grammar.

For each of these strings, determine whether it is generated by the grammar given for postfix notation. If it is, find the steps used to generate the string.

\(\begin{array}{l}{\bf{a) abc* + }}\\{\bf{b) xy + + }}\\{\bf{c) xy - z*}}\\{\bf{d) wxyz - */ }}\\{\bf{e) ade - *}}\end{array}\)

Find a phrase-structure grammar for each of these languages.

a) the set of all bit strings containing an even number of 0s and no 1s

b) the set of all bit strings made up of a 1 followed by an odd number of 0s

c) the set of all bit strings containing an even number of 0s and an even number of 1s

d) the set of all strings containing 10 or more 0s and no 1s

e) the set of all strings containing more 0s than 1s

f) the set of all strings containing an equal number of 0s and 1s

g) the set of all strings containing an unequal number of 0s and 1s

Let G = (V, T, S, P) be the phrase-structure grammar with V = {0, 1, A, S}, T = {0, 1}, and set of productions P consisting of S โ†’ 1S, S โ†’ 00A, A โ†’ 0A, and A โ†’ 0.

a) Show that 111000 belongs to the language generated by G.

b) Show that 11001 does not belong to the language generated by G.

c) What is the language generated by G?

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

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

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

c) \(\left\{ {\left. {{{\bf{0}}^{\bf{n}}}{{\bf{1}}^{\bf{m}}}{{\bf{0}}^{\bf{n}}}} \right|{\bf{m}} \ge {\bf{0}}\,{\bf{and}}\,{\bf{n}} \ge {\bf{0}}} \right\}\)

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