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

What does the Turing machine described by the five-tuples \(\left( {{s_0},1,{s_1},0,R} \right),\left( {{s_1},1,{s_1},1,R} \right),\left( {{s_1},0,{s_2},0,R} \right),\left( {{s_2},0,{s_3},1,L} \right),\;\left( {{s_2},1,{s_2},1,R} \right),\;\left( {{s_3},1,{s_3},1,L} \right),\)\(\left( {{s_3},0,{s_4},0,L} \right),\left( {{s_4},1,{s_4},1,L} \right)\), and \(\left( {{s_4},0,{s_0},1,R} \right)\) do when given

\(a)\)\(11\)as input\(?\)

\(b)\)a bit string consisting entirely of \(1\)s as input\(?\)

Short Answer

Expert verified

\(a)\)Machine halts with \({\bf{01}}\) on the tape, but the input was not accepted.

\(b)\)The first \(1\) (if any) is changed to a \(0\) and the others are left alone.

The input is not accepted.

Step by step solution

01

Step 1:Definition

A Turing machine \({\bf{T = }}\left( {{\bf{S,I,f,}}{{\bf{s}}_{\bf{0}}}} \right)\) consists of a finite set \({\bf{S}}\) of states, an alphabet \({\bf{I}}\) containing the blank symbol \({\bf{B}}\), a partial function \({\bf{f}}\) from \({\bf{S \times I}}\) to \({\bf{S \times I \times \{ R,L\} }}\), and a starting state \({{\bf{s}}_{\bf{0}}}\).

02

Verifying the given input

(a)

The machine starts in state \({s_0}\) and sees the first \(1\). Therefore, using the first five-tuple, it replaces the \(1\) by a \(0\), moves to the right, and enters state \({s_1}\). Now it sees the second \(1\), so, using the second five-tuple, it replaces the \(1\) by a \(1\) (i.e., leaves it unchanged), moves to the right, and stays in state \({s_1}\). Since there are no five-tuples telling the machine what to do in state \({s_1}\) when reading a blank, it halts.

Therefore, since \({\bf{01}}\) is on the tape, and the input was not accepted, because \({s_1}\) is not a final state; in fact, there are no final states (states that begin no \(5 - \)tuples).

03

Verifying the given input

(b)

This is same as part \((a)\). The first \(1\) (if any) is changed to a \(0\) and the others are left alone.

Hence, the input is not accepted.

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

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

a) the set consisting of the bit strings 0, 1, and 11

b) the set of bit strings containing only 1s

c) the set of bit strings that start with 0 and end with 1

d) the set of bit strings that consist of a 0 followed by an even number of 1s.

Express each of these sets using a regular expression.

  1. The set containing all strings with zero, one, or two bits
  2. The set of strings of two 0s, followed by zero or more 1s, and ending with a 0
  3. The set of strings with every 1 followed by two 0s
  4. The set of strings ending in 00 and not containing 11
  5. The set of strings containing an even number of 1s

In Exercises 43โ€“49 find the language recognized by the given nondeterministic finite-state automaton.

Suppose that S, I and O are finite sets such that \(\left| S \right| = n, \left| I \right| = k\), and \(\left| O \right| = m\).

\(a)\)How many different finite-state machines (Mealy machines) \(M = \left( {S,I,O,f,g,{s_0}} \right)\) can be constructed, where the starting state \({s_0}\) can be arbitrarily chosen?

\({\bf{b)}}\)How many different Moore machines \(M = \left( {S,I,O,f,g,{s_0}} \right)\) can be constructed, where the starting state \({s_0}\) can be arbitrarily chosen?

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