0% found this document useful (0 votes)
9 views1 page

Toc 2

The document discusses finite automata and regular expressions. It defines the components of a finite automaton as an input tape, finite control, and a tape reader. It also defines the Chomsky hierarchy of formal languages, with Type-3 being regular languages recognized by regular expressions. A regular expression for a finite automaton can be obtained by creating equations for each state in terms of transitions and solving them.

Uploaded by

shahalameenu2003
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)
9 views1 page

Toc 2

The document discusses finite automata and regular expressions. It defines the components of a finite automaton as an input tape, finite control, and a tape reader. It also defines the Chomsky hierarchy of formal languages, with Type-3 being regular languages recognized by regular expressions. A regular expression for a finite automaton can be obtained by creating equations for each state in terms of transitions and solving them.

Uploaded by

shahalameenu2003
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/ 1

Using Arden’s Theorem to find Regular 8.

q0 is the initial state


Expression 9. F is the set of final states. If any state
of F is reached,
1. For getting the regular expression for the input string is accepted.
automata we first create equations of the given
form for all the states Extended Chomsky hierarchy
q1 = q1R11 + q2R21 + … + qnRn1 + ε
q2 = q1R12 + q2R22 + … + qnRn2
…………………………
…………………………
qn = q1R1n + q2R2n + … + qnRnn
Rij represents the set of labels of edges from
qi to qj
then we solve these equations to get the
equation for qi in terms of Rij and that
expression is the required solution, where qi is
a final state.

 PARSING According to Chomsky hierarchy, grammars


Parsing is used to derive a string using the are divided of 4 types:
production rules of a grammar. Type 0 known as unrestricted grammar.
It is used to check the acceptability of a string. Type 1 known as context sensitive grammar.
A parser takes the inputs and builds a parse Type 2 known as context free grammar.
tree. Type 3 Regular Grammar.
1)A parser can be of two types − 1. What are the components of a finite
Top-Down Parser  Type 0 ( Unrestricted Grammar ) automaton?
Bottom-Up Parser In Type 0 A finite automaton (FA) is a device that
 TOP DOWN PARSER -Type-0 grammars include all formal recognizes a language (set of strings
1. Top down parsers begin at the start grammars. Finite automata can be represented by input
symbol and construct -Type-0 grammars generate recursively tape , tape reader and finite control.
a derivation forwards to attempt to derive the enumerable languages. Input tape: It is a linear tape having some
given string. -The productions have no restrictions. number of cells.
2. Top-down parsing starts from the top -They generate the languages that are Each input symbol is placed in each cell.
with the start-symbol recognized by a Turing machine. Finite control: The finite control decides the
and derives a string using a parse tree. next state
 BOTTOM UP PARSER  Type - 1 Grammar on receiving particular input from input tape.
1. Top down parsers begin at the start Context-sensitive grammars The tape reader : Reads the cells one by one
symbol and construct a derivation -Type-1 grammars generate context-sensitive from left to right,
forwards to attempt to derive the given string. languages. and at a time only one input symbol is read.
2. Top-down parsing starts from the top -The productions must be in the form
with the start-symbol αAβ→αγβ
and derives a string using a parse tree. where A ∈ N (Non-terminal)
and α, β, γ ∈ (T ∪ N)*
TURING MACHINE -The languages generated by these grammars
Alan Turing proposed the Turing machine are recognized by a linear bounded automaton.
Which is capable of performing any kind of  Type - 2 Grammar
calculation Context-free grammar
that can be performed by any computing -Type-2 grammars generate context-free
machine. languages.
-The productions must be in the form A → γ
where A ∈ N (Non terminal)
and γ ∈ (T ∪ N)*
-These languages generated by these
grammars are be recognized
by a non-deterministic pushdown automaton.
DFA
 Type - 3 Grammar
Regular grammar The transition from a state is to
-Type-3 grammars generate regular languages. a single particular next state for
-Type-3 grammars must have a single non-
terminal on each input symbol. Hence it is
the left-hand side and a right-hand side called deterministic.
consisting of a single
terminal or single terminal followed by a
Empty string transitions are not
single non-terminal. seen in DFA.
A. Turing machine is a finite state -The productions must be in the form X → a
automata. Backtracking is allowed in DFA
or X → aY
B. Turing machine consists of a where X, Y ∈ N (Non terminal) and a ∈ T Requires more space.
temporary storage called input tape.
C.
(Terminal)
The tape is infinite both to the left and -The rule S → ε is allowed if S does not
A string is accepted by a DFA,
to the right. appear on the right side of any rule. if it transits to a final state.
D. Input tape is divided in to number of 10. What is NFA ? NDFA
cells. • In NFA by means of the same input symbol
E. Each cell consists of one symbol. the system can change its state from one
The transition from a state can
F. The symbols present in the tape may state to more than one state. δ(q0,a)={q1,q2}. be to multiple next states for
be a blank symbol or input symbols It can move to either q1 or q2
G. But the blank symbol is not an input • A state can move to the next state without
each input symbol. Hence it is
symbol. having any input symbol. δ(q0,ε )=q1 or called non-deterministic.
H. State register that stores the state of the δ(q0,λ )=q1
Turing machine
In NDFA, backtracking is not
• In NFA, the transition δ(q0,a) may be empty.
I. Finite control consists of finite set of i.e., no transition for this particular state. always possible.
states that may point starting state of Requires less space.
the TM or halt state. Define DFA?
J. A TM is said to be in Halt state A Deterministic Finite Automaton (DFA) is A string is accepted by a NDFA,
whenever transition function is not defined as a 5-tuple (Q, Σ, δ, s, F) if at least one of all possible
defined. consisting of
-A finite set Q (the set of states) transitions ends in a final state.
 Definition of a TM -A finite set of symbols Σ (the input alphabet)
1. A TM is expressed as a 7-tuple (Q, T, -A transition function δ: Q × Σ → Q mapping
B, ∑, δ, q0, B, F) where: the current state
2. Q is a finite set of states q ∈ Q and input symbol a ∈ Σ to a new state
3. T is the tape alphabet (symbols which δ(q, a) ∈ Q
can be written on Tape) -An initial state s ∈ Q (the start state)
4. B is blank symbol -A set of accepting states F (the final states)
5. ∑ is the input alphabet
6. δ is a transition function which maps Q
× T → Q × T × {L,R}.
7. Depending on its present state and
present tape alphabet (pointed by head
pointer),
it will move to new state, change the
tape symbol (may or may not)
and move head pointer to either left or
right.

You might also like