66.1k views
4 votes
Using the closure properties of regular languages and the fact that {aᵃ bⁿ∣n≥0} is not regular,

show that the following languages over {a,b}∗ are not regular.
(a). {w∣w has the same number of a ′s as ′ 's }

1 Answer

5 votes

Final Answer:

The language {w∣w has the same number of a's as b's} over {a,b}* is not regular. This can be proven using closure properties and the fact that {aᵃ bⁿ∣n≥0} is not regular.

Step-by-step explanation:

To show that the language {w∣w has the same number of a's as b's} is not regular, we utilize the fact that {aᵃ bⁿ∣n≥0} is not regular. Assume, for contradiction, that the language {w∣w has the same number of a's as b's} is regular. Then, we can use closure properties of regular languages to manipulate it. By applying operations such as concatenation, union, and intersection on regular languages, we would expect to preserve regularity.

Consider the language L = {aᵃ bⁿ aᵃ∣n≥0}. This language can be obtained by concatenating the non-regular language {aᵃ bⁿ∣n≥0} with a regular language {aᵃ}. If the language {w∣w has the same number of a's as b's} were regular, then L would also be regular due to closure properties. However, L includes strings where the count of a's before and after b's must be the same, violating the conditions for a non-regular language. This contradiction proves that the language {w∣w has the same number of a's as b's} cannot be regular.

Therefore, by utilizing closure properties of regular languages and assuming the language {w∣w has the same number of a's as b's} is regular, we reach a contradiction with the non-regular language {aᵃ bⁿ∣n≥0}. Thus, it can be concluded that the language {w∣w has the same number of a's as b's} is not regular.

User FredTheWebGuy
by
8.0k points