Question

Draw a deterministic finite state machine for the input alphabet A where A = {1, 2,...

Draw a deterministic finite state machine for the input alphabet A where A = {1, 2, 3, 4, 5} that recognises exactly all strings that include the 2 letter string 42 exactly once. For example, the machine will accept the string 54214 but reject the strings 432 and 421421.

Homework Answers

Answer #1

The task is to construct a DFA(deterministic finite state) machine for the the input alphabet A = {1,2,3,4,5} that recognises exactly strings that include string "42" exactly once.

Alphabet A = {1,2,3,4,5}

The above DFA has been constructed using a simulator for better understanding.

Here "start" is the starting state.

"s1", "s2" are the accepting states.

"s3" is the dead state.

TRANSITION TABLE

1 2 3 4 5
start start start start s0 start
s0 start s1 start s0 start
s1 s1 s1 s1 s2 s1
s2 s2 s3 s2 s2 s2
s3 s3 s3 s3 s3 s3
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Construct a non-deterministic finite state automaton (show the answer in a state machine diagram), where V...
Construct a non-deterministic finite state automaton (show the answer in a state machine diagram), where V = { S, A, B, 0, 1, λ}, T = { 0, 1 }, and G = ( V, T, S, P }, when the set of productions consists of: S → 1A, A → 0B, A → 1, B → 0. S → 0A, S → 1B, S → λ, A → 1A, A → 0, B → 0B, B → 1. S...
Construct a finite-state machine that gives an output of 1 if the number of input symbols...
Construct a finite-state machine that gives an output of 1 if the number of input symbols read so far is divisible by 3 and an output of 0 otherwise. (NOTE: a finite-state machine with output).
Construct a finite-state machine that gives an output of 1 if the number of input symbols...
Construct a finite-state machine that gives an output of 1 if the number of input symbols read so far is divisible by 3 and an output of 0 otherwise.
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA...
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA which accepts strings of odd length Design a DFA over w ∈ {a,b}*such that number of a = 2 and there is no restriction over length of b DFA for Number of a(w) mod 2 = 0 and Number of b(w) mod 2 = 0 DFA for Number of a(w) mod 2 = 0 orNumber of b(w) mod 2 = 0 DFA for Number...
The task is to design a binary finite state automaton (FSA) to accept all strings that...
The task is to design a binary finite state automaton (FSA) to accept all strings that represent valid messages (for the below code given and parity property) and reject all others. The FSA must be deterministic and reduced finite state acceptor in standard form. Codes are as following: A = 00000 B = 0100 C = 011 Parity = Odd 0, the entire message (including the check digit) has an odd number of 1's. FOR EXAMPLE if your codes are...
C Program Write a program to count the frequency of each alphabet letter (A-Z a-z, total...
C Program Write a program to count the frequency of each alphabet letter (A-Z a-z, total 52 case sensitive) and five special characters (‘.’, ‘,’, ‘:’, ‘;’ and ‘!’) in all the .txt files under a given directory. The program should include a header count.h, alphabetcount.c to count the frequency of alphabet letters; and specialcharcount.c to count the frequency of special characters. Please only add code to where it says //ADDCODEHERE and keep function names the same. I have also...
For all Questions below do the following. 1. 1pt Draw the State Diagram of M. 2....
For all Questions below do the following. 1. 1pt Draw the State Diagram of M. 2. 2pt Determine whether M is / is not a finite state automata and determine whether M is deterministic or non-deterministic, if applicable. 3. 3pts Describe L(M) (1pt) and write a a regular expression (2pts) that defines it. Q1 M = (K, Σ, s, ∆, F ) for K = {q0} = F, s = q0, Σ = ∅, ∆ = ∅. Q2 M =...
Design a finite state machine that handles an elevator system. The building has seven (7) floors....
Design a finite state machine that handles an elevator system. The building has seven (7) floors. Consider that when moving between floors, the elevator must transition between floors from source floor to destination floor (i.e. a transition from floor 5 to 3 can’t miraculously occur by skipping floor 4). The system can be locked with a key input such that the elevator can’t be operated. Assume calls are made by pressing and holding push buttons.
Problem description Design a finite state machine that handles an elevator system. The building has five...
Problem description Design a finite state machine that handles an elevator system. The building has five (5) floors. Consider that when moving between floors, the elevator must transition between floors from source floor to destination floor (i.e. a transition from floor 5 to 3 can’t miraculously occur by skipping floor 4). A panic button should activate an alarm system (assume a red LED) and should disable elevator functions. Also, the system can be locked with a key input such that...
3. Write function, leastChar(inputString) that takes as input a string of one or more letters (and...
3. Write function, leastChar(inputString) that takes as input a string of one or more letters (and no other characters) and prints 1) the "least" character in the string, where one character is less than another if it occurs earlier in the alphabet (thus 'a' is less than 'C' and both are less than 'y') and 2) the index of the first occurrence of that character. When comparing letters in this problem, ignore case - i.e. 'e' and 'E' should be...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT