MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
For the following change of state in FA, which of the following codes is an incorrect option?if char = “0” goto n;
A
(m, 1) =n
B
(0, n) =m
C
(m, 0) =
D
s:accept = false; cin » char;
Explanation: 

Detailed explanation-1: -Solutions for For the following change of state in FA, which of the following codes is an incorrect option? a) (m, 1) =nb) (0, n) =mc) (m, 0) =d)s: accept = false; cin » char; if char = “0” goto n; Correct answer is option ‘B’.

Detailed explanation-2: -Finite automata have two states, Accept state or Reject state. When the input string is processed successfully, and the automata reached its final state, then it will accept.

Detailed explanation-3: -Explanation: According to the question, minimum of 3 states are required to recognize an octal number divisible by 3.

Detailed explanation-4: -For the acceptance and rejection of any string we can simply check for the movement on each input alphabet between states. A string is accepted if we stop at any final state of the DFA. For string u=abbaba the string ends at t (final state) hence it is accepted by the DFA.

There is 1 question to complete.