Yes, this is a common language!
Any line consists if a and b belong to the language A = {xy | N a (x) = N b (y)} A = {xy | N a (x) = N b (y)} .
Example:
Suppose the line: w = aaaab we can split this line into the prefix x and the suffix y
w = a aaab --- ----- xy
The number a in x is equal to one, and the number b in in y also equal.
Similarly, as a string like: abaabaa can be split as x = ab (N a (x) = 1) and y = aabaa (N b (y) = 1).
Or w = bbbabbba as x = bbbabb (N a (x) = 1) and y = ba (N b (y) = 1)
Or w = baabaab as x = baa and y = baab with (N a (x) = 2) and (N b (y) = 2).
Thus, you can always break the string from a and b into the prefix x and the suffix y so that N a (x) = (N b (y).
Formal Prrof:
Note. Strings consisting only of a or consisting of b do not belong to the language, for example. aa , a , bbb ...
Defines a new Lagrangian CA such that CA = {xy | N a (x) != N b (y)} CA = {xy | N a (x) != N b (y)} . CA means complement to a consists of a string consisting of only a or only b s.
1 And CA is a regular language whose regular expression is a + + b + .
Now that we know that CA is a regular language (it can be a regular expression, which means DFA) and the complement of any regular language is regular, a also a regular language!
To create DFAs for add-ons, refer to: Looking for a DFA Add-on? and for writing a regular expression for DFA, see the following two methods.
'+' Operator in regular expression in official languages
PS: Btw regular expression for A = {xy | N a (x) = N b (y)} A = {xy | N a (x) = N b (y)} is (a + b)*a(a + b)*b(a + b)* .