concatenation (original) (raw)

Concatenation on Words

Let a,b be two words. Loosely speaking, the concatenationMathworldPlanetmath, or juxtaposition of a and b is the word of the form a⁢b. In order to define this rigorously, let us first do a little review of what words are.

Let Σ be a set whose elements we call letters (we also call Σ an alphabet). A (finite) word or a string on Σ is a partial functionMathworldPlanetmath w:ℕ→Σ, (where ℕ is the set of natural numbers), such that, if dom⁡(w)≠∅, then there is an n∈ℕ such that

w⁢ is ⁢{defined for every ⁢m≤n,undefined otherwise.

This n is necessarily unique, and is called the length of the word w. The length of a word w is usually denoted by |w|. The word whose domain is ∅, the empty setMathworldPlanetmath, is called the empty wordPlanetmathPlanetmathPlanetmath, and is denoted by λ. It is easy to see that |λ|=0. Any element in the range of w has the form w⁢(i), but it is more commonly written wi. If a word w is not the empty word, then we may write it as w1⁢w2⁢⋯⁢wn, where n=|w|. The collectionMathworldPlanetmath of all words on Σ is denoted Σ* (the asterisk * is commonly known as the Kleene star operationMathworldPlanetmath of a set). Using the definition above, we see that λ∈Σ*.

Now we define a binary operationMathworldPlanetmath ∘ on Σ*, called the concatenation on the alphabet Σ, as follows: let v,w∈Σ* with m=|v| and n=|w|. Then ∘(v,w) is the partial function whose domain is the set {1,…,m,m+1,…,m+n}, such that

∘(v,w)(i)={v⁢(i)if ⁢i≤mw⁢(i-m)otherwise.

The partial function ∘(v,w) is written v∘w, or simply v⁢w, when it does not cause any confusion. Therefore, if v=v1⁢⋯⁢vm and w=w1⁢⋯⁢wn, then v⁢w=v1⁢⋯⁢vm⁢w1⁢⋯⁢wn.

Below are some simple properties of ∘ on words:

Concatenation on Languages

The concatenation operation ∘ over an alphabet Σ can be extended to operations on languagesPlanetmathPlanetmath over Σ. Suppose A,B are two languages over Σ, we define

When there is no confusion, we write A⁢B for A∘B.

Below are some simple properties of ∘ on languages:

Remark. A formal languageMathworldPlanetmath containing the empty word, and is closed under concatenation is said to be monoidal, since it has the structureMathworldPlanetmath of a monoid.

References

Title concatenation
Canonical name Concatenation
Date of creation 2013-03-22 17:16:38
Last modified on 2013-03-22 17:16:38
Owner CWoo (3771)
Last modified by CWoo (3771)
Numerical id 17
Author CWoo (3771)
Entry type Definition
Classification msc 20M35
Classification msc 68Q70
Synonym juxtaposition
Synonym monoidal
Related topic Word
Defines length
Defines length of a word
Defines monoidal language