Automata and Formal language Huynh Viet Linh vietlinh@cse.hcmut.edu.vn Ngày 13 tháng 9 năm 2009 Huynh Viet Linh Automata and Formal language... Course Outline Chapter 1: Introduction Cha
Trang 1Automata and Formal language
Huynh Viet Linh
vietlinh@cse.hcmut.edu.vn
Ngày 13 tháng 9 năm 2009
Huynh Viet Linh Automata and Formal language
Trang 3Course Outline
Chapter 1: Introduction
Chapter 2: Finite Automata
Chapter 3: Regular Language and Regular GrammarChapter 4: Properties of Regular Language
Chapter 5: Context-Free Grammar
Chapter 6: Simplification of Context-Free GrammarChapter 7: Pushdown Automata
Huynh Viet Linh Automata and Formal language
Trang 7Required Background
Set andGraph Theory
Inductionand Contradiction-basedMethods
Huynh Viet Linh Automata and Formal language
Trang 10P = {a,b}
P ∗
= {λ,a,b,aa,ab,aaa,abb, }
w = abaaabba is a string of P
Trang 11w = aabba is a string of P but not a sentence of L.
Huynh Viet Linh Automata and Formal language
Trang 14Closure Operators
Star-Closure: L∗= L0∪ L1∪ L2
Positive-Closure: L+= L1∪ L2
Trang 15<noun> → boy | dog
<verb> → runs | walks
Huynh Viet Linh Automata and Formal language
Trang 16Formal Grammar
Formal grammar:
G = (V , T , S , P)V: finite set of variables
T: finite set of terminal symbols
S ∈ V: start variable
P: finite set of productions
Trang 17Formal Grammar
Productions: x → y, x ∈ (V ∪ T )+, y ∈ (V ∪ T )∗Example 5:
Trang 19Directly Derive
Example 6: For the grammar given in example 5
S ⇒ aSb ⇒ aaSbb ⇒ aabb
S ⇒∗ aabb
Huynh Viet Linh Automata and Formal language
Trang 21Derivation
S ⇒ w1 ⇒ w2 ⇒ ⇒ wn ⇒ w ∈ L(G)
Example 8:
S ⇒ aSb ⇒ aaSbb ⇒ aabb is a derivation
Huynh Viet Linh Automata and Formal language
Trang 22"Anautomaton(plural: automata) is a self-operatingmachine The word is sometimes used to describe a robot,more specifically an autonomous robot Used colloquially, itrefers to a mindless follower." (Wiki)
An abstract modelof digital computer
Trang 23AutomataAutomaton Structure
Huynh Viet Linh Automata and Formal language
Trang 24AutomataInput File
Input file: is
Divided into squares or cells , each of which holds a symbol of the alphabet.
The symbols are to be read from left to right.
The end of input file is detectable.
The automaton cannot change the contents of the input file.
Trang 25A device consisting of unlimited cells
Each cell hold a symbol from an alphabet (it is not necessary
to be the same alphabet as the input one)
The automaton can read and change the storage cells
Huynh Viet Linh Automata and Formal language
Trang 26AutomataControl Unit
Having a finite set of internal states
Can be any one of its internal states
Can change from one internal state to other
Trang 27AutomataAutomation Operations
Transition function:
current state × input symbol × storage info → next stateOutput may be produced
Info in the storage may be changed
Configuration: current state × input symbol × storage infoMove: current configuration → next configuration
Huynh Viet Linh Automata and Formal language
Trang 28AutomataAutomaton Types
Accepter: yes/no output
Transducer:string of symbols as output
Deterministic: single possible move at one pointNon-deterministic: multiple possible moves