GATE CS 2024 Set 1 | Question 61
Theory of Computation › Regular Grammar · NAT · 2 marks · Answer: 44
- Question 61Theory of Computationnat2 marksFor and over , the number of strings of length that are neither in nor in is _________
Answer: 44
Solution
Answer: 44 = all-0 or all-1 strings (including ). = a 0 followed by any number of 1's, or a 1 followed by any number of 0's. Total strings of length to . Subtracting those in (11 strings: and for ) and those in (strings of the two forms, length 1..5) and adding back none (the two sets are disjoint except trivially), the count of strings in neither is .
More GATE PYQ on Regular Grammar
All GATE CS Theory of Computation PYQ →Attempt GATE CS 2024 Set 1 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →