Compound Finite Automata (FA)



The finite automata in automata theory are used for finite number of input lengths. Using the concept of set theory, we can merge more than one FSM into one to perform combined actions.

In this chapter, we will see the combined FSM using Union, Intersection and Difference. We will learn them through examples for a better understanding.

Introduction to Finite Automata

The concept of Finite Automata is not new to us in the field of theoretical computer science. A finite-state machine (FSM) is a mathematical model of computation that can be in one of a finite number of states at any given time. It can change from one state to another in response to inputs, called a transition.

An FSM is defined by its states, initial state, and inputs. There are two types of FSM −

For any non-deterministic FSM, an equivalent deterministic one can be constructed.

As we know, an FSM can be defined as five tuples. D1 = (Q, ∑, δ, q0, F) where Q is set of states, F is set of final states, q0 is initial state and defines set of input symbols where as δ is the set of transition rules. Now let us understand what is Compound Finite Automata.

Compound Finite Automata

These are nothing but the collection of basic FA. If more than one FA are merged together using union, or intersection or sometimes we make a difference of two machines, these could be compound finite automata. Let us understand some of the properties −

  • Consider we have two DFA, D1 with m states and D2 with n states. Now the number of states in a compound FA with (D1 X D2) [X denotes Cartesian Product] is equal to m*n.
  • Initial state of our compound FA will be the combination of the initial states of DFAs, the D1 and D2.
  • Similarly the final state of compound FA is depending on what set operation has been performed.

Let's take an example to understand this concept better.

Suppose two machines D1 and D2 −

  • D1 = Checks number of 0's divisible by 2, the machine could be defined as: D1 ({q1, qb}, {0, 1}, δ, q1, {q1})
  • D2 = Checks number of 1's divisible by 3, the machine could be defined as D2 ({q2, qa, qc}, {0, 1}, δ, q2, {q2})

The machine D1

Machines D1

The machine D2

Machines D2

Union (D1 ∪ D2)

The compound automata accepts any string w that belongs to either D1 or D2's language, and the final state of either state is included in the compound FA's states. Here either number of 0s divisible by 2 or number of 1s divisible by 3.

Compound Finite Automata

Intersection (D1 ∩ D2)

The compound automata accepts any string w belonging to both D1 and D2 languages, and the final state is achieved if both D1 and D2's final states are present in the compound FA. Here number of 0s divisible by 2 and number of 1s divisible by 3, both must be satisfied.

Intersection (D1 ∩ D2)

Difference (D1 D2)

The final state of a compound FA is determined by the presence of the final state of D1 and the non-final state of D2. Here all such strings will be accepted who are accepted by D1 but not by D2.

Difference (D1  D2)

Difference (D2 D1)

The final state of a compound FA is determined by the presence of the final state of D2 and the non-final state of D1. Here all such strings will be accepted who are accepted by D2 but not by D1.

Difference (D2  D1)

Conclusion

In this chapter, we covered the concept of compound FSM in detail. We selected two DFAs where one is for accepting "0s divisible by 2" and another one for "1s divisible by 3". By merging them through union, intersection, and difference, we can make such different kinds of FSM.

We explained the different types of FSM through examples and showed how these can enhance the strength of FSM to design complex systems.

Advertisements