MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
John is asked to make an automaton which accepts a given string for all the occurrence of ‘1001’ in it. How many number of transitions would John use such that, the string processing application works?
A
9
B
11
C
12
D
15
Explanation: 

Detailed explanation-1: -Besides giving the explanation of John is asked to make an automaton which accepts a given string for all the occurrence of ‘1001’ in it. How many number of transitions would John use such that, the string processing application works? a)9b)11c)12d)15Correct answer is option ‘A’.

Detailed explanation-2: -The total number of states required to automate the given regular expression(00)*(11)*a) 3b) 4c) 5d) 6View AnswerAnswer: cExplanation:4.

Detailed explanation-3: -A string is accepted by a finite automaton, M = (Q, , , q0, F), if (q0, ) = F, where q0 is initial (start) state and F is the final state. For every input symbol of string it takes one transition and starts with initial state and reaches final state by reading the complete string.

Detailed explanation-4: -For finding the complement of this DFA, we simple change the non-final states to final and final state to non-final keeping the initial state as it is. Hence, 4 states will be required.

Detailed explanation-5: -There are two types of finite automata: DFA(deterministic finite automata) NFA(non-deterministic finite automata)

There is 1 question to complete.