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

Using the constructions described in the proof of Kleene’s theorem, find non-deterministic finite-state automata that recognize each of these sets.

  1. \({\bf{0*1*}}\)
  2. \(\left( {0 \cup 11} \right){\bf{*}}\)
  3. \(0{\bf{1*}} \cup {\bf{00*}}1\)

Short Answer

Expert verified

1. Therefore, the nondeterministic finite-state automata that recognize the set \({\bf{0*1*}}\) are shown below.

2. Hence, the nondeterministic finite-state automata that recognize the set \(\left( {0 \cup 11} \right){\bf{*}}\)are shown below.

3. So, the nondeterministic finite-state automata that recognize the set \(0{\bf{1*}} \cup {\bf{00*}}1\)are shown below.

Step by step solution

01

General form

Finite-state automaton (Definition): A finite-state automaton \({\bf{M = }}\left( {{\bf{S,I,f,}}{{\bf{s}}_{\bf{0}}}{\bf{,F}}} \right)\) consists of a finite set S of states, a finite input alphabet I, a transition function f that assigns the next state to every pair of states and input (so that \({\bf{f:S \times I}} \to {\bf{S}}\)), an initial or start state \({{\bf{s}}_0}\), and a subset F of S consisting of final (or accepting states).

Kleene’s theorem: A set is regular if and only if it is recognized by a finite-state automaton.

Rules of regular expression represent a set:

\(\emptyset \)represents the empty set, that is, the set with no strings;

\({\bf{\lambda }}\)represents the set\(\left\{ {\bf{\lambda }} \right\}\), which is the set containing the empty string;

x represents the set \(\left\{ {\bf{x}} \right\}\) containing the string with one symbol x;

(AB) represents the concatenation of the sets represented by A and by B;

\(\left( {{\bf{A}} \cup {\bf{B}}} \right)\)represents the union of the sets represented by A and by B;

\({\bf{A*}}\)represents the Kleene closure of the sets represented by A.

02

Step 2: Construct the nondeterministic finite-state automata

Given,\({\bf{0*1*}}\)

In the second outline of Kleene's theorem's proof, the nondeterministic finite-state automata that recognize \({\bf{0*}}\) is shown, and the non-deterministic finite-state automata that recognize \(1{\bf{*}}\) is the same machine with the 0s changed to 1s.

The next step is to combine these two machines, which is accomplished by using the same input as the first machine and by drawing an arrow from the first machine's start state to the second machine's start state.

So, the diagram of the non-deterministic finite-state automaton is shown below.

03

Construct the nondeterministic finite-state automata

Given,\(\left( {0 \cup 11} \right){\bf{*}}\)

The third image in Kleene's theorem proof provides the nondeterministic finite-state automata that can recognize 0; the fourth image provides the nondeterministic finite-state automata that can recognize 11. Concatenating the two machines to the same start state allows us to take their union.

Following that, we must take Kleene's closure of this machine, which is accomplished by turning the initial state into a final state, adding loops and cycles to each machine in the union, and switching machines whenever the input changes to another term in the union.

So, the diagram of the non-deterministic finite-state automaton is shown below.

04

Construct the nondeterministic finite-state automata

Given,\(0{\bf{1*}} \cup {\bf{00*}}1\)

The nondeterministic finite-state automata that recognize 0 are given in the third image of the proof of Kleene’s theorem, whereas the nondeterministic finite-state automata that recognizes \(1{\bf{*}}\) is presented in the second image of the proof of Kleene's theorem. We need to concate these two machines to achieve\(01{\bf{*}}\).

The nondeterministic finite-state automata that can recognize 0 are shown in the third image of Kleene's theorem's proof, while the nondeterministic finite-state automata that can recognize \(0{\bf{*}}\) is shown in the second image.

The nondeterministic finite-state automata that can recognize 1 are similar to the machine that can recognize 0. To get this\(00{\bf{*}}1\), we must combine these three devices.

By connecting the two submachines to the same start state, we may finally take the union of these two acquired machines.

So, the diagram of the deterministic finite-state automaton is shown below.

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

Give production rules in extended Backus–Naur form for identifiers in the C programming language (see Exercise 33).

Give production rules in extended Backus–Naur form that generate a sandwich if a sandwich consists of a lower slice of bread; mustard or mayonnaise; optional lettuce; an optional slice of tomato; one or more slices of either turkey, chicken, or roast beef (in any combination); optionally some number of slices of cheese; and a top slice of bread.

Let \({\bf{G = }}\left( {{\bf{V, T, S, P}}} \right)\) be the context-free grammar with \({\bf{V = }}\left\{ {\left( {\bf{,}} \right){\bf{S,A,B}}} \right\}{\bf{, T = }}\left\{ {\left( {\bf{,}} \right)} \right\}\) starting symbol \({\bf{S}}\), and productions \({\bf{S}} \to {\bf{A,A}} \to {\bf{AB,A}} \to {\bf{B,B}} \to {\bf{A,}}\)and \({\bf{B}} \to {\bf{(),S}} \to {\bf{\lambda }}\)

Construct the derivation trees of these strings.

\({\bf{a)}}\)\({\bf{(())}}\)

\({\bf{b)}}\)\({\bf{()(())}}\)

\({\bf{c)}}\)\({\bf{((()()))}}\)

let \({{\bf{G}}_{\bf{1}}}\) and \({{\bf{G}}_{\bf{2}}}\) be context-free grammars, generating the language\({\bf{L}}\left( {{{\bf{G}}_{\bf{1}}}} \right)\) and \({\bf{L}}\left( {{{\bf{G}}_{\bf{2}}}} \right)\), respectively. Show that there is a context-free grammar generating each of these sets.

a) \({\bf{L}}\left( {{{\bf{G}}_{\bf{1}}}} \right){\bf{UL}}\left( {{{\bf{G}}_{\bf{2}}}} \right)\)

b) \({\bf{L}}\left( {{{\bf{G}}_{\bf{1}}}} \right){\bf{L}}\left( {{{\bf{G}}_{\bf{2}}}} \right)\)

c) \({\bf{L}}{\left( {{{\bf{G}}_{\bf{1}}}} \right)^{\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