0% found this document useful (0 votes)
121 views6 pages

Introduction of Theory of Computation

Automata theory deals with the logic of computation using simple machines called automata. An automaton enables understanding how machines compute functions and solve problems. Automata theory was developed to analyze the behavior of discrete systems. A finite automaton consists of a finite set of states, a set of input symbols, initial and final states, and a transition function. Finite automata are characterized as deterministic (DFA) or nondeterministic (NFA). In a DFA the transition to the next state depends only on the current state and input symbol, while an NFA can transition to multiple states for a given input. The Chomsky hierarchy divides formal languages into four types based on the type of grammar used to generate them: type

Uploaded by

ammaoo7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views6 pages

Introduction of Theory of Computation

Automata theory deals with the logic of computation using simple machines called automata. An automaton enables understanding how machines compute functions and solve problems. Automata theory was developed to analyze the behavior of discrete systems. A finite automaton consists of a finite set of states, a set of input symbols, initial and final states, and a transition function. Finite automata are characterized as deterministic (DFA) or nondeterministic (NFA). In a DFA the transition to the next state depends only on the current state and input symbol, while an NFA can transition to multiple states for a given input. The Chomsky hierarchy divides formal languages into four types based on the type of grammar used to generate them: type

Uploaded by

ammaoo7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Introduction of Theory of Computation

 Difficulty Level : Easy


  Last Updated : 26 Feb, 2021

Automata theory (also known as Theory Of Computation) is a theoretical branch of


Computer Science and Mathematics, which mainly deals with the logic of computation
with respect to simple machines, referred to as automata. 
Automata* enables the scientists to understand how machines compute the functions and
solve problems. The main motivation behind developing Automata Theory was to
develop methods to describe and analyse the dynamic behavior of discrete systems. 
Automata is originated from the word “Automaton” which is closely related to
“Automation”. 
Now, let’s understand the basic terminologies, which are important and frequently used
in Theory of Computation. 
 Symbol: Symbol(often also called character) is the smallest building
block, which can be any alphabet, letter or any picture. 
 

 Alphabets (Σ): Alphabets are set of symbols, which are always finite. 


 

 String: String is a finite sequence of symbols from some alphabet. String


is generally denoted as w and length of a string is denoted as |w|. 
Note: Σ* is set of all possible strings(often power set(need not be unique
here or we can say multi set) of string) So this implies that language  is a
subset of Σ*.
Empty string is the string with
zero occurrence of symbols,
represented as ε.

 
Number of Strings (of length 2)
that can be generated over the alphabet {a, b} -
- -
a a
a b
b a
b b

Length of String |w| = 2


Number of Strings = 4

Conclusion:
For alphabet {a, b} with length n, number of
strings can be generated = 2n.
 Note – If the number of Σ’s is represented by |Σ|, then number of strings
of length n, possible over Σ is |Σ|n.
 Language: A language is a set of strings, chosen from some Σ* or we
can say- ‘A language is a subset of Σ* ‘. A language which can be formed
over ‘ Σ ‘ can be Finite or Infinite.
Introduction of Finite Automata
 Difficulty Level : Easy
  Last Updated : 18 Sep, 2020

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:
1. Input
2. Output
3. States of automata
4. State relation
5. Output relation
A Finite Automata consists of the following : 
 
Q : Finite set of states.
Σ : set of Input Symbols.
q : Initial state.
F : set of Final States.
δ : Transition Function.
Formal specification of machine is 
{ Q, Σ, q, F, δ }. 
FA is characterized into two types: 
1) Deterministic Finite Automata (DFA)

DFA consists of 5 tuples {Q, Σ, q, F, δ}.


Q : set of all states.
Σ : set of input symbols. ( Symbols which machine takes as input )
q : Initial state. ( Starting state of a machine )
F : set of final state.
δ : Transition Function, defined as δ : Q X Σ --> Q.
In a DFA, for a particular input character, the machine goes to one state only. A
transition function is defined on every state for every input symbol. Also in DFA
null (or ε) move is not allowed, i.e., DFA cannot change state without any input
character. 
For example, below DFA with Σ = {0, 1} accepts all strings ending with 0. 

One important thing to note is, there can be many possible DFAs for a
pattern. A DFA with minimum number of states is generally preferred. 
  
2) Nondeterministic Finite Automata(NFA) 
NFA is similar to DFA except following additional features: 
1. Null (or ε) move is allowed i.e., it can move forward without reading symbols. 
2. Ability to transmit to any number of states for a particular input. 
However, these above features don’t add any power to NFA. If we compare
both in terms of power, both are equivalent. 
Due to above additional features, NFA has a different transition function, rest is
same as DFA. 
δ: Transition Function
δ:  Q X (Σ U ε ) --> 2 ^ Q.
As you can see in transition function is for any input including null (or ε), NFA
can go to any state number of states. 
For example, below is a NFA for above problem 
One important thing to note is, in NFA, if any path for an input string leads
to a final state, then the input string accepted. For example, in above NFA,
there are multiple paths for input string “00”. Since, one of the paths leads to a
final state, “00” is accepted by above NFA. 
  
Some Important Points: 
 
 Justification: 
Since all the tuples in DFA and NFA are the same except for one of the tuples,
which is Transition Function (δ) 
In case of DFA
δ : Q X Σ --> Q
In case of NFA
δ : Q X Σ --> 2Q
Now if you observe you’ll find out Q X Σ –> Q is part of Q X Σ –> 2 Q.
In the RHS side, Q is the subset of 2 Q which indicates Q is contained in 2 Q or Q
is a part of 2Q, however, the reverse isn’t true. So mathematically, we can
conclude that every DFA is NFA but not vice-versa. Yet there is a way to
convert an NFA to DFA, so there exists an equivalent DFA for every NFA. 
 
1. Both NFA and DFA have same power and each NFA can be translated into a
DFA. 
2. There can be multiple final states in both DFA and NFA. 
3. NFA is more of a theoretical concept. 
4. DFA is used in Lexical Analysis in Compiler. 

Chomsky Hierarchy in Theory of


Computation
 Difficulty Level : Easy
  Last Updated : 19 Feb, 2021
According to Chomsky hierarchy, grammars are divided of 4 types: 
Type 0 known as unrestricted grammar.
Type 1 known as context sensitive grammar.
Type 2 known as context free grammar.
Type 3 Regular Grammar.

Type 0: Unrestricted Grammar: 


In Type 0 
Type-0 grammars include all formal grammars. Type 0 grammar language are
recognized by turing machine. These languages are also known as the
Recursively Enumerable languages. 
Grammar Production in the form of 

where 

is ( V + T)* V ( V + T)* 
V : Variables 
T : Terminals. 

You might also like