progs/automata/thompson.sc
changeset 742 b5b5583a3a08
parent 733 022e2cb1668d
child 753 d94fdbef1a4f
equal deleted inserted replaced
741:e66bd5c563eb 742:b5b5583a3a08
   169 // is probably not the most effcient way to obtain a fast DFA 
   169 // is probably not the most effcient way to obtain a fast DFA 
   170 // (the test below should be much faster with a more direct 
   170 // (the test below should be much faster with a more direct 
   171 // construction), in general the DFAs can be slow because of 
   171 // construction), in general the DFAs can be slow because of 
   172 // the state explosion in the subset construction
   172 // the state explosion in the subset construction
   173 
   173 
   174 for (i <- 1 to 13) {
   174 for (i <- 1 to 7) {
   175   println(i + ": " + "%.5f".format(time_needed(2, tmatches_dfa(EVIL1(i), "a" * i))))
   175   println(i + ": " + "%.5f".format(time_needed(2, tmatches_dfa(EVIL1(i), "a" * i))))
   176 }
   176 }
   177 
   177 
   178 for (i <- 1 to 100 by 5) {
   178 for (i <- 1 to 100 by 5) {
   179   println(i + " " + "%.5f".format(time_needed(2, tmatches_dfa(EVIL2, "a" * i))))
   179   println(i + " " + "%.5f".format(time_needed(2, tmatches_dfa(EVIL2, "a" * i))))