제 3 장. Regul nguges 와 Regul Gmms 학습목표 Fnte Automt 이외에 Regul nguge 를표현하는방법으로 Regul Expesson 과 Regul Gmm 에대해학습하고 3 가지가동일함을이해한다
개요 언제을 egul lnguge라하나? fnte ccepte df o nf Descpton methods DFA o NFA need moe concse wys egul expessons 3 egul gmms Concse ut mpotnt pctcl pplctons
Regul Expessons RE 의기본정의에대해서알아보자 + 예 c + + c U c 의st closue + c c c c cc c Def.. 3. φ pmtve egul expessons RE + RE stng RE ff dved fom pmtve RE y fnte no. of pplctons 예 c + c c + φ + + not RE RE 그렇다면주어진 RE 가나타내는언어는무엇인가?
RE 이나타내는언어 3.. set empty. wth ssocted lnguges Def φ + 7. 6. 5. 4. U + 예 * + U c + + > > pecedence cf 상식적인간단한정의!
RE 이나타내는언어 예 좀연습이필요합니다 예 + + egul ll stngs on temnted y o 예 반대는어렵다 n m+ n m 예3 w + + 예4 w w w hs t lest one p of consecutve hs no p of consecutve zeos + + + sme lnguge + + zeos 으로끝나는경우 로만된경우
RE Homewo Execses 3. - 5 4 n 과 m 각각이짝수인경우와홀수인경우로나누면 - 9 세가지 cse 로나누어서생각해봅시다. - 6 4 쉬운문제부터어려운문제로나갑니다. 할수있는만큼만. - 4 5 3 응용문제
Connecton etween RE nd R DFA NFA Genetng lels of ll wls fom to ny fnl stte egul NFA ccepts Thm 3. M φ Pf. + pove y nducton on no. of opetos M
Fndng NFA fo 예 예 + + Regul Expessons Regul nguges esy!! 그반대는 Fnd RE cple of genetng lels of ll the wls fom to ny fnl stte oo eepng polem exstence of cycles 새로운표현법이필요하겠군!
RE R GTG 이용 Genelzed tnston gph edges e leled wth RE full lnguge unon of ll geneted susets c* 예 + + + c Euvlence of GTG nethe fnl no ntl e d c R GTG 변환 RE euvlent GTG wth one less stte y emovng e*d ce* ce*d e*
RE R GTG 이용 복잡해보이지만단순변환과정을실수없이하는연습이필요함 Thm 3. RE such tht pf. M NFA tht ccepts hvng only one fnl stte & 3 4 f 4 + 3 F 이와 euvlent 한 GTG 로변환해가면서최종 GTG 를얻음 예 pove y nducton on no. of sttes n GTG +* + * + +
RE 의응용예 Pscl nteges sdd s + d 9 ptten mtchng ssgnng gven oect to one of sevel ctegoes 예 Applcton text edtng / c / UNIX EDITOR stte educton ptten ecognton pogm RE NFA DFA tnston tle
RE/R Homewo Execses 3. - 4 쉽지만끈기를필요로하는변환문제 - NFA 로부터 RE 구하기연습 - 6 7 그냥생각만해보고실제로하지는말것. 매우어려운문제!
Regul Gmms RG NFA R d D de D E Def G T G T S S P A A P left lne A Bx A x ght lne xb x f f ll poductons ll poductons egul gmm ethe ght lne o left lne one vle n ght sde consstently ght o left
Regul Gmms 예 예 S S S S S S S S ght lne left lne * + 예 S A A B B A not egul ut lne gmm t most one vle on ght sde
RG R 증명 Thm 3.3 G pf. Suppose w G Suppose w s ccepted y M w v v v w G Rght-lne gmm 의 devton 을표현하는 NFA 구축 T S P ght lne G egul v m m v v v l v v pth such tht v v v v v m m n v Sententl fom ght most one v. cd cde d D de D E l f fnl stte w w s ccepted y M f v v l possle 예 FA tht ccepts G G f
n stng evey genete n n n wth DFA tht ccepts. such tht lne ght egul Thm 3.4 G w F M w G F P M S P S G Q F Q M pf G P S G f l t t s p p l n m n M l f l t p G constucton y RG R 증명 stte vle symol temnl DFA Gmm
f l G w f gmm lne ght 예 f f F f f RG R 증명 eft-lne gmm 인경우는어떻게될까?
총정리증명 Thm 3.5 pf. egul ff left lne G such tht G left lne G A Bv v R R ght lne G A v B v R G G G egul Q G ght lne G egul R G egul Thm 3.6 egul ff egul gmm G such tht egul lnguge egul gmm G RE DFA o NFA 3 4 RG Regul lnguge를표현하는방법 - DFA s NFA s - Regul expessons Powe면에서동등 - Regul gmms
RG Homewo Execses 3.3 - 가장 typcl 한기계적변환연습 - 9 left-lne gmm 의연습