Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Successfully reported this slideshow.

Like this presentation? Why not share!

- Introduction to fa and dfa by deepinderbedi 18086 views
- Theory of computation Lec3 dfa by Arab Open Univers... 4390 views
- Turing machines by lavishka_anuj 30181 views
- Finite automata intro by lavishka_anuj 7048 views
- Turing machine by_deep by Deepjyoti Kalita 41919 views
- Chapter 5: Names, Bindings and Scop... by Farwa Ansari 5247 views

Finite Automata

Author, Online Course Developer, Online Tutor, Learner and Teacher of Physics & Computer Science

No Downloads

Total views

39,583

On SlideShare

0

From Embeds

0

Number of Embeds

797

Shares

0

Downloads

1

Comments

0

Likes

56

No notes for slide

- 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. <ul><li>Test if a string matches some pattern. </li></ul><ul><li>Scan for virus signatures. </li></ul><ul><li>Process natural language. </li></ul><ul><li>Search for information using Google. </li></ul><ul><li>Search for markers in human genome. </li></ul><ul><li>Access information in digital libraries. </li></ul><ul><li>Search-and-replace in a word processors. </li></ul><ul><li>Filter text (spam, NetNanny). </li></ul><ul><li>Validate data-entry fields (dates, email, URL, credit card). </li></ul>Why study regular expression and DFA?
- 4. Deterministic Finite Automata <ul><li>Theoreticians have developed a number of theoretical models to describe "computing" </li></ul><ul><li>Simplest model is known as a DFA </li></ul><ul><li>Deterministic : Machine will be in a state. Upon receipt of a certain symbol, it will go to a known state </li></ul><ul><li>Finite : The machines only have a certain number of states </li></ul><ul><li>Automata : Machine, robot </li></ul>
- 5. DFA's <ul><li>DFA's recognize strings. </li></ul><ul><li>If the input ends and the DFA is in an accept state then the string is "recognized" </li></ul><ul><li>A "language" can be described as a set of strings </li></ul><ul><li>A language is called a regular language if some finite automaton recognizes it. </li></ul><ul><li>There is a precise mathematical definition of exactly what is meant by a finite automaton </li></ul>
- 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 <ul><li>Design a DFA to recognize strings that start out with k zeros followed by k ones. </li></ul><ul><li>Design a DFA to recognize strings with an equal number of ones and zeros. </li></ul><ul><li>Design a DFA to recognize strings with an equal number of strings "01" and "10". Impossible? </li></ul><ul><ul><li>1 yes </li></ul></ul><ul><ul><li>2 No </li></ul></ul>
- 18. Actually the third one is regular! DFA to recognize strings with an equal number of strings "01" and "10" 0 0 0 0 0 1 1 1 1 1 1 0 1 0

No public clipboards found for this slide

Be the first to comment