TECHNO NJR INSTITUTE OF TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
B.TECH. IV SEMESTER
SUBJECT : THEORY OF COMPUTATION
Dr. Naresh Mali
1.Introduction to Theory of Computation.
2.Finite Automata.
3.Symbol, Alphabet, String.
4.Closure Representation in TOC.
5.Automaton.
6.Regular Expression.
Introduction To Theory of Computation:- Theory of computation is based on
mathematical Computations. These computation are used to represent various
mathematical models. In this subject we will study many interesting model such
as finite automata, push down automata and Turing machine.
The automata that can be defined as the theory of models. Working of every
process can be represented by means of models. The models helps in
representing the concept of every activity. The logic and behaviour of such
model can be well understood with the help of proof.
Finite Automata(FA) :is the simplest machine to recognize patterns. It is used to characterize a
Regular Language, for example: /baa+!/. Also it is used to analyze and recognize Natural
language Expressions. The finite automata or finite state machine is an abstract machine that has
five elements or tuples. It has a set of states and rules for moving from one state to another but it
depends upon the applied input symbol. Based on the states and the set of rules the input string
can be either accepted or rejected. Basically, it is an abstract model of a digital computer which
reads an input string and changes its internal state depending on the current input symbol. Every
automaton defines a language i.e. set of strings
The above figure shows the following features of automata:
1. Input
2. Output
3. States of automata
4. State relation
5. Output relation
Features of Finite Automata
•Input: Set of symbols or characters provided to the machine.
•Output: Accept or reject based on the input pattern.
•States of Automata: The conditions or configurations of the machine.
•State Relation: The transitions between states.
•Output Relation: Based on the final state, the output decision is made.
Symbol:-A symbol (often also called a character) is the smallest building block, which can be any alphabet, letter,
Alphabets (Σ):
Alphabets are a set of symbols, which are always finite.
String:
A string is a finite sequence of symbols from some alphabet. A string is generally denoted as w and the
length of a string is denoted as |w|.
Empty string is the string with
zero occurrence of symbols,
represented as epsilon ε.
Number of Strings (of length 2)
that can be generated over the alphabet {a, b}:
--
aa
ab
ba
bb
Length of String |w| = 2
Number of Strings = 4
Conclusion:
For alphabet {a, b} with length n, number of
strings can be generated = 2n
Closure Representation in TOC:
L+: It is a Positive Closure that represents a set of all strings except Null or ε-
strings.
L*: It is “Kleene Closure“, that represents the occurrence of certain alphabets for
given language alphabets from zero to the infinite number of times. In which ε-
string is also included.
From the above two statements, it can be concluded that:
Language:
A language is a set of strings, chosen from some Σ* or we can say- ‘A
language is a subset of Σ* ‘. A language that can be formed over ‘ Σ ‘
can be Finite or Infinite.
Example of Finite Language:
L1 = { set of string of 2 }
L1 = { xy, yx, xx, yy }
Example of Infinite Language:
L1 = { set of all strings starts with 'b' }
L1 = { babb, baa, ba, bbb, baab, ....... }
Automaton:- An Automaton is an abstract model of digital computer. An
automaton has a mechanism to read input from input tape. Any language is
recognized by some automaton. Hence these automaton are basically language
acceptor or language recognizers.
The study of theory of automata start with finite automata. Basically there are two
types of languages regular language or non regular languages. The finite automata
is a mathematical model which always accepts regular languages.
Regular Expression:-a simple expression that describes the language accepted by a
finite automata.