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 deterministic finite-state automata that recognize each of these sets from\({\bf{I*}}\), where \({\bf{I}}\) is an alphabet.

  1. \(\emptyset \)
  2. \(\left\{ {\bf{\lambda }} \right\}\)
  3. \(\left\{ {\bf{a}} \right\}\), where \({\bf{a}} \in {\bf{I}}\)

Short Answer

Expert verified

1. Therefore, the deterministic finite-state automata that recognize \(\emptyset \) set from\({\bf{I*}}\), where \({\bf{I}}\)an alphabet is shown below.

2.Hence, the deterministic finite-state automata that recognize \(\left\{ {\bf{\lambda }} \right\}\) set from\({\bf{I*}}\), where \({\bf{I}}\) is an alphabet shown below.

3. So, the deterministic finite-state automata that recognize\(\left\{ {\bf{a}} \right\}\), where \({\bf{a}} \in {\bf{I}}\) set from\({\bf{I*}}\), where \({\bf{I}}\) is an alphabet is 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).

Designing Finite-State Automata:

We often construct a finite-state automaton that recognizes a given set of strings by carefully adding states and transitions and determining which of these states should be final states. When appropriate we include states that can keep track of some of the properties of the input string, providing the finite-state automaton with limited memory.

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 deterministic finite-state automata

Given that, the sets from\({\bf{I*}}\), where \({\bf{I}}\) is an alphabet.

Given set is\(\emptyset \)

Assume that, \({{\bf{s}}_0}\)is the starting point.

The start state \({{\bf{s}}_0}\) should be non-final because we don't want the machine to recognize any strings.

If the first input is an element, the string should still be rejected, and we can stay at.

The deterministic finite-state automaton that results will be unable to recognize any strings.

Note that \({\bf{I}}\) stands for all elements in the alphabet\({\bf{I}}\).

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

03

Construct the deterministic finite-state automata

Given that, the sets from\({\bf{I*}}\), where \({\bf{I}}\) is an alphabet.

Given set is\(\left\{ {\bf{\lambda }} \right\}\).

Assume that, \({{\bf{s}}_0}\)is the starting point.

\({{\bf{s}}_0}\)should be the last state because the machine should accept the empty string \({\bf{\lambda }}\).

The string should not be accepted if it contains at least one element. As a result, if the first input is an element\({\bf{a}} \in {\bf{I}}\), we should go to state\({{\bf{s}}_1}\), which is a non-final state. We don't leave the state \({{\bf{s}}_1}\) once we've arrived (as the stings should not be recognized since they are not the empty string).

The deterministic finite-state automaton that results will recognize the empty string\({\bf{\lambda }}\).

Note that \({\bf{I}}\) stands for all elements in the alphabet\({\bf{I}}\).

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

04

Construct the deterministic finite-state automata

Given that, the sets from\({\bf{I*}}\), where \({\bf{I}}\) is an alphabet.

Given set is\(\left\{ {\bf{a}} \right\}\), where\({\bf{a}} \in {\bf{I}}\).

Assume that, \({{\bf{s}}_0}\)is the starting point.

\({{\bf{s}}_0}\)should not be a final state because the machine should not accept the empty string\({\bf{\lambda }}\).

If the input is\({\bf{a}}\), we shift to state \({{\bf{s}}_1}\) as the final state (as the string should be accepted).

If the input is another element, we shift to state\({{\bf{s}}_2}\), which is a non-final state.

We will not exit the state once we arrive at \({{\bf{s}}_2}\) (thus \({{\bf{s}}_2}\) collecting all nonempty strings that should not be accepted).

If an input is received when we are at\({{\bf{s}}_1}\), the string should not be accepted, and we will be moved to the non-final state\({{\bf{s}}_2}\).

The deterministic finite-state automaton results will only recognize the string\({\bf{a}}\).

Note that \({\bf{I}}\) stands for all elements in the alphabet \({\bf{I}}\) and all elements in the alphabet \({\bf{I}}\) excluding \({\bf{a}}\) are represented by\({\bf{I}} - \left\{ {\bf{a}} \right\}\).

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

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

a){0}* b){0} {0}* c){1} {0}*

d){01}* e){0}*{1}* f){1} {0,1}*

Find a phrase-structure grammar for each of these languages.

a) the set consisting of the bit strings 10, 01, and 101.

b) the set of bit strings that start with 00 and end with one or more 1s.

c) the set of bit strings consisting of an even number of 1s followed by a final 0.

d) the set of bit strings that have neither two consecutive 0s nor two consecutive 1s.

Describe the set of strings defined by each of these sets of productions in EBNF.

\(\begin{array}{c}\left( {\bf{a}} \right){\bf{string :: = L + D?L + }}\\{\bf{L :: = a }}\left| {{\bf{ b }}} \right|{\bf{ c }}\\{\bf{D :: = 0 | 1}}\\\left( {\bf{b}} \right){\bf{string :: = signD + |D + }}\\{\bf{sign :: = + | - }}\\{\bf{D :: = 0 | 1|2|3|4|5|6|7|8|9}}\\\left( {\bf{c}} \right){\bf{string :: = L*}}\left( {{\bf{D + }}} \right){\bf{?L* }}\\{\bf{L :: = x |y }}\\{\bf{D :: = 0 | 1}}\end{array}\)

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.

Express each of these sets using a regular expression.

  1. The set consisting of the strings 0, 11, and 010
  2. The set of strings of three 0s followed by two or more 0s
  3. The set of strings of odd length
  4. The set of strings that contain exactly one 1
  5. The set of strings ending in 1 and not containing 000
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