Toc Unit 1
Toc Unit 1
CS 501
Btech 5th Sem.
Ex: ∑={0,1}
STRING:
Example: Σ = {a, b, c, d} is an alphabet set where ‘a’, ‘b’, ‘c’, and ‘d’ are
symbols.
Set of Strings={a,b,b,d,ab,bc………….}
Examples:
If S=‘cabcad’, |S|= 6
|S|= 0, it is called an empty string (Denoted by λ or ε)
Ex:
automatic machine tools
automatic packing machines
and automatic photo
printing machines
FA Acceptor (Recognizer):
FA is called Acceptor or Recognizer if it accepts a Language or Reject a
Language.
Ex: if L={ab,aa,bb,ba}
FA accepts a Language L if it accepts all strings w in L otherwise Rejects L.
L={1,11,10,1111,10101,100,101,……….} infinite
Q1 1 Q1
Q2 Q2
State 0 1
q0 q2 q1
q1 q1 q1
q2 q2 q2
Accepting a String w
δ (q0,110)->δ (q1,10)->δ (q1,0)->δ (q1, ∈) q1 is final state
So 110 is accepted
Rejection of w=011
δ (q0,011)->δ (q2,11)->δ (q2,1)->δ (q2, ∈) q2 is non final state
So 011 REJECTED
BY Prof. Om Singh Parihar , Department of
CSE, GGCT
Example, below DFA with Σ = {0, 1} accepts all strings ending with 0.
L={0,10,100,1110,1010,100,10010,……….}
FA=5-tuple (Q, ∑, δ ,qo. F).
Q={q0,q1}
∑={0,1}
δ: Transition function : Qx ∑ -> Q , q0 initial state ,F={q1}
Transition Function:
δ (q0,1)=q0
δ (q0,0)=q1
δ (q1,0)=q1
δ (q1,1)=q0
NOTE:
1.The value of the output function depends on the present state
and the present input.