Introduction of Finite Automata


Finite Automata(FA) is the simplest machine to recognize patterns.The finite automata or finite state machine is an abstract machine which have five elements or tuple. It has a set of states and rules for moving from one state to another but it depends upon the applied input symbol. Basically it is an abstract model of digital computer. Following figure shows some essential features of a general automation.

The above figure shows following features of automata: Input, Output, States of automata, State relation, Output relation.

Deterministic Finite Automaton (DFA)

In DFA, for each input symbol, one can determine the state to which the machine will move. Hence, it is called Deterministic Automaton. As it has a finite number of states, the machine is called Deterministic Finite Machine or Deterministic Finite Automaton.

NFA (Non-Deterministic finite automata)

NFA stands for non-deterministic finite automata. It is easy to construct an NFA than DFA for a given regular language. The finite automata are called NFA when there exist many paths for specific input from the current state to the next state. Every NFA is not DFA, but each NFA can be translated into DFA. NFA is defined in the same way as DFA but with the following two exceptions, it contains multiple next states, and it contains ε transition.

Context-Free Grammar

A context-free grammar (CFG) consisting of a finite set of grammar rules is a quadruple (N, T, P, S) where N is a set of non-terminal symbols. T is a set of terminals where N ∩ T = NULL. P is a set of rules, P: N → (N ∪ T)*, i.e., the left-hand side of the production rule P does have any right context or left context. S is the start symbol.

Chomsky's Normal Form (CNF)

CNF stands for Chomsky normal form. A CFG(context free grammar) is in CNF(Chomsky normal form) if all production rules satisfy one of the following conditions: Start symbol generating ε. For example, A → ε. A non-terminal generating two non-terminals. For example, S → AB. A non-terminal generating a terminal. For example, S → a.

Greibach Normal Form (GNF)

GNF stands for Greibach normal form. A CFG(context free grammar) is in GNF(Greibach normal form) if all the production rules satisfy one of the following conditions: A start symbol generating ε. For example, S → ε. A non-terminal generating a terminal. For example, A → a. A non-terminal generating a terminal which is followed by any number of non-terminals. For example, S → aASB.

Pushdown Automata

A Pushdown Automata (PDA) can be defined as : Q is the set of states ∑is the set of input symbols Γ is the set of pushdown symbols (which can be pushed and popped from stack) q0 is the initial state Z is the initial pushdown symbol (which is initially present in stack) F is the set of final states δ is a transition function which maps Q x {Σ ∪ ∈} x Γ into Q x Γ*. In a given state, PDA will read input symbol and stack symbol (top of the stack) and move to a new state and change the symbol of stack.

Non-deterministic Pushdown Automata

The non-deterministic pushdown automata is very much similar to NFA. We will discuss some CFGs which accepts NPDA. The CFG which accepts deterministic PDA accepts non-deterministic PDAs as well. Similarly, there are some CFGs which can be accepted only by NPDA and not by DPDA. Thus NPDA is more powerful than DPDA.

CFG to PDA Conversion

The first symbol on R.H.S. production must be a terminal symbol. The following steps are used to obtain PDA from CFG is: Step 1: Convert the given productions of CFG into GNF. Step 2: The PDA will only have one state {q}. Step 3: The initial symbol of CFG will be the initial symbol in the PDA. Step 4: For non-terminal symbol, add the following rule: δ(q, ε, A) = (q, α) Where the production rule is A → α Step 5: For each terminal symbols, add the following rule:

Turing Machine

It has an external memory which remembers arbitrary long sequence of input. It has unlimited memory capability. The model has a facility by which the input at left or right on the tape can be read easily. The machine can produce a certain output based on its input. Sometimes it may be required that the same input has to be used to generate the output. So in this machine, the distinction between input and output has been removed. Thus a common set of alphabets can be used for the Turing machine.

Introduction to Undecidability

In the theory of computation, we often come across such problems that are answered either 'yes' or 'no'. The class of problems which can be answered as 'yes' are called solvable or decidable. Otherwise, the class of problems is said to be unsolvable or undecidable.

Rice Theorem

Rice theorem states that any non-trivial semantic property of a language which is recognized by a Turing machine is undecidable. A property, P, is the language of all Turing machines that satisfy that property.

NP-Completeness

NP complete problems are problems whose status is unknown. No polynomial time algorithm has yet been discovered for any NP complete problem, nor has anybody yet been able to prove that no polynomial-time algorithm exist for any of them. The interesting part is, if any one of the NP complete problems can be solved in polynomial time, then all of them can be solved.