Lecture 7 - DFA Flashcards
What does a deterministic finite state automata consist of?
- finite input alphabet Σ
- a finite set of states Q
- initial state q in Q
- set of accepting states F in Q
- control program / transition relation
Why do we look at a determinisic FA?
As then each relation has only one place to go (no choice has to be made at all)
How are accepting states denoted?
double circles
How is a starting state denoted?
arrow from nothing to state
What does a DFA define?
A language
What does a DFA do?
Check whether language on tape belongs to language of DFA (whether a decision problem can be solved by the DFA)
Are nondeterministic FAs possible?
YES
What is a recognition for NFA?
only requires there exists a single execution ending in the accepting state
Can NFA be converted to DFA ?
yes
Are NFAs more powerful than DFAs ?
NO, as it doesn’t expand the language
How to convert NFA to DFA?
states of NFA are converted to set of states in DFA if reuiqred
Danger of reducing NFA to DFA?
blow up N, states can go up to 2^n
Name of language recognisable by DFA?
regular language
How can a regular language be expressed?
a regular expression
What is ε?
empty string
- always think about in dfa
What is σ?
The regular expression
What is RS?
concatenation
What is R|S?
choice
What is R*
0 or more copies of R
- aka closure
What is (R)?
used for precedence
Order of precedence in regular expressions?
brackets
closure
concat
choice
What is ?
or on all characters
- any char
What is !x
equivalent to or of all characters in alphabet except x
What can a DFA not recognise?
when we need to count a certain number of characters e.g. a^nb^m
Why cannot DFA recognise this?
As there are inifintely many values for n and m and hence there would need to be an infinite amount of states , but it is a ‘finite’ machine
What is not a regular language?
a^nb^m
What can recognise a^mb^n?
pushdown automata or tm
How to recognise this a^mb^n
push a onto stack then pop when you read bs