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 a finite-state automaton that recognizes the set of bit strings consisting of a 0 followed by a string with an odd number of 1s.

Short Answer

Expert verified

The result is

State

0

1

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

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

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

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

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

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

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

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

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

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

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

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

Step by step solution

01

Construction of deterministic finite-state automaton.

Let us consider four states \({{\bf{s}}_{\bf{0}}}{\bf{,}}{{\bf{s}}_{{\bf{1,}}}}{{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{3}}}\).

Let start with the state be \({{\bf{s}}_{\bf{0}}}\).Since the empty string is not the set S and is not a final state.

The state \({{\bf{s}}_{\bf{1}}}\) shows that there were an even number of 1’s.

The states \({{\bf{s}}_{\bf{2}}}\) has the odd numbers of 1’s.

The states \({{\bf{s}}_{\bf{3}}}\) strings start with a 1.

It moves from \({{\bf{s}}_{\bf{0}}}\)to \({{\bf{s}}_{\bf{1}}}\), if the input is a 0 and move from \({{\bf{s}}_{\bf{0}}}\) to\({{\bf{s}}_{\bf{3}}}\) if the input is a 1.

It moves from \({{\bf{s}}_{\bf{1}}}\)to\({{\bf{s}}_{\bf{2}}}\), if the input is 1, else remains at \({{\bf{s}}_{\bf{1}}}\).

It moves from \({{\bf{s}}_{\bf{2}}}\) to\({{\bf{s}}_{\bf{1}}}\) if the input is 1, else I remain at \({{\bf{s}}_{\bf{2}}}\).

If I remain at state \({{\bf{s}}_{\bf{3}}}\)no matter what the input is.

The final state is \({{\bf{s}}_{\bf{3}}}\) because the string starts with 0 and contains an odd number of s when I have ended at \({{\bf{s}}_{\bf{2}}}\).

02

Sketch of deterministic finite-state automaton.

The sketch of deterministic finite-state automation can be drawn by four states\({{\bf{s}}_{\bf{0}}}{\bf{,}}{{\bf{s}}_{\bf{1}}}{\bf{,}}{{\bf{s}}_{\bf{2}}}{\bf{,}}{{\bf{s}}_{\bf{3}}}\). The sketch is

03

Other way of representing in tabular form.

State

0

1

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

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

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

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

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

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

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

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

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

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

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

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

Therefore, this is the require construction.

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

Study anywhere. Anytime. Across all devices.

Sign-up for free