1 / 17

Lecture no. 4

Lecture no. 4. FINITE AUTOMATA. Review Languages Operations on languages Automata FA-Finite Automata DFA. Languages. ∑* is the se t of all strings on ∑. Denoted by. E.g : ∑={ a,b,c } ∑*={ λ , a, b, c, aa , ab , ac, ba , …} ∑ + is the set of all strings except ?

portia
Download Presentation

Lecture no. 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture no. 4 FINITE AUTOMATA Naveen Z Quazilbash

  2. Review • Languages • Operations on languages • Automata • FA-Finite Automata • DFA Naveen Z Quazilbash

  3. Languages • ∑* is the set of all strings on ∑. • Denoted by. • E.g: ∑={ a,b,c} • ∑*={ λ, a, b, c, aa, ab, ac, ba, …} • ∑+is the set of all strings except ? • Note: ∑* and ∑+ are infinite. Naveen Z Quazilbash

  4. A language is a subset of ∑*, usually denoted by L. • It may be finite or infinite. • Examples: • { a, ba, abc} • {λ, a, aa, aaa, …} • Φ • If a string w is in L, we say that w is a sentence of L. Naveen Z Quazilbash

  5. Operations on Languages • Union • Intersection • Difference • Complementation • Reverse • Concatenation • Power • Star Closure • Positive Closure Naveen Z Quazilbash

  6. Automata • An “Automaton” is an abstract model of a computer, which accepts some input (a string), produces output (yes/no or a string) and may have internal storage (usually a stack or a tape) • An automaton operatse in a distcrete time frame( like a real computer). Naveen Z Quazilbash

  7. Some definitions related to Automata • A particular state of the automaton including the state of the CU, input and storage is called a Configuration. • The transaction from a configuration to the next one is a Move. • If the output is yes/no, the automaton is an Acceptor. • If the output is a string, the automaton is a Transducer. Naveen Z Quazilbash

  8. FA-Finite Automata Naveen Z Quazilbash

  9. DEFINITION Resource: Introduction To Computer Theory by Denial Cohen A finite automaton is a collection of three things: 1. A finite set of states, one of which is designated as the initial state, called the start state, and some (maybe none) of which are designated as final states. 2. An alphabet ∑ of possible input letters, from which are formed strings, that are to be read one letter at a time. 3. A finite set of transitions that tell for each state and for each letter of the input alphabet which state to go to next.

  10. FOR EXAMPLE Resource: Introduction To Computer Theory by Denial Cohen 1. From state x and input a go to state y. 2. From state x and input b go to state z. 3. From state y and input a go to state x. 4. From state y and input b go to state z. 5. From state z and any input stay at state z.

  11. Transition Table Resource: Introduction To Computer Theory by Denial Cohen Lets make The transition table for the FA we have described.

  12. FA Resource: Introduction To Computer Theory by Denial Cohen

  13. FA for language defined over ∑={a,b} of all strings starting with ‘b’. Resource: Virtual University of Pakistan

  14. Different FA’s FA for language defined over ∑={a,b} of all strings ending in ‘a’. FA for language of all words starting with a. FA for language of all words ending with b. FA for language of all words of even length.

  15. Languages starting with ‘b’. Languages of all words having Even length. Languages of all words ending in ‘a’.

  16. DFA- Deterministic Finite Automata/Acceptor • An automata without internal storage, gives yes/no output. • States • Initial state • Final state • Transition function • Extended transition function Naveen Z Quazilbash

  17. DFA • Formal definition: • It’s a five tuple: • Q= set of states. • ∑= input alphabet. • δ= transition function. • q0= initial state. • F= set of final states. Naveen Z Quazilbash

More Related