Regular languages are accurately described by regula expressions. That being said, it is possible to use mathematical proof to determine when a language is not a regular language. In this guide, we will discuss how to prove that a^2^n is not a regular language.

## What is a^2^n?

A^2^n, also known as the Dyck language, is a subset of strings composed of properly balanced parentheses. It consists of any finite string of only n pairs of parentheses, meaning it has 2n symbols, where n ≥ 0. It is defined as the set of strings

A^2^n= {s € {(, )^2^n|s contains equal numbers of ( & }

Any other string of symbols not composed of equal numbers of the symbols ( and ) is not part of A^2^n.

## Proving a^2^n is Not a Regular Language

To prove that a^2^n is not a regular language, we will use the Pumping Lemma for regular languages. The pumping lemma states that if a language is regular, then all strings of the language, no matter how long, can be pumped – meaning it can be divided into substrings of the same length using the same symbol and the substring can be repeated a certain number of times, without changing the language.

To prove the opposite, we will assume that a^2^n is a regular language and attempt to prove that it cannot be pumped. To do this, we'll consider the following pumping string s:

S = (()^2^n

This string contains n pairs of parentheses, so n must be an even whole number for it to be in A^2^n. Now let us separate s into three substrings of the same length, s = uvw. This gives us two possible cases:

- v consists completely of (
- v consists completely of )

In both of these cases, the length of the substring will be even. In case 1, we must replace at least one of the occurrences of the parentheses with something other than ( or ). If we do this, then we will end up with an unbalanced string, meaning it is not a part of A^2^n, as A^2^n requires equal numbers of ( and ).

In case 2, if we repeat the string using the same substring multiple time, then the number of parentheses on the left of the substring must be more than the number on the right. Since the number of parentheses on both sides must be equal for A^2^n, then this is also not possible.

In either case, we end up with pumpable strings that are not part of A^2^n. This proves that a^2^n is not a regular language.

## FAQs

##### What is the Pumping Lemma?

The pumping lemma states that if a language is regular, then all strings of the language, no matter how long, can be pumped – meaning it can be divided into substrings of the same length using the same symbol and the substring can be repeated a certain number of times, without changing the language.

##### What is a^2^n?

A^2^n, also known as the Dyck language, is a subset of strings composed of properly balanced parentheses. It consists of any finite string of only n pairs of parentheses, meaning it has 2n symbols, where n ≥ 0. It is defined as the set of strings A^2^n= {s € {(, )^2^n|s contains equal numbers of ( & }

##### What is the language A^2^n composed of?

A^2^n is composed of any finite string of only n pairs of parentheses, meaning it has 2n symbols, where n ≥ 0.

##### How do we determine if a^2^n is a regular language?

A regular language is one that can be described by a regular expression. To determine whether a^2^n is a regular language, we can use the Pumping Lemma for regular languages. If a^2^n satisfies the Pumping Lemma, then it is a regular language.

##### How many symbols does A^2^n have?

A^2^n has 2n symbols where n ≥ 0.

## Related Links

- What is a^2^n? https://www.tutorialspoint.com/what-is-a2n
- Dyck Language https://en.wikipedia.org/wiki/Dyck_language