Solved IA1 QP
Solved IA1 QP
Scheme of Evaluation
Internals I
1. Define the following:
a) Pre-requisites
Symbols: Represent characters or digits
Alphabets: Set of symbols
String: Sequence of symbols
Language: Set of string
b) Trap state
A state from which a finite automaton (FA) or pushdown automaton (PDA)
cannot transit.
c) Finite Automata
An abstract machine that recognizes patterns in input sequences:
d) Dead Configuration
A state where the input string does not transit to further state and ends with ‘∅’
e) Formal definition of DFA and NFA
A Deterministic Finite Automata can be defined as a tuple:
{Q, Σ, q, F, δ}, where:
Q: Finite set of states
Σ: Set of input symbols
q: Initial state
F: Set of final states
δ: Transition function given by (δ=Q X Σ Q)
A Non-deterministic Finite Automata can be defined as a tuple:
{Q, Σ, q, F, δ}, where:
Q: Finite set of states
Σ: Set of input symbols
q: Initial state
F: Set of final states
δ: Transition function given by (δ=Q X Σ 2 Q)
DFA NFA
It has zero or one no. of state It has zero,one or more no. of state
transition at any no. of given state. transition at any no. of given state.
Comparatively difficult to design. Easy to design.
More no. of transitions. Less no. of transitions.
It has only one unique state. It has multiple unique states.
δ is given by (δ=Q X Σ Q) δ is given by (δ=Q XΣ 2 Q)
3. Write the structural representation of Finite automata by considering an
example.
L={Set of all strings over (0,1) such that the string starts with 0}
Transition diagram:
Transition table:
States/Inputs 0 1
A B C
B* B B
C C C
4. Design DFA for the given languageL={Set of all strings over (a,b) such that the
string has exactly one a}
States/Inputs a b
A B A
B* C B
C C C
States/Inputs a b
A A,B A
B - C
C* - C
States/Inputs a b
A AB A
AB AB AC
AC* AB AC
6. Design DFA for the given languageL={ Set of all strings over (a,b) such that the
string has exactly one a}
States/Inputs a b
A B A
B B C
C B D
D* D D
States/Inputs a b
A A,B C
B A B
C* - A,B
States/Inputs a b
A AB C
AB AB BC
BC A AB
C D AB
D D D