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
- Formal Languages (also known as Syntactic languages)
- 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