# Alphabets, Strings, Words Examples in Theory of Automata (TAFL)

## What is mean be Automata?

The plural of the automaton is automata, and automata refer to “Any object that works automatically”.

## Introduction to languages

There are two types of languages

1. Formal Languages (also known as Syntactic languages)
2. Informal Languages (also known as Semantic languages)

## What are formal languages?

The formal language is strict with their rules. In formal language letters join with each other to make the words and this process is properly well-formed and following the international standards of the given language and it must be according to a specific set of rules provided by the language.

## What are the informal languages?

The informal language is not strict with their rules.

## Comparison of formal and informal languages

 Formal languages Informal languages Hello, How are you? Helo, hw r u My Message Package is finished. My Msg Pckg is finished. He is my brother. He is my bro.

## Alphabets in Automata

Alphabets are the finite non-empty set of symbols or letters. Alphabets can be denoted by the symbol of the Greek letter sigma (Σ).

### Examples of alphabets in Automata

Σ = {a,b}

Σ =  {X,Y}

Σ = {0,1}

Σ = {AbC}

Alphabets can includes letters, digits and a variety of operators.

## Strings in Automata

Strings are the Single letter or the combination of a finite number of letters from the alphabet.

### Examples of strings in Automata

If Σ = {x,y} then

x, xyxy, xxxyy, xyxyxyxyx, xyxyxyxyxyxyxyxyxy etc.

## What is Empty string or null string?

Empty string or null string is the strings with no symbols or strings. The null string can be denoted with a Small Greek letter Lambda (λ) or sometimes people love to represent it with Capital Greek letter Lambda Λ.

## What are Words in Automata

Words are the strings belonging to some language.

### Example of words in Automata

If Σ= {x} then a language can be defined as

Language ={xn : n=1,2,3,…..} or Language ={x,xx,xxx,….}

Here x, xx,… are the words of the language.

## Length of Strings

The length of the string can be denoted by |s|. The length of string is the number of letters in the string.

## Examples of Length of Strings in automata

### Example 1 of Length of Strings in automata

Σ={a,b}

String=ababaab

|s|=7

Here, |s| representing the String length

### Example 2 of Length of Strings in automata

Σ={a, b, c, d, e , f}

String=ababaabdef

|s|=10

Here, |s| representing the String length

### Example 3 of Length of Strings in automata

Σ={a, b, c, d, e , f, g, h, I, j, k , l, m}

String=ababaabdefj

|s|=11

Here, |s| representing the String length

## Examples of Tokens

### Example 1 of Tokens

Σ= {B, AA, aB, bab, d}

s=BAAaBbabBd

Tokenizing=(B), (AA), (aB), (bab), (B), (d)

String length = |s|=6

### Example 2 of Tokens

Σ= {B, AA, aB, ZZZZ, W, M, NO}

s=BAAaBZZZZBWMN0

Tokenizing=(B), (AA), (aB), (ZZZZ), (B), (W) , (M) , (NO)

String length = |s|=8

## How to Reverse the Strings in automata

The reverse of a string changes the order of strings. The reverse of a string can be obtained by writing the letters of a string in reverse order.

### Examples to Reverse the Strings in automata

If string=abc and if we get this string from Σ={a,b,c}

then the reverse of the string will be CBA.

### Example 1 to Reverse the Strings in automata

Σ= {X, aX, cac, Y}

Strings =XaXcacXY

The reverse of the strings = YXcacaXX

### Example 2 to Reverse the Strings in automata

Σ= {X, aX, POP, Y, G, K, D}

Strings =XaXPOPXYGKD

The reverse of the strings = DKGYXPOPaXX