Given grammar: S → aS | b What is number of strings generated of length 4?
12 views
- 1
- 2 (Correct Answer)
- 3
- 4
Explanation
Strings must end with b. Length 4 → aaa b, aab b → 2 strings.
Strings must end with b. Length 4 → aaa b, aab b → 2 strings.
No comments yet. Be the first to comment!
Explore thousands of MCQs across every exam category on Exams Nepal.
Find More MCQs