Which of the following language regular?

Which of the following language regular?
A. {a$^{i}$b$^{i}$|i>=0}
B. {a$^{i}$b$^{i}$|0<i<5}
C. {a$^{i}$b$^{i}$|i>=1}
D. None of the mentioned
 
Answer: B
Explanation: Here, i has limits i.e. the language is finite, contains few elements and can be graphed using a deterministic finite automata. Thus, it is regular. Others can be proved non regular using Pumping lemma.
 

Tìm kiếm

Back
Top