• Save
Upcoming SlideShare
×
Like this presentation? Why not share!

Like this? Share it with your network

Share

# Finite Automata

• 25,965 views

Finite Automata

Finite Automata

More in: Education , Technology
• Comment goes here.
Are you sure you want to
Your message goes here
• The website address mentioned on this presentation is no longer my addess. My new email address: mukeshtekwani@outlook.com
Are you sure you want to
Your message goes here

Total Views
25,965
On Slideshare
25,203
From Embeds
762
Number of Embeds
7

Shares
0
1
Likes
6

### Embeds762

 http://bsc-it-compsc.blogspot.in 439 http://bsc-it-compsc.blogspot.com 263 http://www.slideshare.net 55 http://www.myexamnotes.com 2 http://translate.googleusercontent.com 1 http://www.google.co.in 1 http://bsc-it-compsc.blogspot.nl 1

### Report content

No notes for slide

### Transcript

• 1. Finite Automata Mukesh N. Tekwani Elphinstone College Mumbai, India 2006 Finite Automata Finite Automata
• 2. Nondeterministic Finite Automata A nondeterministic finite automata (NFA) is collection of 5 things or 5 tuple: A set of states S. A set of input symbols ∑ (alphabet) A transition function δ that maps state-symbol pairs to sets of states. A state S 0 (sometimes denoted by Q 0 ) called as the start state or initial state . A set of states F called as the accepting states or final states . An accepting state is denoted by a double circle.
• 3.
• Test if a string matches some pattern.
• Scan for virus signatures.
• Process natural language.
• Search for information using Google.
• Search for markers in human genome.
• Access information in digital libraries.
• Search-and-replace in a word processors.
• Filter text (spam, NetNanny).
• Validate data-entry fields (dates, email, URL, credit card).
Why study regular expression and DFA?
• 4. Deterministic Finite Automata
• Theoreticians have developed a number of theoretical models to describe &quot;computing&quot;
• Simplest model is known as a DFA
• Deterministic : Machine will be in a state. Upon receipt of a certain symbol, it will go to a known state
• Finite : The machines only have a certain number of states
• Automata : Machine, robot
• 5. DFA's
• DFA's recognize strings.
• If the input ends and the DFA is in an accept state then the string is &quot;recognized&quot;
• A &quot;language&quot; can be described as a set of strings
• A language is called a regular language if some finite automaton recognizes it.
• There is a precise mathematical definition of exactly what is meant by a finite automaton
• 6. Parts of a DFA 1 0 1 1 0 accept state transition start state The alphabet for this example is {0, 1}. Each state has a transition for every symbol in the alphabet 2
• 7. DFA Examples Example. 1 Accept all strings that end in a 1 q 0 q 1 0 1 1 0 Start
• 8. DFA Examples Strings with an odd number of ones. Even Odd 0 0 1 1 Start
• 9. DFA Examples Strings containing the substring 001 '001' 0 0 1 1 '0' '00' 0 1 0,1
• 10. Finite State Machine (DFA) 0 1 2 3 4 start h e 5 6 8 9 7 ACCEPTED State Machine that recognizes the strings “ he”, “hers”, “his”, and “she”
• 11. Finite State Machine (DFA) State Machine that recognizes the strings “ he”, “hers”, “his”, and “she” 0 1 2 3 4 start h e 5 6 8 9 7 ACCEPTED r s
• 12. Finite State Machine (DFA) 0 1 2 3 4 start h 5 6 8 9 7 ACCEPTED i s State Machine that recognizes the strings “ he”, “hers”, “his”, and “she”
• 13. Finite State Machine (DFA) 0 1 2 3 4 start 5 6 8 9 7 ACCEPTED s h e State Machine that recognizes the strings “ he”, “hers”, “his”, and “she”
• 14. Finite State Machine (DFA) 0 1 3 2 start 4 A DFA that recognizes the strings “ and”, & “any” a n d ACCEPTED y
• 15. Finite State Machine (DFA) 0 1 3 2 start 4 A DFA that recognizes the strings “ and”, & “any” a n ACCEPTED
• 16. Nondeterministic Finite Automata 0 start A NFA that recognizes the strings “and”, & “any” n 1 2 3 4 5 6 d n y a a
• 17. Examples
• Design a DFA to recognize strings that start out with k zeros followed by k ones.
• Design a DFA to recognize strings with an equal number of ones and zeros.
• Design a DFA to recognize strings with an equal number of strings &quot;01&quot; and &quot;10&quot;. Impossible?
• 1 yes
• 2 No
• 18. Actually the third one is regular! DFA to recognize strings with an equal number of strings &quot;01&quot; and &quot;10&quot; 0 0 0 0 0 1 1 1 1 1 1 0 1 0