IntroductionToAutomataTheory Kandar
IntroductionToAutomataTheory Kandar
A 1 B 1 C
0, 1 0, 1
A 1 B 1 C
0
N extState
P resentState i=0 i=1
A A A, B
B − C
C C C
N extState
P resentState i=0 i=1
[A] [A] [A, B]
[A, B] [A] [A, B, C]
[A, B, C] [A, C] [B, C]
[B, C] [B, C] [B, C]
[B, C] [A, C] [C]
[C] [C] [C]
1
N extState
P resentState i=0 i=1
S1 S1 S2
S2 S1 S3
S3 S4 S5
S4 S5 S5
S5 S4 S6
S6 S6 S6
P0 = (S1 S2 S3 S4 S5 S6 )
P1 = (S1 S2 )(S3 S4 S5 S6 )
P2 = (S1 )(S2 )(S3 S4 S5 S6 )
N extState
P resentState i=0 i=1
A A B
B A C
C C C
27. Draw the state transition of a deterministic finite state automaton which
accepts all strings from the alphabet (a, b), such that no string has three con-
secutive occurrences of the letter b.
2
[GATE 1993]
Solution:
1 picture
28. Construct a finite state machine with minimum number of states, ac-
cepting all strings over (a, b) such that the number of a’ s is divisible by two
and the number of b’s is divisible by three.
[GATE 1997]
Solution:
2 picture
3
1. A language L from a grammar G = {VN , Σ, P, S} is
a) Set of symbols over VN
b) Set of symbols over Σ
c) Set of symbols over P
d) Set of symbols over S
4
d) Some final states
5
A a B
b
a
b
C
a) (ab)∗ b) bb ∗ a
c) b(ba) ∗ a d) Null
6
b) There is no necessity of the state
c) If control enters, there is no way to come out from the state
d) If control enters, FA is dead
a) All string
b) Null string
c) No string
d) All of the above
Answers :
1. b 2. b 3. a 4. b 5. c 6. b 7. d 8. a 9. b 10. d
11. c 12. d 13. b 14. a 15. c 16. a 17. b 18. a 19. b
7
3 picture
4 picture