1.0 KiB
1.0 KiB
Pumping Lemma
Show L = \{0^n1^n | n=03 \text{ is not regular}\}.
Assume L is regular.
Pick a string and some pumping length, P.
s=0^p1^p
Now show that for any way to divide the string into xyz, pumping s results in a string outside of the language.
xy^2z contains symbols out of order, and more 0s than 1s.
Finite State Machine
A finite automaton is a 5 tuple (Q, \Sigma, \delta, q, F) where
- Q is a finite set called the states
\Sigmais a finite set called the alphabet\delta = Q \times \Sigma \rightarrow Qis the transition functionq \in Qis the start stateF \subset Qis the set of accept state
Chomsky Normal Form
Let G be a Context Free Grammar (CFG). G is in Chomsky Normal Form provided that all rules are of the form
A \rightarrow AAA \rightarrow u
The start state cannot appear on the right hand side. Cannot A \rightarrow \epsilon unless start state.
NFA that's the union of two languages
Misc.
\text{REG} \in \text{CFL}
but
\text{REG} \neq \text{CFL}