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

Answer these questions about the finite-state automaton shown here.

a)Find the k-equivalence classes of M for\({\bf{k = 0,1,2, and 3}}\). Also, find the∗-equivalence classes of M.

b)Construct the quotient automaton M of\(\overline {\bf{M}} \).

Short Answer

Expert verified
  1. The states for 1-equivalence class.

    Final states=\({{\bf{s}}_{\bf{3}}}{\bf{,}}{{\bf{s}}_{\bf{5}}}{\bf{,}}{{\bf{s}}_{\bf{6}}}\)

    Non-final state=\({{\bf{s}}_{\bf{o}}}{\bf{,}}{{\bf{s}}_{\bf{1}}}{\bf{,}}{{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\).


  2. Construction:

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.

State01
\({{\bf{s}}_{\bf{o}}}\)
\({{\bf{s}}_{\bf{1}}}\)
\({{\bf{s}}_{\bf{2}}}\)
\({{\bf{s}}_{\bf{1}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{2}}}\)
\({{\bf{s}}_{\bf{5}}}\)
\({{\bf{s}}_{\bf{6}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{5}}}\)
\({{\bf{s}}_{\bf{6}}}\)
\({{\bf{s}}_{\bf{5}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{4}}}\)
\({{\bf{s}}_{\bf{6}}}\)
\({{\bf{s}}_{\bf{3}}}\)
\({{\bf{s}}_{\bf{6}}}\)

0-equivalence class:

The 0-equivalence class are the set of all final state and the set of all non-final states. The final states are denoted by two circles, while the non-final states are denoted by a single circle.

Final states=\({{\bf{s}}_{\bf{3}}}{\bf{,}}{{\bf{s}}_{\bf{5}}}{\bf{,}}{{\bf{s}}_{\bf{6}}}\) and non-final state=\({{\bf{s}}_{\bf{o}}}{\bf{,}}{{\bf{s}}_{\bf{1}}}{\bf{,}}{{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\).

02

1-equivalence class

S and t are in the same 1-equivalence class, if s and t are both non-final or are both final states and if I arrive at both final states and both non-finite states, when the input is a and when starting from states’s and t.

\({{\bf{s}}_{\bf{o}}}\)are the only non-final states that move to a non-final state when the input is 0, thus \({{\bf{s}}_{\bf{o}}}\)is in its 1-equivalence class.

\({{\bf{s}}_{\bf{1}}}\)is the only remaining non-final state that moves to a non-final state when the input is 1, thus \({{\bf{s}}_{\bf{1}}}\)is in its 1-equivalence class.

\({{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\)is the only remaining non-final state that moves to a non-final state when the input is 0 and 1, thus\({{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\)is in the same 1-equivalence class.

\({{\bf{s}}_{\bf{6}}}\)is the only remaining final state that remains at a final state when the input is 1, thus\({{\bf{s}}_{\bf{6}}}\)is in its 1-equivalence class.

\({{\bf{s}}_{\bf{3}}}{\bf{,}}{{\bf{s}}_{\bf{5}}}\)are the remaining final states that move to a final state when the input is 0 and that move to a non-final state when the input is 1, thus\({{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\)being in the same 1-equivalence class.

2-equivalence class:

The 1-equivalence classes that contain only a single state are also 2-equivalence classes.

\({{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\)are in the same 1-equivalence class. The input01 ends at a non-final state when starting from\({{\bf{s}}_{\bf{2}}}\), while the inputs 00, 10, 11 ends at a final state when starting from\({{\bf{s}}_{\bf{2}}}\). Input 01 ends at a non-final state when starting from\({{\bf{s}}_{\bf{4}}}\), while input 00, 10, 11 ends at a final state when starting from\({{\bf{s}}_{\bf{4}}}\). Thus \({{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{4}}}\)are also in the same 2-equivalence class.

\({{\bf{s}}_{\bf{3}}}{\bf{,}}{{\bf{s}}_{\bf{5}}}\)are in the same 1-equivalence class. Input 01 ends at a non-final state when starting from\({{\bf{s}}_{\bf{3}}}\), while input 00, 10, 11 ends at a final state when starting from\({{\bf{s}}_{\bf{3}}}\). Input 01 ends at a non-final state when starting from\({{\bf{s}}_{\bf{5}}}\), while input 00, 10, 11 ends at a final state when starting from\({{\bf{s}}_{\bf{5}}}\). Thus\({{\bf{s}}_{\bf{3}}}{\bf{,}}{{\bf{s}}_{\bf{5}}}\) are also in the same 2-equivalence class.

3-equivalence class:

The 1-equivalence classes are the same as the 2-equivalence classes and thus the equivalence classes won’t change anymore. This implies that the 3-equivalence classes are also the same as the 1-equivalence classes are same as 2-equivalence classes.

03

Construction of the quotient automaton M of\(\overline {\bf{M}} \).

The 1-equivalence classes are the same as the 2-equivalence classes in part (a) thus the *-equivalence classes are the same as the 1-equivalence classes.

Thus the 5 states of the quotient automaton\(\overline {\bf{M}} \)are then these equivalence classes, which I place within a circle.

Each and I also draw a second circle when the states are the final state in M.

I draw an arrow from state s and t with label a, when there is an arrow from a state, n the equivalence class of s to the state in the equivalence class to t with label a.

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

a) Construct a derivation of \({{\bf{0}}^{\bf{2}}}{{\bf{1}}^{\bf{4}}}\) using the grammar \({{\bf{G}}_{\bf{1}}}\) in Example 6.

b) Construct a derivation of \({{\bf{0}}^{\bf{2}}}{{\bf{1}}^{\bf{4}}}\) using the grammar \({{\bf{G}}_{\bf{2}}}\) in Example 6.

A context-free grammar is ambiguous if there is a word in \({\bf{L(G)}}\) with two derivations that produce different derivation trees, considered as ordered, rooted trees.

Show that the grammar \({\bf{G = }}\left( {{\bf{V, T, S, P}}} \right)\) with \({\bf{V = }}\left\{ {{\bf{0, S}}} \right\}{\bf{,T = }}\left\{ {\bf{0}} \right\}\), starting state \({\bf{S}}\), and productions \({\bf{S}} \to {\bf{0S,S}} \to {\bf{S0}}\), and \({\bf{S}} \to 0\) is ambiguous by constructing two different derivation trees for \({{\bf{0}}^{\bf{3}}}\).

Construct a finite-state machine that models a newspaper vending machine that has a door that can be opened only after either three dimes (and any number of other coins) or a quarter and a nickel (and any number of other coins) have been inserted. Once the door can be opened, the customer opens it and takes a paper, closing the door. No change is ever returned no matter how much extra money has been inserted. The next customer starts with no credit.

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

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