ð ïžã¹ããŒããã·ã³ ããŒãª ã ãŒã¢ãDFAãšNFA DFSM NFSM GNFA STS NPDA DPDA
DFA (決å®æ§æéãªãŒãããã³)ïŒæ±ºå®æ§æéãªãŒãããã³ã¯ãããç¶æ ããå¥ã®ç¶æ ãžã®é·ç§»ãäžæçã«æ±ºãŸãæéãªãŒãããã³ã§ããã€ãŸããåãç¶æ ããåºãè€æ°ã®é·ç§»ãåãèšå·ã§ã©ãã«ä»ããããããšã¯ãããŸããã
NFA (é決å®æ§æéãªãŒãããã³)ïŒé決å®æ§æéãªãŒãããã³ã¯ãããç¶æ ããè€æ°ã®é·ç§»ãåãèšå·ã§ã©ãã«ä»ãããããã®çµæãè€æ°ã®å¯èœãªæ¬¡ã®ç¶æ ãååšããå¯èœæ§ãããæéãªãŒãããã³ã§ãã
DFSM (決å®æ§æéç¶æ ãã·ã³)ïŒããã¯DFAãšå矩èªã§ããã€ãŸããããç¶æ ããå¥ã®ç¶æ ãžã®é·ç§»ãäžæçã«æ±ºãŸãæéç¶æ ãã·ã³ã§ãã
NFSM (é決å®æ§æéç¶æ ãã·ã³)ïŒããã¯NFAãšå矩èªã§ããã€ãŸããããç¶æ ããè€æ°ã®é·ç§»ãåãèšå·ã§ã©ãã«ä»ããããæéç¶æ ãã·ã³ã§ãã
GNFA (äžè¬åé決å®æ§æéãªãŒãããã³)ïŒäžè¬åé決å®æ§æéãªãŒãããã³ã¯ãé·ç§»ãæ£èŠè¡šçŸã§ã©ãã«ä»ããããé決å®æ§æéãªãŒãããã³ã§ãã
STS (ç¶æ é·ç§»ã·ã¹ãã )ïŒç¶æ é·ç§»ã·ã¹ãã ã¯ãã·ã¹ãã ãäžé£ã®ç¶æ ãéããŠé²åããæ¹æ³ãã¢ãã«åããæ°åŠçã¢ãã«ã§ãã
NPDA (é決å®æ§ããã·ã¥ããŠã³ãªãŒãããã³)ïŒé決å®æ§ããã·ã¥ããŠã³ãªãŒãããã³ã¯ãã¹ã¿ãã¯ãšããããŒã¿æ§é ã䜿çšããŠé決å®æ§ã®é·ç§»ãè¡ããªãŒãããã³ã§ãã
DPDA (決å®æ§ããã·ã¥ããŠã³ãªãŒãããã³)ïŒæ±ºå®æ§ããã·ã¥ããŠã³ãªãŒãããã³ã¯ãã¹ã¿ãã¯ãšããããŒã¿æ§é ã䜿çšããŠæ±ºå®æ§ã®é·ç§»ãè¡ããªãŒãããã³ã§ãã
ã¹ããŒããã·ãŒã³ãšããèšèããã
æ£èŠè¡šçŸã¯ãªãŒãããã³ãšå¯æ¥ãªé¢ä¿ãããã®ããã£ãã®ã¯ãã®æ¬ã®åé ã ã£ãã
ããã«ããŒãªããã ãŒã¢NFAãDFAãããã説æãã®ã£ãŠããã
ãããŠãã®æ¬ã«boyer-mooreæ³ãšããã®ãåºãŠããŠããã®ã ãŒã¢ãšã ãŒã¢ãã·ã³ã¯é¢ä¿ãããã®ã ããããšããã£ãŠããã
ãªããšãé¢ä¿ããªãã£ãïŒã©ãããã
boyer-mooreæ³ã¯åãããããã£ãã®ã«ããŸããã«DFA/NFAã®ããšã調ã¹ããã
ååŠçãšããŠBMã䜿ãããåãç¿ãšããŠDFAããããšããããšã®ããã ã(ç¡é¢ä¿ã§ã¯ãªãã£ã)NFAãDFAã«å€æããããšããããšãªã®ã§ãDFAã®åœ¢ãããã€ãèŠãŠã¿ããã
åãããããªåããããããªãããã
æŽçãã
ãªãŒãããã³æ¥çã§åºãŠããçšèªãæŽçããŠã¿ãã
DFA決å®æ§æéãªãŒãããã³ïŒãã£ãŠããããããããªãŒãããã³ãè±: Deterministic Finite AutomatonïŒaka.決å®æ§æéç¶æ æ©æ¢°ïŒãã£ãŠããããããããããããããããè±: Deterministic Finite State MachineïŒaka.DFSM
NFA é決å®æ§æéãªãŒãããã³[1]ïŒã²ãã£ãŠããããããã-ãè±: Nondeterministic Finite AutomatonïŒaka.é決å®æ§æéç¶æ æ©æ¢°ïŒã²ãã£ãŠããããããããããããããããè±: Nondeterministic Finite State MachineïŒaka.NFSM
æ¡åŒµé決å®æ§æéãªãŒãããã³aka.GNFA
ç¶æ é·ç§»ç³»ïŒãããããããããããState Transition SystemïŒaka.STS
ããã«æ¡ä»¶ãæŸã£ãŠãã
NFAâDFAâGNFAâæ£èŠè¡šçŸ
ç¡éãªãŒãããã³ãšããã®ã¯è°è«ã«ã¯åºãŠããªãã®ã§ããã¥ãŒãªã³ã°ãã·ã³äžçªæå³ãåºããŠãããã«è¿ããã€æ±ºå®çãé決å®è«çãªåŒ·ãã«ã¯ãããŸãé¢ãããªãããæéãšãããšããã§èšç®åã®åé¡ãåºãŠããã¿ããã ã£ãããããªè°è«ã®äžã§åºãŠããã®ããé決å®æ§ããã·ã¥ããŠã³ã»ãªãŒãããã³ãïŒNPDAïŒã
DFAã®å³ã«ãã©ã£ãŠã決å®ããšã¯äœããæ¯ãè¿ã
決å®è«çã«ãžã£ã³ãã
ãªãŒãããã³ïŒèªåæ©æ¢°ïŒã«ã¯èªåŸããŠåããŠã¯æ¬²ããããæ©æ¢°ã«æ°ãŸãŸã«åããããšãããããªäºæ ã§å°ãããã§ãå«ã¿ãšããŠDeterministic FiniteãšããããããåºãŠãããå®éã®ããŒããŠã§ã¢ããã®ããã«äœãåºãããã
éåãããã§éžæè¢ãçäžãããããã¯æ¥µå°é»åãã€äœååæ䞊è¡ã«ãªã£ããšããŠãããžãã¯ãã ã£ããéææ§ããå°ãå®å¿ã¯ã§ããã
ã決å®è«çã«ãã¯è¥å¹²é£ãæ°å³ã§èšã£ãŠã¿ãŠã»ããã
ããã¯ãã©ããã³ã°
ããã¯ãã©ããã³ã°ãšNFAïŒé決å®æ§æéãªãŒãããã³ïŒããã³DFAïŒæ±ºå®æ§æéãªãŒãããã³ïŒãšã®éã«ã¯é¢é£æ§ããããŸããç¹ã«æ£èŠè¡šçŸãšã³ãžã³ã®ã³ã³ããã¹ãã§ãã®é¢é£æ§ãé¡èã§ãã
ããã¯ãã©ããã³ã°:
ããã¯ãã©ããã³ã°ã¯ãå€ãã®æ£èŠè¡šçŸãããã³ã°ãšã³ãžã³ã§äœ¿çšãããã¢ã«ãŽãªãºã ã®äžéšã§ãã
ç¹ã«ã貪欲ãªããããããã£ããã£ã°ã«ãŒããåæ¹/åŸæ¹åç §ãªã©ã®é«åºŠãªæ£èŠè¡šçŸã®æ©èœããµããŒããããšã³ãžã³ã§ã¯ããããã³ã°ã®éçšã§è€æ°ã®éžæè¢ãååšããå Žåãäžã€ã®éžæè¢ãæ¢çŽ¢ããåŸã§å¥ã®éžæè¢ã«æ»ãå¿ èŠããããŸãããããããã¯ãã©ããã³ã°ã§ãã
ããã¯ãã©ããã³ã°ãå€çšããæ£èŠè¡šçŸãšã³ãžã³ã¯ãç¹å®ã®å ¥åããã¿ãŒã³ã§éåžžã«é ããªãããšããããŸãã
NFA:
NFAã¯é決å®æ§ãæã€ãããè€æ°ã®é·ç§»å ãååšããå¯èœæ§ããããŸãããã®é決å®æ§ã¯ãããã¯ãã©ããã³ã°ã®ã¢ã€ãã£ã¢ãšäžèŽããŠããŸããã€ãŸããäžã€ã®éžæè¢ãæ¢çŽ¢ããåŸãå¥ã®éžæè¢ã«æ»ãããšãã§ããŸãã
ãã®ãããå€ãã®ããã¯ãã©ããã³ã°ã䜿çšããæ£èŠè¡šçŸãšã³ãžã³ã¯ãå éšçã«NFAããŒã¹ã®ã¢ãããŒããæ¡çšããŠããŸãã
DFA:
DFAã¯æ±ºå®æ§ãæã¡ãããç¶æ ããã®ç¹å®ã®å ¥åã«å¯ŸããŠäžã€ã®æ確ãªé·ç§»å ããååšããŸããã
ãã®ãããDFAã¯ããã¯ãã©ããã³ã°ãå¿ èŠãšãããå ¥åãäžåºŠã ãã¹ãã£ã³ããŠãããã³ã°ãå€å®ããããšãã§ããŸãã
ããããNFAãDFAã«å€æããéã«ç¶æ ã®æ°ãææ°é¢æ°çã«å¢å ããå¯èœæ§ããããã¡ã¢ãªæ¶è²»ãåé¡ãšãªãããšããããŸãã
çµè«ãšããŠãããã¯ãã©ããã³ã°ãšNFA/DFAã¯æ£èŠè¡šçŸã®ãããã³ã°ã®ã³ã³ããã¹ãã§å¯æ¥ã«é¢é£ããŠããŸããNFAããŒã¹ã®ãšã³ãžã³ã¯ããã¯ãã©ããã³ã°ã䜿çšããå¯èœæ§ãé«ããDFAããŒã¹ã®ãšã³ãžã³ã¯ããã¯ãã©ããã³ã°ãå¿ èŠãšããŸããã
NFAãšDFAã®ãããªé¢ä¿ãæã€äºç©ãæŠå¿µã¯ãå€ãã®åéã«ååšããŸããå ·äœçã«ã¯ãè€æ°ã®å¯èœæ§ãéžæè¢ããäžã€ã®æ±ºå®çãªçµæã圢ã«çµã蟌ããšããããã»ã¹ã瀺ããã®ã§ãã以äžã¯ãã®ãããªé¢ä¿ãæã€äºç©ãæŠå¿µã®äŸã§ãã
éåååŠãšå€å žååŠ:
éåååŠã¯ç¢ºççãªçŸè±¡ãæ±ãã®ã«å¯Ÿããå€å žååŠã¯ãã決å®è«çãªçŸè±¡ãæ±ããŸããéåç³»ããã¯ãã¹ã³ããã¯ãªã¹ã±ãŒã«ã«ãªããšãå€å žçãªæ¯ãèãã«åæããŸãã
確ççã¢ã«ãŽãªãºã ãšæ±ºå®è«çã¢ã«ãŽãªãºã :
確ççã¢ã«ãŽãªãºã ã¯ããã確çã§æ£ããçããè¿ããããŸãã¯èšç®ã®åã¹ãããã§ã©ã³ãã ãªéžæãè¡ããŸããäžæ¹ã決å®è«çã¢ã«ãŽãªãºã ã¯åžžã«åãå ¥åã«å¯ŸããŠåãåºåãè¿ããŸãã
ãã¬ã€ã³ã¹ããŒãã³ã°ãšææ決å®:
ãã¬ã€ã³ã¹ããŒãã³ã°ã§ã¯ãããŸããŸãªã¢ã€ãã£ã¢ã解決çãèªç±ã«ææ¡ããŸããããã«å¯Ÿããææ決å®ã®ããã»ã¹ã§ã¯ãææ¡ãããã¢ã€ãã£ã¢ã®äžããæãé©åãªãã®ãéžã³åºããŸãã
ãããã®äŸã¯ãå€ãã®éžæè¢ãå¯èœæ§ããäžã€ã®çµæãçããéžã³åºããšããç¹ã§ãNFAãšDFAã®é¢ä¿ã«äŒŒãŠããŸãã