GATE CS 2024 Set 2 | Question 62
Theory of Computation › Regular Grammar · NAT · 2 marks · Answer: 15
- Question 62Theory of Computationnat2 marksis given by and . The number of strings in that are also in is __________
Answer: 15
Solution
Answer: 15 is exactly the set of strings over with an ODD number of 's. Counting strings of length with an odd number of 's:
Total .length 1: a -> 1 length 2: ab, ba -> 2 length 3: 1 a (C(3,1)=3) + 3 a (C(3,3)=1) -> 4 length 4: 1 a (C(4,1)=4) + 3 a (C(4,3)=4) -> 8
More GATE PYQ on Regular Grammar
All GATE CS Theory of Computation PYQ →Attempt GATE CS 2024 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →