0% found this document useful (0 votes)
136 views8 pages

IntroductionToAutomataTheory Kandar

The document provides the solution to proving that two finite automata (FA) are equivalent. The first FA has three states A, B, C arranged in a circle with transitions between them. The second FA is a non-deterministic FA (NFA) that is converted to a deterministic FA (DFA) with six states. The DFA is then minimized to a three state FA that is proven equivalent to the first FA.

Uploaded by

Doritos
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)
136 views8 pages

IntroductionToAutomataTheory Kandar

The document provides the solution to proving that two finite automata (FA) are equivalent. The first FA has three states A, B, C arranged in a circle with transitions between them. The second FA is a non-deterministic FA (NFA) that is converted to a deterministic FA (DFA) with six states. The DFA is then minimized to a three state FA that is proven equivalent to the first FA.

Uploaded by

Doritos
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/ 8

Finite Automata | 117

26. Prove that the following two FA are equivalent.


0, 1
0

A 1 B 1 C

0, 1 0, 1

A 1 B 1 C
0

Solution: The second one is an NFA. The tabular representation of the FA


is

N extState
P resentState i=0 i=1
A A A, B
B − C
C C C

The DFA from the given NFA is

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]

Simplifying this, the DFA becomes

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

Here, S1 is the initial and S3 , S4 , S5 , and S6 are the final states.


Now try to minimize the DFA.

P0 = (S1 S2 S3 S4 S5 S6 )
P1 = (S1 S2 )(S3 S4 S5 S6 )
P2 = (S1 )(S2 )(S3 S4 S5 S6 )

118 | Introduction to Automata Theory, Formal Languages and


Computation

Rename (S1 ) as A, (S2 ) as B, and (S3 S4 S5 S6 ) as C. The minimized F A is

N extState
P resentState i=0 i=1
A A B
B A C
C C C

where A is the initial state and C is the final state.


It is proved that the two DFA are equivalent.

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

Finite Automata | 119

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

2. Which is true for δ(q, ab)


a) δ(q, a) ∪ δ(q, b)
b) δ(δ(q, a), b)
c) δ(q, a), b
d) δ(q, a) ∩ δ(q, b)

3. The transitional function of a DFA is


a) Q × Σ → Q b) Q × Σ → 2Q
c) Q × Σ → 2n d) Q × Σ → Qn

4. The transitional function of an NFA is


a) Q × Σ → Q b) Q × Σ → 2Q
c) Q × Σ → 2n d) Q × Σ → Qn

5. The maximum number of states of a DFA converted from an NFA with


n states is
a) n b) n2
c) 2n d) None of these

6. A string after full traversal is called not accepted by an NFA if it results


in
a) Some non-final states
b) All non-final states
c) A single non-final state

4
d) Some final states

7. An NFA with a set of states Q is converted to an equivalent DFA with a


set of states Q′ . Find which is true.
a) Q′ = Q b) Q′ ⊆ Q
c) Q ⊆ Q′ d) None of these

8. The basic limitations of a finite state machine is


a) It cannot remember arbitrarily large amount of information
b) It cannot remember state transitions
c) It cannot remember grammar for a language
d) It cannot remember language generated from a grammar

9. The string W W R is not recognized by any FSM because


a) An FSM cannot remember arbitrarily large amount of information
b) An FSM cannot fix the mid-point
c) An FSM cannot match W with W R
d) An FSM cannot remember the first and last inputs.

10. A finite automata recognizes


a) Any language
b) Context sensitive language
c) Context-free language
d) Regular language

11. Which is true for a dead state?


a) It cannot be reached anytime
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

12. The language accepted by the given FA is

5
A a B
b
a
b
C

a) (ab)∗ b) bb ∗ a
c) b(ba) ∗ a d) Null

13. In the previous FA, B is called


a) Dead state
b) Inaccessible state
c) Both a and b
d) None of these

14. Which is true for a Moore machine?


a) Output depends on the present state
b) Output depends on the present input
c) Output depends on the present state and the present input
d) Output depends on the present state and the past input

120 | Introduction to Automata Theory, Formal Languages and


Computation

15. Which is true for the Mealy machine?


a) Output depends on the present state
b) Output depends on the present input
c) Output depends on the present state and the present input
d) Output depends on the present state and the past input

16. Which is true for the inaccessible state?


a) It cannot be reached anytime

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

17. In Mealy Machine, O/P is a function of


a) Present state only
b) Next state only
c) Present state and Input
d) Input only

18. In Moore Machine, O/P is associated with


a) Present state only
b) Next state only
c) Present state and Input
d) Input only

19. Which type of string is accepted by the following finite automata?

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

1. Consider the strings u = abbaba, v = bab, and w = aabb. Which of the


following statement is true for the given transitional system?

4 picture

a) The automaton accepts u and v but not w.


b) The automaton accepts each of u, v, and w.
c) The automaton rejects each of u, v, and w.
d) The automaton accepts u but rejects v and w.

You might also like