Introduction to Automata Theory and DFA
finite automaton
- a model that has finite number of states -predetermined sequence. - used in text processing, compilers and hardware design.
why study automata theory?
- cs is a practical discipline. - application to theory -theory provides concepts and principles. - cs is diverse, and automata theory can be applied from hardware to software. - for designing systems, automatic aircraft pilots. -clearer picture that computers can be solved and cannot be solved.
Deterministic Finite Automata
- it has a fixed number of states, and only one state at a time. - the input in the transition function can only be used once.
Finite State System
- mathematical model of a system -discrete inputs and outputs. (countable) -can be in any one of a finite number of states. (kahit saang nodes). -summarizes the info but needs past inputs to determine the behavior of the system on subsequent inputs.
automaton
- plural of automata - self - making/self operating machines - computational problems that can be solved using this machines.
Theory of automata (5)?
- study of abstract computing machines -what kind of things can you really compute mechanically -how fast can a problem can be solved -2 models: finite automaton and context-free grammar. - allows
How to Create A state diagram in DFA?
1. Magfocus muna sa rule ng set builder notation. "ends with 01" 2. try to create the diagriam using the rule. 3. bruteforce each state. Create at least 3 examples to check the state. 4. Declare the formal definition
Topics Covered in this section
1. Theory of Automata 2. Why Study Automata Theory 3.Finite State System (MGCW) 4. Types of Finite Automata 5. Finite State Machine Prerequisite 6. Deterministic Finite Automata
How to Create a transition table?
1.Create a table Columns: The present state(epsilon) and the input states Rows: states. * means final and -> means starting 2. Based on the diagram, list in the table the states when theres an input.
L = { w: w starts and ends with an a; w E {a,b}}
L is the set of elements w, such that w starts and ends with an a, where w is an element of a and b
Prerequisite for Finite State Machine
Symbols : a-z and 0-9 Set of symbols: collection of symbols (Sigma) ex: {a,b} Strings: Sequence of Symbols ex: aa, bb, 01, Language: set of strings. ∑ = {0,1} L1: set of all strings of length 2 (nakabase sa Language) so ang ipoproduce ay 01 only ex. L1= {00,01,10,11} L2: set of all strings that begin with 0 l1 = {0,00,01,000...} Power of ∑ (the same as l1?): set of all strings of length 0 ex. ∑(0) = {epsilon} set of all strings of length 1 ex. ∑(1) = {0,1}
Graphical Representation of DFA
arcs: transitions vertices: states initial state: with arrow as starting.. final state: double circle
cardinality of ∑(0) = {epsilon} =1
count as 1
asterisk (regex) *
it is like looping. ∑(0) U ∑(1) U ∑(2) ....
length of string |S|
number of symbols present in a string. examples: S = 'aabbcc' |S| = 6 |S| = 0, or epsilon (vs. |∑(0)| =1)
5 tuples of deterministic automata
states (Q): Ex. Q = {q1,q2,q3} alphabet (∑): Ex. ∑ = {0,1} transition function: Ex. transition table? QxE ->Q (deterministic: goes only in one state) start state (q1) final state: F= {q2} can be multiple final state. double circle.
dead state
to catch the invalid inputs.
context-free grammar
used in programming languages and AI.