Quotient Operation in Automata Theory



In this chapter, we will see the concept of the quotient operation in automata theory. We will see how regular languages are closed under quotient operations, then explain the concept with easy understandable form and provide detailed examples for them.

Quotient Operation

We know the term "quotient," we usually think of division, as learned in mathematics. The quotient is the result of dividing one number by another. However, in the Theory of Computation, the quotient operation is not exactly the same as in mathematics, although it shares a similar conceptual foundation. It is important to note that the quotient operation in TOC is not about division for numbers, but rather about manipulating strings in languages.

Understanding Quotient in Theory of Computation

In the context of automata, the quotient operation can be seen as a way to "cut" parts of strings within languages. There are two types of quotient operations: the left quotient and the right quotient.

  • Left Quotient − Also referred to as "cutting the prefix."
  • Right Quotient − Also referred to as "cutting the suffix."

Let us see these operations more formally.

Formal Definition of Quotient Operation

The quotient of two languages, say L1 and L2, denoted by L1 / L2, is defined as follows −

$$\mathrm{\frac{L_1}{L_2} \:=\: \{ x\: \mid \:\text{ for some } \:y\: \in\: L_2,\: \,\: xy\: \in \:L_1 \}}$$

Here, L1 and L2 are two languages over the same input symbol set. This input symbol set could be {0, 1}, {a, b}, or any other set of symbols. The languages L1 and L2 can be either finite or infinite, but they must be defined over the same set of input symbols.

How the Quotient is Determined?

The quotient operation results in a new language by "cutting" or removing part of the string, depending on whether we are performing a left quotient or a right quotient.

  • Right Quotient − If we take a right quotient of L1 by L2, we match the right part of the string with L2. What is remaining after this match is the quotient.
  • Left Quotient − If we take a left quotient of L1 by L2, we match the left part of the string with L2. The remaining part of the string is the quotient.

Examples of Quotient Operation

Now, let's take a look at some examples of Quotient Operation.

Example of Left Quotient

Let us see two languages −

$$\mathrm{L_{1} \:=\: \{10,\: 100,\: 1010,\: 101110\}}$$

$$\mathrm{L_{2} \:=\: \{10\}}$$

Both languages are defined over the input symbol set {0, 1}.

To find the left quotient, we compare each string in L1 with the string in L2, focusing on the left side.

First string in L1: 10

  • L2 = 10
  • We match 10 from the left of 10, leaving us with null
  • Output:

Second string in L1: 100

  • L2 = 10
  • We match 10 from the left of 100, leaving us with "0."
  • Output: 0

Third string in L1: 1010

  • L2 = 10
  • We match 10 from the left of 1010, leaving us with "10."
  • Output: 10

Fourth string in L1: 101110

  • L2 = 10
  • We match 10 from the left of 101110, leaving us with "1110."
  • Output: 1110

So, the left quotient L1 / L2 results in the language: { ∈, 0, 10, 1110}.

Example of Right Quotient

Now let us calculate the right quotient of the same languages L1 and L2.

First string in L1: 10

  • L2 = 10
  • We match 10 from the right of 10, leaving us with nothing
  • Output: ∈

Second string in L1: 100

  • L2 = 10
  • There is no match with 10 on the right side, so the output is "Epsilon" (the empty string).
  • Output: ∈

Third string in L1: 1010

  • L2 = 10
  • We match 10 from the right of 1010, leaving us with "10."
  • Output: 10

Fourth string in L1: 101110

  • L2 = 10
  • We match 10 from the right of 101110, leaving us with "1011."
  • Output: 1011

So, the right quotient L1 / L2 results in the language: {∈, ∈, 10, 1011}.

Example of Working with Regular Expressions

Let us explore an example involving regular expressions.

$$\mathrm{L_{1} \:=\: a^{*}b}$$

$$\mathrm{L_{2} \:=\: ab^{*}}$$

Here, we open L1 by substituting different values for the * in a

$$\mathrm{a^{0}b \:\rightarrow\: b}$$

$$\mathrm{a^{1}b \:\rightarrow\: ab}$$

$$\mathrm{a^{2}b \:\rightarrow\: aab}$$

$$\mathrm{a^{3}b \:\rightarrow\: aaab}$$

Here, we open L2 by substituting different values for the * in b

$$\mathrm{ab^{0} \:\rightarrow\: b}$$

$$\mathrm{ab^{1} \:\rightarrow\: ab}$$

$$\mathrm{ab^{2} \:\rightarrow\: abb}$$

$$\mathrm{ab^{3} \:\rightarrow\: abbb}$$

Now, calculate the left quotient L1 / L2, we pick each of L2, and check to find quotient on each of L1.

Closure Property of Regular Languages under Quotient Operation

Now, let us discuss why regular languages are closed under quotient operations. Closure property means that performing a certain operation on regular languages results in another regular language.

Why Are Regular Languages Closed Under Quotient Operation?

Regular languages are closed under quotient because when we perform the quotient operation, we are essentially reducing or cutting parts of the strings in the language. We are not adding anything new; we are just cutting or trimming existing parts. This operation results in a language that still retains the structure of a regular language.

If L1 and L2 are regular languages, then their quotient, L1 / L2, is also a regular language.

Conclusion

In this chapter, we covered the concept of the quotient operation in automata theory. We discussed what quotient operation is, how it is defined in the regular languages and regular expressions, and how to calculate it using both left and right quotient methods.

We worked through detailed examples to understand the application of the quotient operation. Finally, we learned about the closure property of regular languages under the quotient operation, which ensures that regular languages remain regular even after such operations.

Advertisements