Untitled

Context-Free Grammer

<aside> ๐Ÿ’ก all Productions in P are $Aโ†’x$

s.t $A \in V and x \in (V \cup T ) ^*$ ์ฆ‰ lhs๋Š” single variable ํ•˜๋‚˜๋งŒ ์™€์•ผ ํ•˜๊ณ (context free: ์ฃผ๋ณ€์ด์—†์Œ), rhs๋Š” ์ƒ๊ด€ ์—†๋‹ค

</aside>

*all RL is CFL


Derivation

A Sequence of the productions of a CFG to infer that a certain string is in the language

Iterative Derivation

double arrow: one-step derivation

์œ„์— star: multi-step derivation (์—ฌ๋Ÿฌ๋ฒˆ ํ•œ๊ฑฐ๋ฅผ ๊ทธ๋ƒฅ ํ‘œ๊ธฐํ•œ๊ฑฐ)

Untitled

Context-Free Language

L is context free language โ†” there is context-free G s.t. L = L(G)

$L(G) = \{ w \in T^* | S \overset {*}{\Rightarrow} w \}$

: start state์—์„œ ์‹œ์ž‘ํ•œ ๋ชจ๋“  w์˜ ์ง‘ํ•ฉ