0% found this document useful (0 votes)
3 views

Unit_2

The document provides an overview of finite automata, including definitions, applications, and acceptance criteria for both deterministic and nondeterministic finite automata. It also discusses Kleene's theorem, which states that any regular language can be accepted by a finite automaton, and outlines the recursive definition of regular expressions. Additionally, it details the transition functions and the construction of languages from finite automata.

Uploaded by

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

Unit_2

The document provides an overview of finite automata, including definitions, applications, and acceptance criteria for both deterministic and nondeterministic finite automata. It also discusses Kleene's theorem, which states that any regular language can be accepted by a finite automaton, and outlines the recursive definition of regular expressions. Additionally, it details the transition functions and the construction of languages from finite automata.

Uploaded by

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

+

Q2
1
Q
~@
b

3 ,

y:
..
,
, l I
'
Sj~itl b
.r\-o-b \l, fof 'Fir l!A I

.Ste..p-\ -r',., q "() 011 cf() (__ µr,\)

c..... b
h
\
~~,3 .j 1-t;j . .
1 'C!p 11,
3
3
)l- 1' q; (j)

t>( 2- ,c. ) \J I> (3 ,u)


rp ·-. u 11
\ . '
S ('2-\ b) : U S (~,b) I

'· '
" '· ?- -4 () 3.
- -lJ:,, 3 j
tt,_\<_ e__ pCJJ' h, .l_ 1,_ I 3 j (9
@) ( 6 lti,3) ,4 ) - -~u"u) u.su,,,o)

,,..
- g Clt l b) \) ~( 3, h J
-
).
,,
.
U3
-- 3 .
'
T'h CJ 'n s ~'er() ta--1, le.., fr«
' '
D F,4 ,
f-uy 11 p 5J rnb~ qi b . --

t) a___ b
l2.,~~ 11 .

i., 3 j llt \ 5j
• I

-~-~1~.3 .y 3 '

Lt
I
·3
3

',t-½
'
'tp

st e...(> Oh C,lc..0 , · I K~t D f-A_.__LL

.
b
f>-_
C.y_~0~'1'\t ,: \ p 5::lrn.bv-1 •
S'~e..
0 \
.. r--____
- -

©o ©, {Qo I °'2__

C\ . (Q 0

t CD,_,
~t, -

• > 0 ~&o ,c9z_)

-LCQ0,CQ2.J . 0 ,CQ \ j {©o ,CS22-)

~<9of(Q_lj
~QI 1 (QLJ ({10 J ©2- J
·r.p. 0
{(9 l' (]L} tCQo 1 ©z
©.1 ;
©2- COo

)I: CQ 'l- (QO ¢


¢ (/)
(p
\
l
I
Semester -VI 42

Theory Of Computation 2160704

TOC
Semester -VI 43

Theory Of Computation 2160704

TOC
Semester -VI 44

Theory Of Computation 2160704

TOC
Semester -VI 45

Theory Of Computation 2160704

TOC
Semester -VI 46

Theory Of Computation 2160704

TOC
Semester -VI 47

Theory Of Computation 2160704

TOC
Semester -VI 48

Theory Of Computation 2160704

TOC
Semester -VI 49

Theory Of Computation 2160704

TOC
Semester -VI 50

Theory Of Computation 2160704

TOC
Definition of Finite Automata:

A finite Automata or finite state machine is a 5-tuple(Q,∑,q0,A,δ) where,


Q is finite set of states;
∑ is finite alphabet of input symbols;
q0 ∈ Q (Initial state);
A (set of accepting states);
δ is a function from Q×∑Q(Transition function);
For any element q of Q and any symbol a ∈ ∑, we interpret δ (q, a) as the state to
which the Finite Automata moves, if it is in state q and receives the input a.
Application of finite automata

A finite automaton is used to solve several common types of computer algorithm.


Some of them
are:
1. Design of digital circuit.
2. String matching.
3. Communication protocols for information exchange.
4. Lexical analysis phase of a compiler.

The Extended transition function δ* for FA.


Let M= (Q,∑,q0,A,δ) be an Finite Automata. We define the function δ*: Q×∑*Q as
follow:
1) For any q ∈ Q, δ*(q,^)=q
2) For any q ∈ Q, y ∈ ∑*, and a ∈ ∑
δ*(q, ya)= δ(δ*(q, y),a)
Acceptance by a Finite Automata.
Let M= (Q1, ∑, q0, A, δ) be an FA. A string x ∈ ∑* is accepted by M if δ*(q0, x) ∈ A. If string
is not accepted, we can say it is rejected by M. The language accepted by M, or the
language recognized by M, is the set L(M) = {x ∈ ∑*/x is accepted by M} If L is any
Language over ∑, L is accepted or recognized by M if and only if L=L(M).
Definition: Nondeterministic Finite Automata.
A nondeterministic finite automaton (NFA) is a 5-tuple (Q,Ʃ,q0,A,δ)
Where Q and Ʃ are nonempty
finite sets, q0 ∈Q, A ⊆Q, and δ : Q × Ʃ2Q
Q is a finite set of states;
Ʃ is a finite set of input alphabets;
q0 ∈Q is the initial state;

A ⊆ Q is the set of accepting states;


δ :Q × Ʃ →2Q is the transition function.

Definition: Recursive Definition of δ* for an NFA


Let M=(Q,Ʃ, q0,A, δ), be an NFA. The function δ*: Q × Ʃ* 2Q is defined as follows.
1) For any q ∈ Q, δ*(q, Λ) = {q}.

2) For any q ∈ Q, y ∈Ʃ*, and a ∈Ʃ,

Definition: Acceptance by an NFA


Let M= (Q,Ʃ,q0,A,δ) be an NFA. The string x ∈Ʃ* is accepted by M if δ*(q0, x) ∩ A≠Ø. The
language recognized, or accepted, by M is the set L(M) of all string accepted by M. For any
language L ⊆ Ʃ*, L is recognized by M if L= L(M).

Definition: Nondeterministic Finite Automata- Λ:


A nondeterministic finite automaton (NFA)-null is a 5-tuple (Q,Ʃ,q0,A,δ)
Where Q and Ʃ are nonempty
finite sets, q0 ∈Q, A ⊆Q, and δ : Q × Ʃ2Q
Q is a finite set of states;
Ʃ is a finite set of input alphabets;
q0 ∈Q is the initial state;

A ⊆ Q is the set of accepting states;


δ :Q × × (Ʃ∪ { Λ }) →2Q is the transition function.
Theorem 1 (Kleene's theorem): Any regular language is accepted by a finite
automaton.

Proof: This is going to be proven by (general) induction following the recursive


definition of regular language.

Basis Step: As shown below the languages , { } and { a } for any symbol a
in are accepted by an FA.

Inductive Step: We are going to show that for any languages L1 and L2 if they are
accepted by FAs, then L1 L2 , L1L2 and L1* are accepted by FAs. Since any regular
language is obtained from { } and { a } for any symbol a in by using union,
concatenation and Kleene star operations, that together with the Basis Step would
prove the theorem.
Suppose that L1 and L2 are accepted by FAs M1 = < Q1 , , q1,0 , 1 , A1 > and M2 = <

Q2 , , q2,0 , 2 , A2 > , respectively. We assume that Q1 Q2 = without loss of


generality since states can be renamed if necessary.
Then L1 L2 , L1L2 and L1* are accepted by the FAs Mu = < Qu , , qu,0 , u , Au > , Mc = <
Qc , , qc,0 , c , Ac > and Mk = < Q2 , , qk,0 , k , Ak > , respectively, which are given
below.

Mu = < Q u , , qu,0 , u , Au > :

Qu = Q1 Q2 { qu,0 } , where qu,0 is a state which is neither in Q1 nor in Q2 .


u = 1 2 { (qu,0, , { q1,0 , q2,0 } ) } , that is u(qu,0, ) = { q1,0 , q2,0 } . Note

that u(qu,0, a ) = for all a in .


Au = A1 A2

Mc = < Q c , , qc,0 , c , Ac > :

Qc = Q1 Q2
qc,0 = q1,0

c= 1 2 { (q, , { q2,0 } ) | q A1 }
Ac = A2

Mk = < Q k , , qk,0 , k , Ak > :

Qk = Q1 { qk,0 } , where qk,0 is a state which is not in Q1 .

k= 1 { (qk,0, , { q1,0 } ) } { (q, , { qk,0 } ) | q A1 }


Ak = { qk,0 }
These NFA- s are illustrated below.
Regular Languages over an Alphabet
If is an alphabet, the set R of regular languages over is defined as
follows.

1. The language ∅ is an element of R, and for every a ∈ , the language {a} is in R.


2. For any two languages L1 and L2 in R, the three languages
L1 ∪ L2, L1L2, and L1∗ are elements of R.

Regular expression

Regular expressions are used to denote regular languages. They can represent
regular languages and operations on them.
The set of regular expressions over an alphabet is defined recursively as below.
Any element of that set is a regular expression.
1. ∅ ,^ and a are regular expressions corresponding to languages ∅ , { }and
{a}, respectively, where a is an element of .
2. If r and s are regular expressions corresponding to languages Lr and Ls ,
then ( r + s ) , ( rs ) and ( r*) are regular expressions corresponding to
languages Lr ∪ Ls , LrLs and Lr* , respectively.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy