The Branch of Computer Science That Deals With How Efficiently The Problem Can Be Solved On A Model of Computation, Using An Algorithm
The Branch of Computer Science That Deals With How Efficiently The Problem Can Be Solved On A Model of Computation, Using An Algorithm
Definitions:
Symbol: It is a character. e.g, a,b,c,1,2,3,+,- etc.
Empty String: The string with zero occurance of symbols. It is denoted by 'E'.
· Reversal = Lr ,{wr,w is in L}
Formal definition:
A finite automata is a five tuple which are
q0 : initial state
F: Final state
Transition diagram:
It is a directed graph associated with the vertices of the graph corresponds to the
state of finite automata.
Transition table:
It is tabular representation of the transition function that takes two
arguments (a state and a symbol) and returns a value(the next state).
rows - states
Applications:
· compiler design
· In DFA, there is only one path for specific input from the current state to the
next state.
· DFA does not accept the null move, i.e, DFA cannot change state withour
any input characters.
· DFA can contain multiple final states. It is used in lexical analysis in compiler.
Acceptance of language:
· The FA are called NFA, when there exist many paths for specific i/p
from the current state to the next state.
· Every NFA is not DFA, but each NFA can be translaed into DFA.
· NFA is defined in the same way as DFA, but with two exceptions,
Transition function:
next state posiblity is power set.
Acceptance by NFA:
while converting, multiple states are considered as one state and there
can be atleast 1 and atmost 2m states in DFA.
Regular language:
A language is regular if
· empty
· infinite but remembering the order and no comparison and no
counting.
REGULAR EXPRESSION:
· A way of representing RL
like a* , a+,a.b(concat),a+b(union)
Grammer
Grammer is defined by a quadruple
G = { sigma,Vn, P, S}
S = start symbol
Chomsky hierarchy:
q0 = initial state .
Turing Machine:
Q = set of states.
q0 = intitial state
B = blank symbol