concatenation

concatenation

Concatenation on Words

Let

a

,

b

be two words. Loosely speaking, the

concatenation

, 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 function

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 set

, is called the

empty word

, 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

w

i

. If a word

w

is not the empty word, then we may write it as

w

1

⁢

w

2

⁢

⋯

⁢

w

n

, where

n

=

|

w

|

. The

collection

of all words on

Σ

is denoted

Σ

*

(the asterisk

*

is commonly known as the

Kleene star

operation

of a set). Using the definition above, we see that

λ

∈

Σ

*

.

Now we define a

binary operation

∘

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

≤

m

w

⁢

(

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

=

v

1

⁢

⋯

⁢

v

m

and

w

=

w

1

⁢

⋯

⁢

w

n

, then

v

⁢

w

=

v

1

⁢

⋯

⁢

v

m

⁢

w

1

⁢

⋯

⁢

w

n

.

Below are some simple properties of

∘

on words:

•

∘

is

associative

:

(

u

⁢

v

)

⁢

w

=

u

⁢

(

v

⁢

w

)

.

•

λ

⁢

w

=

w

⁢

λ

=

w

.

•

As a result,

Σ

*

together with

∘

is a monoid.

•

v

⁢

w

=

λ

iff

v

=

w

=

λ

.

•

As a result,

Σ

*

is never a group unless

Σ

*

=

{

λ

}

.

•

If

a

=

b

⁢

c

where

a

is a letter, then one of

b

,

c

is

a

, and the other the empty word

λ

.

•

If

a

⁢

b

=

c

⁢

d

where

a

,

b

,

c

,

d

are letters, then

a

=

c

and

b

=

d

.

Concatenation on Languages

The concatenation operation

∘

over an alphabet

Σ

can be extended to operations on

languages

over

Σ

. Suppose

A

,

B

are two languages over

Σ

, we define

A

∘

B

:=

{

u

∘

v

∣

u

∈

A

,

v

∈

B

}

.

When there is no confusion, we write

A

⁢

B

for

A

∘

B

.

Below are some simple properties of

∘

on languages:

•

(

A

⁢

B

)

⁢

C

=

A

⁢

(

B

⁢

C

)

; i.e. (

http://planetmath.org/Ie

), concatenation of sets of letters is associative.

•

Because of the associativity of

∘

, we can inductively define

A

n

for any positive integer

n

, as

A

1

=

A

, and

A

n

+

1

=

A

n

⁢

A

.

•

It is not hard to see that

Σ

*

=

{

λ

}

∪

Σ

∪

Σ

2

∪

⋯

∪

Σ

n

∪

⋯

.

Remark

. A

formal language

containing the empty word, and is

closed under

concatenation is said to be

monoidal

, since it has the

structure

of a monoid.

References

1

H.R. Lewis, C.H. Papadimitriou

Elements of the Theory of Computation

. Prentice-Hall, Englewood Cliffs, New Jersey (1981).

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

Generated on Fri Feb 9 19:35:11 2018 by

LaTeXML