You are on page 1of 6

ALPHABET, STRING & LANGUAGE

Symbols

Symbols are an entity or individual objects, which can be any letter,


alphabet or any picture.

Examples

1, a, b, #
ALPHABET, STRING & LANGUAGE
Alphabet
A finite non-empty set of symbols (called letters), is called an alphabet.
It is denoted by ∑ ( Greek letter sigma).

Examples

Σ1 = {0, 1}
Σ2 = {a, b, …, z}, the set of all lower case letters
∑ = {The sets of all ASCII characters or the set of all printable ASCII
characters}
ALPHABET, STRING & LANGUAGE
String
A string or word is a finite sequence of symbols taken from ∑. It is
generally denoted as w.

Examples
alphabet ∑ = {0, 1}
w = 010101 is a string.

Length of a string
Length of a string is denoted as |w| and is defined as the number of
positions for the symbol in the string. For the above example length is 6.
ALPHABET, STRING & LANGUAGE
Length of a string
Length of a string is denoted as |w| and is defined as the number of
positions for the symbol in the string.

Examples
alphabet ∑ = {0, 1}
S = 010101 is a string.
|s|=11
Here, |s| representing the String length
ALPHABET, STRING & LANGUAGE
Empty string
The empty string is the string with zero occurrence of symbols. This
string is represented as є or λ. The set of strings, including the empty
string, over an alphabet ∑ is denoted by ∑*.

Examples

For ∑ = {0, 1} we have set of strings as ∑* = {є, 0, 1, 01, 10, 00, 11, 10101,…}.
and ∑1 = {0, 1} , ∑2 = {00, 01, 10, 11} and so on.
∑* contains an empty string є. The set of non- empty string is denoted by ∑+.
From this we get:
∑* = ∑+ U {є }
ALPHABET, STRING & LANGUAGE
Language
A language is a collection of appropriate string. A language which is
formed over Σ can be Finite or Infinite.

Examples
Example of Finite Language:
L1 = { set of string of 2 over ∑ = {x, y}}
L1 = { xy, yx, xx, yy }
Example of Infinite Language:
L1 = { set of all strings starts with 'b' over ∑ = {a, b}}
L1 = { babb, baa, ba, bbb, baab, ....... }

You might also like