Is the following language regular?


#1

Is L = {a^n b a^m | n,m ≥ 0 and n = m mod 5} a regular language? Please elaborate your answer. Thanks :slight_smile:


#2

A grammar is regular, if a finite automaton can be produced which accepts all the strings of the grammar. The following finite automatonaccepts all the strings of the given grammar, Therefore the given grammar is a regular one.