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 do not contain three consecutive 0s.

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{0}}}\)

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

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

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

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

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

\({{\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's start state be\({{\bf{s}}_{\bf{0}}}\).

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

\({{\bf{s}}_{\bf{1}}}\)has the last two digits was 00.

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

\({{\bf{s}}_{\bf{3}}}\)shows that the string contains 000.

\({{\bf{s}}_{\bf{0}}}{\bf{,}}{{\bf{s}}_{\bf{1}}}\)and \({{\bf{s}}_{\bf{2}}}\)all are in the final state. As I will make sure that all strings containing three consecutive zero ends at state\({{\bf{s}}_{\bf{3}}}\).

I move from \({{\bf{s}}_{\bf{0}}}\)to\({{\bf{s}}_{\bf{1}}}\), if I come across a 0, else I remain at\({{\bf{s}}_{\bf{0}}}\).

I move from \({{\bf{s}}_{\bf{1}}}\)to\({{\bf{s}}_{\bf{2}}}\) , if there is a second 0, else I move back to at\({{\bf{s}}_{\bf{0}}}\).

I move from \({{\bf{s}}_{\bf{2}}}\)to\({{\bf{s}}_{\bf{3}}}\), if there is a third 0, else I move back to\({{\bf{s}}_{\bf{0}}}\). Once I arrived at\({{\bf{s}}_{\bf{3}}}\), I will remain there.

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{0}}}\)

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

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

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

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

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

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

Therefore, this is 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

Describe how Turing machines are used to compute number-theoretic functions.

In Exercises 16โ€“22 find the language recognized by the given deterministic finite-state automaton

Give production rules in Backusโ€“Naur form that generate all identifiers in the C programming language. In โ€˜Cโ€™ an identifier starts with a letter or an underscore (_) that is followed by one or more lowercase letters, uppercase letters, underscores, and digits.

Several extensions to Backusโ€“Naur form are commonly used to define phrase-structure grammars. In one such extension, a question mark (?) indicates that the symbol, or group of symbols inside parentheses, to its left can appear zero or once (that is, it is optional), an asterisk (*) indicates that the symbol to its left can appear zero or more times, and a plus (+) indicates that the symbol to its left can appear one or more times. These extensions are part of extended Backusโ€“Naur form (EBNF), and the symbols?, *, and + are called metacharacters. In EBNF the brackets used to denote nonterminal are usually not shown.

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

a)111 b) 0011 c) 1010111 d) 011011011

a) Show that the grammar \({{\bf{G}}_{\bf{1}}}\) given in Example 6 generates the set\({\bf{\{ }}{{\bf{0}}^{\bf{m}}}{{\bf{1}}^{\bf{n}}}{\bf{|}}\,{\bf{m,}}\,{\bf{n = 0,}}\,{\bf{1,}}\,{\bf{2,}}\,...{\bf{\} }}\).

b) Show that the grammar \({{\bf{G}}_{\bf{2}}}\) in Example 6 generates the same set.

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