The operation of joining two strings to form a longer string. The concatenation of the strings
is the following string of length
m +
n:
Common notations for referring to it include
uv and
u<>
v, but others are also used.
The term concatenation is also generalized to an operation on sets of strings (i.e. formal languages). Let K and L be two sets of strings. Then they can be combined into the following set by concatenating strings from K with strings from L in all possible ways:
This set is usually written
KL. The phrase
language concatenation is sometimes used to distinguish this from simple concatenation of strings. Both string concatenation and language concatenation give rise to monoids, the identity elements being ∧ and {∧} respectively (where ∧ is the empty string).