490 likes | 703 Views
Lecture 2 Theory of Computation. Yasir Imtiaz Khan. Finite automata. Finite automata . Formal definition. Draw state diagrams. Transition Graph. Abba -Finite Accepter. initial state. final state “accept”. transition. state. Initial Configuration. Input String.
E N D
Lecture 2Theory of Computation Yasir Imtiaz Khan
Transition Graph Abba -Finite Accepter initial state final state “accept” transition state
Initial Configuration Input String
Input finished Output: “accept”
Input finished Output: “reject”
Output: “reject”
More Examples trap state accept
= { all strings without substring }
Nondeterministic Finite Accepter (NFA) Alphabet =
Nondeterministic Finite Accepter (NFA) Alphabet = Two choices
Nondeterministic Finite Accepter (NFA) Alphabet = Two choices No transition No transition
First Choice All input is consumed “accept”
Second Choice No transition: the automaton hangs
Second Choice Input cannot be consumed “reject”
all input is consumed “accept” String is accepted
No transition: the automaton hangs
Input cannot be consumed “reject” String is rejected