CFG or Context-Free Grammar is used to generate all possible strings in a formal language. It can be defined by four tuples, G= (V, T, P, S). ...