RTUComputer ScienceYr 2024 · Sem 42024

Q6Theory of Computation

Question

2 marks

Define Context-Free Grammar (CFG).

Answer

CFG is a grammar for Type 2 languages.

A Context-Free Grammar (CFG) is a 4-tuple where every production rule is of the form , where is a single non-terminal and is a string of terminals and/or non-terminals.

Back to Paper