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 43–49 find the language recognized by the given nondeterministic finite-state automaton.

Short Answer

Expert verified

The result is \({\bf{L(M) = \{ \lambda \} \{ 0\} \{ 1\} *}} \cup {\bf{\{ }}0{\bf{\} \{ 0\} *\{ 1\} \{ 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 down in 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{1}}}\),\({{\bf{s}}_{\bf{2}}}\)

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

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

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

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

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

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

02

Find the final result.

The start state \({{\bf{s}}_{\bf{o}}}\) is also the final state, which implies that the empty strings \({\bf{\lambda }}\) is present in the recognized language.

\({\bf{\lambda }} \in {\bf{L(M)}}\)

To Move from \({{\bf{s}}_{\bf{o}}}\) the final state\({{\bf{s}}_{\bf{2}}}\) (directly), I require that the input is 0. However, since there is a loop at \({{\bf{s}}_{\bf{2}}}\) for input 1. and thus, the string starting with a 0 followed by any sequence of 1’s will be in recognized language.

\({\bf{\{ 0\} ,\{ 1\} }} \in {\bf{L(M)}}\)

To move from \({{\bf{s}}_{\bf{o}}}\) to \({{\bf{s}}_{\bf{1}}}\), the input has to be a 0. Then move from \({{\bf{s}}_{\bf{1}}}\) to \({{\bf{s}}_{\bf{2}}}\), the input needs to be 1. However, since there is a loop at \({{\bf{s}}_{\bf{1}}}\) for input 0. The string needs to have at least one 0 before the 1 to go from \({{\bf{s}}_{\bf{o}}}\) to \({{\bf{s}}_{\bf{1}}}\) and \({{\bf{s}}_{\bf{1}}}\) to \({{\bf{s}}_{\bf{2}}}\). Since there is also a loop at \({{\bf{s}}_{\bf{2}}}\) for input 1 any string with sequence of at least one 0 followed by at least 1 will be in recognized language.

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

Therefore, the language generated by the machine is

\({\bf{L(M) = \{ \lambda \} \{ 0\} \{ 1\} *}} \cup {\bf{\{ }}0{\bf{\} \{ 0\} *\{ 1\} \{ 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

Construct a deterministic finite-state automaton that recognizes the set of all bit strings that contain the string 101.

use top-down parsing to determine whether each of the following strings belongs to the language generated by the grammar in Example 12.

\(\begin{array}{*{20}{l}}{{\bf{a) baba}}}\\{{\bf{b) abab}}}\\{{\bf{c) cbaba}}}\\{{\bf{d) bbbcba}}}\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\}\)

Let G be the grammar with V = {a, b, c, S}; T = {a, b, c}; starting symbol S; and productions \({\bf{S }} \to {\bf{ abS, S }} \to {\bf{ bcS, S }} \to {\bf{ bbS, S }} \to {\bf{ a, and S }} \to {\bf{ cb}}{\bf{.}}\)Construct derivation trees for

\(\begin{array}{*{20}{l}}{{\bf{a) bcbba}}{\bf{.}}}\\{{\bf{b) bbbcbba}}{\bf{.}}}\\{{\bf{c) bcabbbbbcb}}{\bf{.}}}\end{array}\)

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.

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