Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 694 Bytes

File metadata and controls

19 lines (16 loc) · 694 Bytes

theory of machines and languages

check strings by DFA

this script reads DFA information from a text file in specific format like below and creates DFA for checking strings.

a b : alphabet
Q0 Q1 Q2 : states
Q0 : start state
Q1 : accept state
Q0 a Q1 : functions
Q0 b Q1
Q1 a Q2
Q1 b Q2
Q2 a Q2
Q2 b Q2

convert NFA to DFA

this script reads NFA information from a text file like above, and converts epsilon NFA to NFA and write new NFA to    a text file in the root directory, then convert the new NFA to DFA and write this DFA beside our script.