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

Construct a deterministic finite-state automaton that recognizes the set of all bit strings that end with 10.

Short Answer

Expert verified

The result is:

State

0

1

\({{\bf{s}}_{\bf{0}}}\)

\({{\bf{s}}_{\bf{0}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{3}}}\)

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{3}}}\)

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{3}}}\)

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

Construction of deterministic finite-state automaton.

Let \({\bf{S = \{ 0,1\} *\{ 10\} }}\)

Let's start state be\({{\bf{s}}_{\bf{0}}}\). Since the empty string is not in the set S, \({{\bf{s}}_{\bf{0}}}\)is not a final state.

\({{\bf{s}}_{\bf{0}}}\)shows that the last two digits were 00.

\({{\bf{s}}_{\bf{1}}}\)has that the last two digits were 01.

\({{\bf{s}}_{\bf{2}}}\)gives that the last two digits were 10.\({{\bf{s}}_{\bf{2}}}\) has to be the final state as I interested in string ending with 10.

\({{\bf{s}}_{\bf{3}}}\)show that the last two digits were 11.

As I move from \({{\bf{s}}_{\bf{i}}}\)to\({{\bf{s}}_{\bf{j}}}\) due to input z if \({{\bf{s}}_{\bf{i}}}\) represented that the last two digits xy and \({{\bf{s}}_{\bf{j}}}\)represents that the last two digits are yz.

02

Sketch of deterministic finite-state automaton.

03

Another way of representing in tabular form.

State

0

1

\({{\bf{s}}_{\bf{0}}}\)

\({{\bf{s}}_{\bf{0}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{3}}}\)

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{0}}}\)

\({{\bf{s}}_{\bf{1}}}\)

\({{\bf{s}}_{\bf{3}}}\)

\({{\bf{s}}_{\bf{2}}}\)

\({{\bf{s}}_{\bf{3}}}\)

Therefore, this can be the required construction.

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

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.

Give production rules in Backusโ€“Naur form for the name of a person if this name consists of a first name, which is a string of letters, where only the first letter is uppercase; a middle initial; and a last name, which can be any string of letters.

a) Construct a phrase-structure grammar that generates all signed decimal numbers, consisting of a sign, either + or โˆ’; a nonnegative integer; and a decimal fraction that is either the empty string or a decimal point followed by a positive integer, where initial zeros in an integer are allowed.

b) Give the Backusโ€“Naur form of this grammar.

c) Construct a derivation tree for โˆ’31.4 in this grammar.

Construct a finite-state machine that models a newspaper vending machine that has a door that can be opened only after either three dimes (and any number of other coins) or a quarter and a nickel (and any number of other coins) have been inserted. Once the door can be opened, the customer opens it and takes a paper, closing the door. No change is ever returned no matter how much extra money has been inserted. The next customer starts with no credit.

a)what is the language generated by a phrase-structure grammar G?

b)What is the language generated by the grammar Gwith vocabulary{S,0,1}, set of terminals T= {0,1}, starting symbol S, and productions Sโ†’000S, Sโ†’1?

c)Give a phrase-structure grammar that generates the set \({\bf{\{ 0}}{{\bf{1}}^{\bf{n}}}{\bf{|n = 0,1,2}}....{\bf{\} }}\).

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