UGC NET Computer Science July 2018 - II Question 32
Question 32
32. The finite state machine given in figure below recognizes :
Options:
(1) any string of odd number of a’s
(2) any string of odd number of b’s
(3) any string of even number of a’s and odd number of b’s
(4) any string of odd number of a’s and odd number of b’s
Answer : (4) any string of odd number of a’s and odd number of b’s
Explanation Question 32
any string of odd number of a’s → False it does't accept string "aaa"
any string of odd number of b’s → False it does't accept string "bbb"
any string of even number of a’s and odd number of b’s → False it does't accept string "aabb"
any string of odd number of a’s and odd number of b’s → True
The language accepted by given finite automata is:
L = {ab, ba, ababab, bababa, ......}
Here L is the language containing odd number of a’s and odd number of b’s.
-
any string of odd number of a’s → False
-
any string of odd number of b’s → False
-
any string of even number of a’s and odd number of b’s → False
-
any string of odd number of a’s and odd number of b’s → True
The language accepted by given finite automata is:it does't accept string "aaa"
it does't accept string "bbb"
it does't accept string "aabb"
L = {ab, ba, ababab, bababa, ......}
Here L is the language containing odd number of a’s and odd number of b’s.
So, Option (4) is correct answer.