Decision Algorithms for Equality of Two Languages
Learn how to develop algorithms to make decisions for equality of two languages.
We'll cover the following
Decision questions
We can establish procedures that enable us to make certain decisions about regular languages. For example, we might ask the question, “Do two automata recognize the same regular language?” Two languages are equal if they are the same set of strings.
Two sets are equal if and only if they have the same elements. When the sets are infinite, the best way to establish their equality is to show that any element in one set is also in the other, and vice versa; that is, if and only if and . Another way to express this idea is that neither set has an element that the other doesn’t. The latter statement is equivalent to the mathematical expression . Since we know how to compute the symmetric difference of two automata, this is our algorithm for testing language equality.
Testing for equality of two languages
We know that the machines in the following two figures accept the same language since the second is the minimization of the first. To illustrate the procedure testing for equality of languages, let’s verify whether the symmetric difference of those two machines is empty. Let’s call these machines and , and both are shown in the following figures.
Get hands-on with 1400+ tech skills courses.