Aka. FA. A machine with:
- A finite number of states
- Has one or more starting states
- Transitions based on input symbols
- Optionally has some accepting states
For each state and input symbol, exactly one transition exists.
A finite automaton is a 5-tuple .
Where:
- is a finite set of states
- is a finite input alphabet
- is the start state
- is the set of accepting states
- is the transition function
FA with Outputs
Traditionally FAs are concerned with accepting or rejecting strings. But they can also generate outputs from an output alphabet. Will be covered in Moore Machines and later.
Used when systems must generate outputs while processing input sequences. Common in digital circuits, controllers, and reactive systems.
Transition Function
Denoted by . It maps a state and an input symbol to the next state.
Extended Transition Function
Denoted by . Handles strings instead of each symbol. is the state reached after reading string starting from state .
Acceptance by an FA
A string is accepted iff the machine ends in an accepting state after reading it.
The language accepted by is
Representations of FA
Transition Diagram
FA is represented as a directed graph with labelled edges.
- Vertices are states
- Labeled edges are transitions
- Start state is marked
- Accepting states are double-circled
Transition Table
Rows represent current states. Columns represent input symbols. Entries give next states.
Conversion with Regular Expressions
To a Regular Expression
- Start by analyzing the FA’s structure.
- Identify paths and loops to construct the RE.
- This process can be complex for larger FAs.
From a Regular Expression
- Identify repititive elements.
- Identify components such as union, concatenation, and Kleene star.
- Create states to represent these components and transitions based on the structure of the RE.
Kleene’s Theorem
A language is regular iff there exists a finite automaton that accepts .
Every FA has an equivalent regular expression. And vice versa.
Other Important Thoerems
Theorem 1
If a language has distinguishable strings, the FA must have at least states.
Theorem 2
Language of palindromes over any alphabet is not regular because a FA has fixed number of states and it’s not enough to check for palindromes.
Set Operations on FA
Suppose and are FAs accepting languages and respectively.
Let . Here . Based on how is defined, can accept different languages: or or .
Distinguishing Strings
Two strings and are distinguishable with respect to a language if their language quotients (with respect to ) are different.
2 strings and are distinguishable with respect to iff . Any string in one of these sets but not the other is said to distinguish and with respect to .
A string is an extension of with respect to if exactly one of and belongs to .