Regular Languages Deterministic Finite Automata DFA a 0











- Slides: 11
Regular Languages: Deterministic Finite Automata (DFA) a 0 b 1 a b b b aa abab abaaaabbb a 2 a 3 {w {a, b}* | # a. W and # a. W both even} DFA = NFA (Non-deterministic) = REG
Learning DFA’s: 2) MCA(S+) S+ = (c, ababc} Maximal Canonical Automaton a 0 1 b 2 a 3 a c 6 9 b 7 c 8 b 4 c 5
Learning DFA’s: 4) State Merging (Oncina, Vidal 92, Lang 98) S+ = (c, ababc} Evidence Driven State merging: 0, 2 a 0 1 b 2 a 3 c 8 c 9 b 4 c 5
Learning DFA’s: 4) State Merging (Oncina, Vidal 92, Lang 98) S+ = (c, ababc} Evidence Driven State merging: 1, 3 and 8, 9 a a 0 1 3 c b 8 c 9 b 4 c 5
Learning DFA’s: 4) State Merging (Oncina, Vidal 92, Lang 98) S+ = (c, ababc} Evidence Driven State merging: 0, 4 a 0 1 b c 9 b 4 c 5
Learning DFA’s: 4) State Merging (Oncina, Vidal 92, Lang 98) S+ = (c, ababc} Evidence Driven State merging: 9, 5 a 0 1 b c 9 c 5
Learning DFA’s: 4) State Merging (Oncina, Vidal 92, Lang 98) S+ = (c, ababc} Evidence Driven State merging: 0, 4 and 9, 5 a 0 1 b c 9
Learning DFA’s via evidence driven state merging § Input S+, S§ Output: DFA § 1) Form MCA(S+) 2) Form PTA(S+) 3) Do until no merging is possible: - choose merging of two states - perform cascade of forced mergings to get a deterministic automaton - if resulting DFA accepts sentences of S- backtrack and choose another couple 4) End § Drawback: we need negative examples!!!
Learning DFA using only positive examples with MDL S+ = (c, cabab, cababababab } a L 1 0 c Outside world # states Coding in bits: |L 1| 5 log 2 (3+1) 2 log 2 (1+1) = 20 |L 2| 5 log 2 (3+1) 2 log 2 (1+3) = 40 # letters Empty letter 0 c 1 2 b b # arrows a L 2
Learning DFA using only positive examples with MDL S+ = (c, cabab, cababababab } a L 1 a L 2 0 c 0 1 2 b b Coding in bits: |L 1| 5 log 2 (3+1) 2 log 2 (1+1) = 20 |L 2| 5 log 2 (3+1) 2 log 2 (1+3) = 40 But: L 1 has 4 choices in state 0: L 2 has 2 choices in state 1: c |L 1(S+)|= 26 log 2 4 = 52 |L 2(S+)|= 16 log 2 2 = 16 |L 2| + |L 2(S+)|= 40 + 16 < |L 1| + |L 1(S+)|= 20 + 52 L 2 is the better theory according to MDL
Learning DFA’s using only positive examples with MDL § Input S+ § Output: DFA § 1) Form MCA(S+) 2) Form DFA = PTA(S+) 3) Do until no merging is possible: - choose merging of two states - perform cascade of forced mergings to get a deterministic automaton DFA’ - if |DFA’|+|DFA’(S+)| |DFA|+|DFA(S+)| backtrack and choose another couple 4) End § Drawback: Local minima!











