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

In Exercises 16–22 find the language recognized by the given deterministic finite-state automaton

Short Answer

Expert verified

The result is \({\bf{L(M) = \{ }}1{\bf{\} \{ }}0,{\bf{1\} }}* \cup {\bf{\{ 10,11\} \{ 0,1\} * = \{ 0,10,11\} \{ 0,1\} *}}\)

Step by step solution

01

According to the figure.

Here the given figure contains three states \({{\bf{s}}_{\bf{o}}}{\bf{,}}{{\bf{s}}_{\bf{1}}}{\bf{,}}{{\bf{s}}_{\bf{2}}}\).

If there is an arrow from \({{\bf{s}}_{\bf{i}}}\) to \({{\bf{s}}_{\bf{j}}}\) with label x, then we write it down in a row \({{\bf{s}}_{\bf{j}}}\) and in the row \({{\bf{s}}_{\bf{i}}}\) and in column x of the following table.

State

0

1

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

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

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

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

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

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

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

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

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

\({{\bf{s}}_{\bf{o}}}\)is marked as the start state.

Since \({{\bf{s}}_{\bf{2}}}\) is encircled twice, a string will be recognized by the deterministic finite state automaton if we end at state \({{\bf{s}}_{\bf{2}}}\).

02

Find the final result.

If the string starts with a 0, then we move from state \({{\bf{s}}_{\bf{o}}}\) to \({{\bf{s}}_{\bf{1}}}\), while we always remain at the state and thus any string \({{\bf{s}}_{\bf{2}}}\) and thus any string starting with a 0 is included in the recognized language.

\({\bf{\{ }}0{\bf{\} \{ 0,1\} *}} \subseteq {\bf{L(M)}}\)

If the string starts with a 1, then we move from state \({{\bf{s}}_{\bf{o}}}\)to \({{\bf{s}}_{\bf{2}}}\). we then only move on from state \({{\bf{s}}_{\bf{1}}}\) to \({{\bf{s}}_{\bf{2}}}\) if we string obtains a second bit, while we always remain at the state \({{\bf{s}}_{\bf{2}}}\) , and thus any string starting containing a 1 followed by a bit is included in the recognized language.

\({\bf{\{ }}1{\bf{\} \{ }}0,{\bf{1\} }}\{ 0,1\} * = {\bf{\{ }}1{\bf{0}},11{\bf{\} \{ 0,1\} }}* \ subseteq {\bf{L(M)}}\)

The language generated by the machine is:

\({\bf{L(M) = \{ }}1{\bf{\} \{ }}0,{\bf{1\} }}* \cup {\bf{\{ 10,11\} \{ 0,1\} * = \{ 0,10,11\} \{ 0,1\} *}}\)

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

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.

Find a phrase-structure grammar that generates each of these languages.

\({\bf{a)}}\)the set of bit strings of the form \({{\bf{0}}^{{\bf{2n}}}}{{\bf{1}}^{{\bf{3n}}}}\), where \({\bf{n}}\) is a nonnegative integer

\({\bf{b)}}\)the set of bit strings with twice as many \({\bf{0's}}\) as \({\bf{1's}}\)

\({\bf{c)}}\)the set of bit strings of the form \({{\bf{w}}^{\bf{2}}}\), where \({\bf{w}}\) is a bit string

Construct a Moore machine that determines whether an input string contains an even or odd number of 1s. The machine should give 1 as output if an even number of 1s are in the string and 0 as output if an odd number of 1s are in the string.

A palindrome is a string that reads the same backward as it does forward, that is, a string w, where \({\bf{w = }}{{\bf{w}}^{\bf{R}}}\), where \({{\bf{w}}^{\bf{R}}}\) is the reversal of the string w. Find a context-free grammar that generates the set of all palindromes over the alphabet {0, 1}.

Question:Let G = (V, T, S, P) be the phrase-structure grammar with V = {0, 1, A, B, S}, T = {0, 1}, and set of productions P consisting of S → 0A, S → 1A, A → 0B, B → 1A, B → 1.

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

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

c) What is the language generated by G?

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