Differences between revisions 11 and 12
Revision 11 as of 2020-01-26 17:53:27
Size: 624
Editor: 68
Comment:
Revision 12 as of 2020-01-26 17:53:59
Size: 614
Editor: 68
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
 1. Element $$\Sigma$$ is a finite set, disjoint from [[latex2($V$)]], called the terminals,  1. Element $$\Sigma$$ is a finite set, disjoint from $$V$$, called the terminals,

Context Free Grammar

Def: For every ContextFreeLanguage there is a ContextFreeGrammar that generates it and a PushDownAutomata that recognizes it.

A context-free grammar is a 4-tuple $$(V,\Sigma,R,S)$$, where

  1. Element $$V$$$ is a finite set called the variables,
  2. Element $$\Sigma$$ is a finite set, disjoint from $$V$$, called the terminals,
  3. Element $$R$$ is a finite set of rules, with each rule being a variable and a string of variables and terminals, and
  4. Element $$S \in V$$ is the start variable

An example of a rule is

$$A \rightarrow aBa$$ $$B \rightarrow \epsilon$$

ContexFreeGrammar (last edited 2020-01-26 17:53:59 by 68)