What is Finite Automata?



Finite Automata, is a fundamental concept in computer science and automata theory. We get the term "automaton" from the word "automatic". In this chapter, we will explain the concept of finite automata as an overview, and its representation through a 5-tuple, and illustrate these ideas with a practical example involving a lift system.

Formal Definition of Finite Automata

A finite automata is an abstract machine used to model computation. It consists of a finite number of states and operates on input symbols to transition between these states based on a set of rules.

To represent the finite automata, we need 5 tuples −

$$\mathrm{M \:=\: (Q,\: \Sigma,\: \delta,\: q0,\: F)}$$

where −

  • Q − A finite, non-empty set of states.
  • Σ − A finite, non-empty set of input alphabets (symbols).
  • δ − The transition function, which maps into .
  • q0 − The initial state, which is an element of .
  • F − A subset of representing the set of final states.

Components of 5-Tuple

Following are the components of the 5-Tuple −

  • States (Q) − Q is a finite, non-empty set of states. Each state represents a unique condition or configuration of the system.
  • Input Alphabets (Σ) − Σ is the finite, non-empty set of input symbols that the automaton reads to determine state transitions.
  • Transition Function (δ) − δ is a set of functions that defines how the automaton transitions from one state to another based on the current state and input symbol. It can be expressed as: δ:Q×Σ→Q.
  • Initial State (q0) − q0 is the initial state from which the automaton starts its computation. It belongs to the set.
  • Final States (F) − F is a subset of containing one or more final states. These states signify the acceptance of the input string by the automaton.

Example of Involving an Elevator System with Three Floors

To better understand finite automata, let's consider a simple example involving a lift (elevator) system with three floors: Ground floor, First floor, and Second floor.

The lift can move between these floors based on user input. To design the automata, we need to first define the states, then the alphabets, transition, initial, state and the final state. Let's discuss each of them one by one −

  • States (Q):
    • Q0: Ground floor
    • Q1: First floor
    • Q2: Second floor
  • Input Alphabets (Σ):
    • 0: Go to the ground floor
    • 1: Go to the first floor
    • 2: Go to the second floor
  • Transition System − The transition system of the lift can be represented as a directed graph.
Elevator System with Three Floors

In this directed graph, circles denote states (Q0, 1, Q2). Directed edges represent transitions based on input symbols.

The transition system of the lift can be visualized as the above mentioned directed graph with three states: Q0 (ground floor), Q1 (first floor), and Q2 (second floor).

Each state is represented by a circle. The initial state, Q0, is indicated by an inward arrow. Transitions between states are depicted by directed edges based on input symbols.

  • From 0, an input of 0 leads to Q0 (self-loop), an input of 1 leads to Q1, and an input of 2 leads to Q2.
  • From 1, an input of 0 transitions to Q0, an input of 1 remains in Q1 (self-loop), and an input of 2 transitions to Q2.
  • From 2, an input of 0 transitions to Q0, an input of 1 transitions to Q1, and an input of 2 remains in Q2 (self-loop).
  • The final state, 2, is represented by a double circle.

Transition Diagram

It is a directed graph associated with the vertices of the graph corresponding to the state of finite automata.

An example of transition diagram is given below −

Transition Diagram Finite Automata

Here,

  • {0,1}: Inputs
  • q1: Initial state
  • q2: Intermediate state
  • qf: Final state

Transition Table

We can also write the same through a transition table

Present State Input Next State
Q0 0 Q0
Q0 1 Q1
Q0 2 Q2
Q1 0 Q0
Q1 1 Q1
Q1 2 Q2
Q2 0 Q0
Q2 1 Q1
Q2 2 Q2

Conclusion

Finite automaton is a powerful concept used to model and analyze computational processes. By understanding the 5-tuple representation and applying it to practical examples like the lift system, we can get the basics of finite automata and understand how these abstract machines operate.

Advertisements