Prerequisites before learning the Theory of Automata 

Introduction

After reading the following article we will have a basic understanding of the prerequisite required to learn the concept of the Theory of Computation.

Before we move to the Theory of Automata, we should have a basic understanding of some terminologies which are frequently used like Symbols, Alphabets, Strings, Languages.

Know about Symbols : 

Symbols are indivisible objects or entities that cannot be defined. That is, symbols are the atoms in the world of languages. A symbol is any single object such as

1, a, b, #

Know about Alphabets :

An alphabet is a finite, non-empty set of symbols that are normally denoted by Σ. When more than one alphabets are considered for discussion, then subscripts may be used (e.g. Σ1, Σ2 etc) or sometimes another symbol like G may also be introduced.

Example : 

        Σ = {0,1}

        Σ = {a, b, c}

        Σ = {a, b, c, &, z}

        Σ = {#,$, @, β, €, α}

Know about Strings or Words over Alphabet :

A string or word over an alphabet Σ is a finite sequence of concatenated symbols of  Σ.

Example: 0110, 11, 001 are three strings over the binary alphabet { 0, 1 }. aab, abcb, b, cc are four strings over the alphabet { a, b, c }.

It is not the case that a string over some alphabet should contain all the symbols from the alphabet. For example, the string cc over the alphabet { a, b, c } does not contain the symbols a and b. Hence, it is true that a string over an alphabet is also a string over any superset of that alphabet.

Know about the Length of a string :

The number of symbols in a string w is called its length, denoted by |w|. Example : | 011 | = 4, |11| = 2, | b | = 1

Convention: We will use small case letters towards the beginning of the English alphabet to denote symbols of an alphabet and small case letters towards the end to denote strings over an alphabet.

That is, a,b,c ∈ Σ  (symbols) and u,v,w,x,y,z are strings.

Know about Some String Operations : 

Let X=a1a2a3 ∈ an and Y=b1b2b3 ∈ bm be two strings. The concatenation of x and y denoted by xy, is the string a1a2a3…anb1b2b3…bm . That is, the concatenation of x and y denoted by xy is the string that has a copy of x followed by a copy of y without having any space between them.

Example: Consider the string 011 over the binary alphabet. All the prefixes, suffixes, and substrings of this string are listed below.

Prefixes: ε, 0, 01, 011.

Suffixes: ε, 1, 11, 011.

Substrings: ε, 0, 1, 01, 11, 011.

Power of Strings: 

For any string x and integer n ≥ 0, we use xn to denote the string formed by sequentially concatenating n copies of x. We can also give an inductive definition of xn as follows:

x=  e , if n0; otherwise x= xxn-1.

for example  x=011, then x3=011011011, x1=011, x0=e.

Know about Powers of Alphabets: 

We write Σk  (for some integer k) to denote the set of strings of length k with symbols from Σ. In other words,

Σk = { w | w is a string over Σ and | w | = k}.

Hence, for any alphabet, Σ0 = {e} denotes the set of all strings of length zero. That is, Σ0 = {e}. For the binary alphabet {0,1} we have the following.

Σ0 = {e}

Σ1 = {0,1}

Σ2 = {00,01,10,11}

Σ3 = {000,001, 010,011, 100, 101, 110, 111}

The set of all strings over an alphabet Σ is denoted by Σ+ . That is,

             Σ+  = Σ0 U Σ1 UΣ2 U Σ3 U Σ…. U Σn

The set contains all the strings that can be generated by iteratively concatenating symbols from any number of times.

Example : If Σ = { a, b }, then

          Σ+  = { ε, a, b, aa, ab, ba, bb, aaa, aab, aba, abb, baa, …}.

Know about Languages:

A language over an alphabet is a set of strings over that alphabet. Therefore, a language L is any subset of Σ ϕ. That is, L ⊆ Σ ϕ.

Example:

  1. F is the empty language.
  2. Σϕ is a language for any Σ.
  3. {e} is a language for any Σ. Note that, ϕ ≠ {e}. Because the language F does not contain any string but {e} contains one string of length zero.
  4. The set of all strings over { 0, 1 } containing an equal number of 0’s and 1’s.
  5. The set of all strings over {a, b, c} that starts with a.
Convention:

Capital letters A, B, C, L, etc. with or without subscripts are normally used to denote languages.

Set operations on languages:

Since languages are set of strings, we can apply set operations to languages. Here are some simple examples (though there is nothing new in it).

Know about Union:

A string x ϵ L1UL2 iff  x ϵ L1 or x ϵ L2

Example: { 0, 11, 01, 011 }U { 1, 01, 110 } = { 0, 11, 01, 011, 111 }

Know about Intersection: 

A string, xϵ L1 ∩ L2 iff x ϵ L1 and x ϵ L2.

Example: { 0, 11, 01, 011 } { 1, 01, 110 } = { 01 }

Know about Complement

Usually, Σϕ is the universe that a compliment is taken with respect to that only.  For a language A, the complement is Ā.

Example: Let L = { x | |x| is even }.

Then its complement is the language { x ϵ Σϕ | |x| is odd }.

Know about Reversal of a language:

The reversal of a language L, denoted as LR, is defined as:

L= {WR | W ϵ L}.

Example : 1. Let L = { 0, 11, 01, 011 }. Then LR = { 0, 11, 10, 110 }.

Let L = {  1n0n | n is an integer }. Then LR { 1n0n | n is an integer }.

Know about Language concatenation :

The concatenation of languages L1 and L2 is defined as

L1L2= { xy | x ϵ Land  y ϵ L2}.

Example : {a,ab}{b,ba} = {ab, aba, abb, abba}.

Note that,

  • L1L2≠ L2L1
  • Lϕ = ϕ
  • L{ε}= L= {ε}.

Know about Iterated concatenation of languages :

Since we can concatenate two languages, we also repeat this to concatenate any number of languages. Or we can concatenate a language with itself any number of times. The denotes the concatenation of L with itself  n times. This Ln is defined formally as follows:

L0 = {e}

Ln = L Ln-1

Example :

Let L = {a,b}, Then according to definition,

L0 = {e}

L1= L(e) = L = {a, ab}

L2 = LL1 = {a, ab} {a, ab}= {aa, aab, aba, abab }

L3 = LL2 = {a, ab}{aa, aab, aba, abab }

                     {aaa, aaab, aaba, aabab, abaa, abaab, ababa, ababab}

and so on…

Leave a Reply

Your email address will not be published. Required fields are marked *