DFA added for initialization of First algorithm