An introduction to Formal language and automata