# Define the term alphabet, prefix and suffix of string, concatenation and Kleen closure with example.

Alphabet:

An alphabet is a finite non-empty set of symbols. The symbols can be the letters such as {a, b, c}, bits {0, 1} digits {0, 1, 2 … 9}, common characters like \$, #, * etc

For example:

Σ = {0, 1} → Binary alphabets

Σ = {+, -, *} → Special symbols

Prefix of String:

A string is called a prefix of a string w if it is obtained by remaining zero or more trailing symbols of w.

For example:

w = abcd

s = abc is the prefix of w

s is the proper prefix if sw

Suffix of String:

A string is called a suffix of a string w if it is obtained by remaining zero or more leading symbols in w.

For example:

w = abcd

s = bcd is the suffix of w

s is the proper suffix if sw

Concatenation of Strings:

If x and y are two strings over an alphabet, concatenation of x and y is written xy and x consists of the symbols of x followed by those of y.

For example:

x = aaa

y = bbb

xy = aaabbb

yx = bbbaaa

Kleen Closure:

The set of all strings over an alphabet Σ is called Kleen closure of Σ and is denoted by Σ*, Thus Kleen closure is set of all strings over alphabet Σ length 0 or more.

Σ* = Σ0 U Σ1 U Σ2 U Σ3 . . .

E.g: A = {0}

A* = $$\left \{ \frac{0^n}{n = 0, 1, 2 . . .} \right \}$$