












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Some concept of Automata and Complexity Theory are Administrivia, Closure Properties, Context-Free Grammars, Decision Properties, Deterministic Finite Automata, Intractable Problems, More Undecidable Problems. Main points of this lecture are: Dfa Applications, Formal Languages, Practical Applications, Computer Programs, Based Text Filter, Java, Table-Driven Alternatives, Programming Language Processing, Command Language Processing, Text Pattern Matching
Typology: Slides
1 / 20
This page cannot be seen from the preview
Don't miss anything!
1 2
1
0 0 0
0
1
1
1 2
1
0 0 0
0
1 1
3 -{0,1} -{0,1}
-{0,1}
static private int delta(int s, char c) { switch (s) { case q0: switch (c) { case '0': return q0; case '1': return q1; default: return q3; } case q1: switch (c) { case '0': return q2; case '1': return q0; default: return q3; } case q2: switch (c) { case '0': return q1; case '1': return q2; default: return q3; } default: return q3; } }
/**
import java.io.*;
/**
Mod3 m = new Mod3(); // the DFA BufferedReader in = // standard input new BufferedReader(new InputStreamReader(System.in));
// Read and echo lines until EOF.
String s = in.readLine(); while (s!=null) { m.reset(); m.process(s); if (m.accepted()) System.out.println(s); s = in.readLine(); } } }
static void process(String in) { for (int i = 0; i < in.length(); i++) { char c = in.charAt(i); state = delta[state, c]; } }
/*