Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lfa:2025:lab09 [2026/01/12 09:07]
cata_chiru [9. Context-Free Grammars]
lfa:2025:lab09 [2026/01/14 19:49] (current)
cata_chiru
Line 1: Line 1:
 ====== 9. Context-Free Grammars ====== ====== 9. Context-Free Grammars ======
  
-G = {\Sigma, V, R, S}+G = \{\Sigma, V, R, S \$
  
 S - Starting symbol S - Starting symbol
Line 7: Line 7:
 V - Set of terminals and non-terminals V - Set of terminals and non-terminals
  
-R - production rules  R \ineq (V \\Sigma) ​V^n+R - production rules  ​($ R \subseteq ​(V \setminus ​\Sigma) ​\times ​V^n $) 
 + 
 +**Property:​** Chomsky Normal Form (CNF) - A grammar in CNF is context-free. 
 +  - all transitions are of the form: 
 +       * $ X \leftarrow YZ $ 
 +       * $ X \leftarrow a $ 
 +       * $ S \leftarrow \epsilon $ 
 + 
 +S is the starting symbol.