Professional Documents
Culture Documents
Automata Exe 2
Automata Exe 2
BSCS 2B
0
Discription A is the start symbol on input ‘0’ doesent to maintain its states as any number of
‘0’ occur at the start of a string now, on input ‘1’, it will maintain its state to
B on input ‘0’ goes to state C as this 0 can be ‘0’ followed by the 1st 1’1 of the subtring ‘101’
now , on input ‘1’ B remains on P , as there can be any no. of 1’1 0 of which its last ‘1’ will
be treated as 1st ‘1’of the substring ‘101’
C On, input ‘0’ it goes to the start start state A as after getting ‘|0|’if we get ‘0’ again, then it
breaks the substring
Sequence ‘101’ that means we have to get the ‘101’ Sequence from the start again.
On input ’11 it goes to D as we get me substring ‘101’and our goal is achieved substring ‘101’
D . After getting substring ‘101’ any sequence of ‘0 1
Possible, so it remains on D after ‘0/1’ any of time
1
A
A º B
A º C
A A
AA
10
Discription: A
A is the start state. On input ‘0’input ‘0’ goes to state B
A
As this ‘0’ may be 1st ‘0’ of the ‘001’ sequence
So, maintain this state at state AB
On, input ‘1’ at state AA , it doesent need to remember it
Cause, any on, of ‘1’ can happen at A A State and let ‘0’
has not been encountened for the sequence ‘001’ ;
B , on input ‘0’goes to c ,as its may be the and ‘0’ of the sequence 001
On input ‘1’ goes to A , cause ‘1’ breaks the sequence
‘001’ that was generating by 1st ‘0’,
D this is final state, after being accepted, again if one ‘0’ comes, this has one ‘0’ at last of the
string so go to B . if one ‘1’ comes then it breaks the whole sequence and goes back to A
and start again.
C
A L = { w|w has a | in its and last position, if such
A.) Position
DFA
0 0
A B D E F
0 A 1
A A 1 A
A
A 1
1
C
A
1 0
A Start state
A , B , C F final state