In the field of computation theory, union is one of the regular operations. If A and B are languages (not necessarily regular languages) then the union of A and B (usually written A B) is defined as follows.

{x | x A or x B}

In plain English: A B is the set of all strings which are either members of A or B or both.

For example, if A = {a,b,c}, and B = {c,d,e}
A B = {a,b,c,d,e}

Some interesting things to note about the union operation:

  • The union of a set with any subset is equal to the original set (iff B A, then A B = A).
  • Regular languages are closed under the union operation. This means that if A and B are regular languages, then so is A B.