Automata Midterms
Automata Midterms
EXAMPLE OF DFA:
L = {w : w starts and ends with an ‘a’ ; w ∈ {a, b}}
read as “L is the set of elements w, such that w
starts and ends with an a, where w is an element
of a and b”
DIFFERENCE OF DFA AND NDFA
ACCEPTED INPUTS: aa, aba, abbababaa... DFA NDFA
INVALID INPUTS: ba, abab, abbb… Single transition for each Allows multiple transition
input for each input
Empty string transitions Permits empty string
are not seen transition
Allows backtracking Backtracking not
applicable
Requires more space Requires less space
String is accepted if it At least one of all possible
NON-DETERMINISTIC FINITE AUTOMATA (NDFA) transits to final state transitions transits to final
- fixed number of states, but there could be state is accepted
multiple next states
- the next state may be chosen at random GRAPHICAL REPRESENTATION
- all the next states may be chosen in parallel VERTICES/NODES
- for each state there can be zero or more - represent states
transitions corresponding to a particular ARCS WITH LABEL
symbol - transitions
- can be specified by 5 tuples (Q, Σ, δ, s, F) EMPTY SINGLE INCOMING ARC
where: - initial state
EXAMPLE OF NFA – ε:
Finite Automata:
ε - CLOSURE
Finite Automata:
- all the states reachable from a particular
state in following ε-transitions only by seeing
the ε symbol
REGULAR EXPRESSION AND REGULAR
LANGUAGE
KLEENE CLOSURE
REGULAR EXPRESSIONS
- simple expressions describing the languages - R1*
- sequence of pattern that defines a string - example: R1 = {ab, d} and R2 = {m, np}
R1* = { ε, ab, d, abd, dab,abab, …}
- used to match character combinations in
strings
a. (0+10) *(1+ε)*
b. (0+101) *(0+ε)
c. (1+010)*(1+ε)
d. (0+10)*(1+ε)
13. The finite automata accept the following
languages:
a. {0, 1, ε}
b. {0, 1, 01 ,11, 00, 10, ε}
c. {0, 1, 01, ε}
d. {0, 1}
28. The minimum number of states required to
automate the following Regular Expression: (1)*
(01+10) (1)*
a. 4
b. 3
c. 2
d. 5
29. Regular Expression denote precisely the
________ of Regular Language
a. Power Set
b. Class
c. Super Sweet
d. None of the mentioned