100% found this document useful (2 votes)
4K views10 pages

TOC - Central Concept of Automata Theory

Automata theory deals with finite state machines and their applications. Key concepts include alphabets (finite sets of symbols), strings (finite sequences of symbols), languages (sets of strings), and automata (finite state machines). There are two main types of automata: deterministic finite automata (DFAs) which have a single transition function, and nondeterministic finite automata (NFAs) which can have multiple transition functions. While NFAs are more succinct, any NFA can be converted to an equivalent DFA using the subset construction which doubles the number of states.

Uploaded by

Dilshad Pt
Copyright
© Attribution Non-Commercial (BY-NC)
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
100% found this document useful (2 votes)
4K views10 pages

TOC - Central Concept of Automata Theory

Automata theory deals with finite state machines and their applications. Key concepts include alphabets (finite sets of symbols), strings (finite sequences of symbols), languages (sets of strings), and automata (finite state machines). There are two main types of automata: deterministic finite automata (DFAs) which have a single transition function, and nondeterministic finite automata (NFAs) which can have multiple transition functions. While NFAs are more succinct, any NFA can be converted to an equivalent DFA using the subset construction which doubles the number of states.

Uploaded by

Dilshad Pt
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 10

Central Concept of Automata Theory

7/20/2011

Vinayan Lr in IT

Concepts
Alphabets
->alphabet is finite, non-empty symbols 1. ={0,1}, binary alphabet 2. ={a,b,z} lower case letters

Strings
->Finite sequence of symbols chosen from alphabet ->01101 is a string from binary alphabet ={0,1}

Empty String String with 0 occurrence of symbols , denoted Length of a String


01101 has length 5 (no of symbols) notation |w| Eg.|011|=3 and | |=0

Power of an Alphabet
is an alphabet ,define k string of length k, whose symbol in 0= , only string of length 0 ={a,b,c} 1={a,b,c}, 2={aa,ab,ac,ba,bb,bc,ca,cb.cc} 3={aaa,aab,aac,aba,abb,abc,aca,acb,acc,baa,bab,bac,bba,bbb,bbc,bca,bcb,bcc,caa,cab,cac,cba,cbb,cbc,cc a,ccb,ccc}

* = 0 1 2 + = 1 2 3 * = + { }
7/20/2011 Vinayan Lr in IT 2

Concatenation
XY =>concatenation of x and y X=a1 a2ai (length i) Y=b1 b2.bj (length j) XY=a1a2ai b1 b2..bj (length i+j) X=1101 Y=0011 XY=11010011 YX=00111101 w=w=w is identity concatenation

Languages

is an alphabet ,and L *
Particular alphabet called Language L is language over 1Language of n0s followed by n 1s { ,01,10,0011,000111} 2strings of equal no 0s and 1s {,01,10,0011,0101,1001} 3..binary values is a prime {10,11,101,111,1011,} 4.. * is a language of alphabet 5.,empty language over any alphabet 6.{} consist of empty string ,language over any alphabet ,Notice that {e}

7/20/2011

Vinayan Lr in IT

Deterministic Finite Automata


Each input there is one and only state automata can transition 1->consist finite set of states denoted Q 2->finite set of input symbols denoted 3->transition function (takes argument a state and input symbol return a state) (q,a)=p ,q is state and a as input symbol 4->start state ,one of state in Q 5->set of final or accepting state F, set F is subset of Q A={ Q , , ,q0 ,F} Example: DFA that accepts strings of 0s and 1s have sequence 01 somewhere in string L={w|w is of the form x01y for some strings x and y are 0s and 1s } L={x01y|x and y are any strings of 0s and 1s } eg.01,11010,100011 1 ->seen any 01?then accept every sequence of inputs . 2 ->never seen 01 ,most recent input was 0 if now sees 1can accept everything 3 ->never seen 01 ,last input was 1 then A cannot accept until first sees a 0 A=({q0,q1,q2},{0,1},,q0,{q1})

7/20/2011

Vinayan Lr in IT

Transition-Diagram
DFA A=(Q,,,q0,F) a -> each state Q there is a node b -> each state q in Q and input symbol a in , (q,a)=p (Transition diagram has an arc from node q to node p labeled a ) c ->an arrow into start states q0 labeled start d-> node corresponds to accepting state (those in F) marked by double circle, state not in F have single circle

Transition-Table
Take tabular representation of function take two arguments and return a value ,rows corresponds to states, column corresponds to inputs

0 ->Q0 *Q1 Q2 Q2 Q1 Q2

1 Q0 Q1 Q1

0 0,1
q0 q2 q1

start

7/20/2011

Vinayan Lr in IT

L={w|w is of even length and begin with 01}

*q0 q1 q3 q4

0 q1 q4 q2 q4

1 q1 q2 q3 q2 q4
start 1 0 q 4 0,1 0,1
q 0 q 1

->q2 q3

0,1 1
q 2

q 3

M=({q0,q1,q2,q3,q4},{0,1},,q0,{q2})
(q0, ) = q0 (q0, 0) = ( (q 0, ), 0) = (q0, 0) = q1, (q0, 01) = ( (q0, 0),1) = (q1,1) = q 2 (q0, 011) = ( (q0, 01),1) = (q 2,1) = q3 (q0, 0111) = ( (q0, 011),1) = (q3,1) = q 2 (q0, 01110) = ( (q 0, 0111), 0) = (q 2, 0) = q3
7/20/2011 Vinayan Lr in IT

(q0, 011101) = ( (q0, 01110),1) = (q3,1) = q 2

Nondeterministic finite automata


Return Several states at once A={ Q , , ,q0 ,F} Language=symbol one in second last position 1 ->Q is finite set of states 2 -> is finite set of input symbols 3 ->q0,a member of Q ,is the start state 4 ->F, subset of Q ,is the set of final states 5 ->Transition function(takes a state in Q and an input symbol as arguments return subset of Q NFA=A=({q0,q1,q2},{0,1},,q0,{q2})

q0

q0

q0

q0

q0

q0

q1

q1 q2

q2

0
7/20/2011

0
Vinayan Lr in IT 7

Continue
q1 *q2 0 q2 1 q0,q1 q2
q0 q1

->q0 q0

1,0 0,1 q2 start 1

(q0, ) = {q0} (q0, 0) = (q 0, 0) = {q0} (q0, 01) = (q0,1) = {q0, q 2} (q0, 010) = (q 0, 0) (q1, 0) = {q0} {q 2} = {q0, q 2} (q0, 0101) = (q0,1) (q 2,1) = {q0, q1} = {q0, q1} (q0, 01010) = (q 0, 0) (q1, 0) = {q0} {q 2} = {q0, q 2}
7/20/2011 Vinayan Lr in IT 8

Equivalence of DFA & NFA


Smallest DFA have 2n states Smallest NFA have n states Subset construction-involves constructing all subset of states of NFA NFA=(QN,,N,q0,FN) DFA=(QD,,D,{q0},FD) L(D)=L(N) Q D is the subset of QN .QD is power set of QN .QN has n sates ,QD has 2n states All states cannot be accessed from start state of QD ,it can be thrown away FD is subset S of QN such that S FN FD set of all N states containing at least one accepting state Each set S is QN for each input symbol a in

D ( S , a ) = pinS N ( p, a )
7/20/2011 Vinayan Lr in IT 9

->{q0} {q1} *{q2} {q0,q1} *{q0,q2} *{q1,q2} *{q0,q1,q2}

0 {q0} {q2} {q0,q2} {q0} {q2} {q0,q2}

1 {q0,q1} {q2}

A ->B C *D E

0 A B D A F B D F

1 A E D A H E D H
start

0 B 1

1 0 E F

{q0,q1,q2}
*F

{q0,q1} {q2} {q0,q1,q2}

0 1

*G *H

0 1
{q0}
start

1 0
{q0, q1}
{q0,q2 }

0 1
7/20/2011 Vinayan Lr in IT 10

You might also like