Presentation is loading. Please wait.

Presentation is loading. Please wait.

Finite Automata.

Similar presentations


Presentation on theme: "Finite Automata."— Presentation transcript:

1 Finite Automata

2 Finite automata are recognizers
A recoganizer for a language L is a program that takes as input a string x and answers “yes” if x is a sentence of L and “no ” otherwise. Finite automata can be : Nondeterministic finite automata (NFA) no restrictions on the labels of their edges. A symbol can label several edges out of the same state, and , the empty string, is a possible label. Deterministic finite automata (DFA) for each state, and for each symbol of its input alphabet exactly one edge with that symbol leaving that state. 2

3 Nondeterministic Finite Automata
A nondeterministic finite automaton (NFA) consists of: A finite set of states S. A set of input symbols Σ (the input alphabet). empty string, is never a member of Σ. A transition function that maps state-symbol pairs to sets of states. A state S0 that is distinguished as the start state (or initial state). A set of states F, that is distinguished as the accepting states (or final states).

4 which recognizes the language (a/b)*abb
An NFA can be represented diagrammatically by a labelled directed graph transition graph (transition diagram). nodes represents states and the labelled edges represent the transition function Eg for NFA- which recognizes the language (a/b)*abb a 2 1 3 b start The language defined (or accepted) by an NFA is the set of strings labeling some path from the start to an accepting state.

5 Transition table for NFA of regular expression (a/b)*abb
The transitions of an NFA can be represented in tabular form called transition table Transition table for NFA of regular expression (a/b)*abb In transition table ,there is a row for each state, and a column for each input symbol and є The entry for row i and symbol a is the set of possible next states that can be reached from state i on input a. state Input symbol a b {0,1} {0} 1 {2} 2 {3}


Download ppt "Finite Automata."

Similar presentations


Ads by Google