week 8,9,10 Finite automata Flashcards
How does finite automaton work
.At regular time intervals:
. reads the first character from the inputted word
. Head moves to the next character
.control device determines ( the next state)
. Stops when the head reaches the last character of the input word ( when it hits the first blank cell)
. If it ends in an accepted state, word is accepted and part of language
. If it doesnt word is not part of language
How does the control device determine the next state
. The previous state
. The character read from the tape
What does it mean by a DFA ( deterministic)
. For each state ( and symbol ) there is an arrow coming out of the state labelled by the symbol
. Next state is determined by :
( letter/ character read , current state)
. Never gets stuck
. No choice in what route to take
Language of a DFA?
set of all words over alphabet that it accepts
Properties of an NFA
. There can be choices (on what state to move to)
. control device can get stuck ( there is no arrow leaving the state with the desired symbol)
. There are ε- jumps
Difference between transition table of NFA and DFA
. There is an e - coloumn
. cells can be contain 0 , 1 or more than one states
A NFA can be regarded as a DFA if …
. cells contain one state only and all cell in ε column are empty
Word in NFA accepted iff
There is at least one computation in the input word (as there can be multiple variations in choices taken) that is accepted
. accepted is NOT same as being stuck on a favourable state
What is the subset construction
Method to turn NFA to DFA
What are the new states in subset construction
named after subsets of original states
what is new inital state in subset construction
subset containing the original initial state in NFA and any states reachable by ε jumps from original initial states
New faourable state
Those subsets that contain at least one of NFA’s old favourable states
What is the general rule from going from a state to the next state in subset construction
What usually has more states DFA or NFA
DFA
What is the worst case number of no of states in DFA
2^ ( no of states in NFA)