Question

Construct a finite-state machine with output that produces an output of 1 if the bit string read so far as input contains four or more 1s. Then construct a deterministic finite-state automaton that recognizes this set.

Solution

Verified

Step 1

1 of 3

Finite-state machine\textbf{Finite-state machine}

A finite state machine\textbf{finite state machine} is a six-tuple (S,I,O,f,g,s0)(S,I,O,f,g,s_0) where SS is the set of States, II is the input alphabet, OO is the output alphabet, ff is the transition function that assigns a next state to a pair of a state and input, gg is an output function that assigns an output to every pair of a state and input, and s0s_0 is the starting state.

The states\textbf{states} of the finite-state machine are the labels written in the circles (states).

S={s0,s1,s2,s3,s4}S=\{s_0,s_1,s_2,s_3,s_4\}

where sis_i represents that there are ii or more 1's in the string read so far.

The input symbols\textbf{input symbols} of the finite-state machine are the possible inputs.

I={0,1}I=\{0,1\}

The initial state\textbf{initial state} of the finite-state machine is s0s_0

Initial state=s0\text{Initial state}=s_0

When a 1 is read, we need to move from state sis_i to si+1s_{i+1} when i=0,1,2,3i=0,1,2,3.

Otherwise, we will remain at the current state at the input is a 0 or as we already know that there are four or more 1's.

The output needs to be 1 when there are four or more ones and 0 otherwise.

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Recommended textbook solutions

Discrete Mathematics and Its Applications 7th Edition by Kenneth Rosen

Discrete Mathematics and Its Applications

7th EditionKenneth Rosen
4,285 solutions
Discrete Mathematics 8th Edition by Richard Johnsonbaugh

Discrete Mathematics

8th EditionRichard Johnsonbaugh
4,246 solutions
Discrete Mathematics and Its Applications 8th Edition by Kenneth Rosen

Discrete Mathematics and Its Applications

8th EditionKenneth Rosen
4,399 solutions

Related questions