HN ATC Notes Module 1 Part1
HN ATC Notes Module 1 Part1
HN ATC Notes Module 1 Part1
15CS54
Automata Theory and
Computability
(CBCS Scheme)
Prepared by
Mr. Harivinod N
Dept. of Computer Science and Engineering,
Vivekananda College of Engineering and Technology, Puttur
Contents
Course website:
www.techjourney.in
Lecture Notes | 15CS54 – ATC | Module 1: Finite State Machines
1. Introduction
The term "Automata" is derived from the Greek word "αὐτόµατα" which means "self-acting".
An automaton (Automata in plural) is an abstract self-propelled computing device which
follows a predetermined sequence of operations automatically.
An automaton with a finite number of states is called a Finite Automaton (FA) or Finite State
Machine (FSM).
3. Strings
Alphabet
Definition: An alphabet is any finite set of symbols denoted by Σ (Sometimes also
called as characters or symbols).
Example: Σ = {a, b, c, d} is an alphabet set where ‘a’, ‘b’, ‘c’, and ‘d’ are symbols.
String
Definition: A string is a finite sequence of symbols taken from Σ.
Example: ‘cabcad’ is a valid string on the alphabet set Σ = {a, b, c, d}
Concatenation of strings: The concatenation of two strings s and t, written s||t or simply st,
is the string formed by appending t to s. For example, if x = good and y = bye, then xy =
goodbye. So |xy| = |x| + |y|.
The empty string, e, is the identity for concatenation of strings. (xe = ex = x).
Concatenation, as a function defined on strings is associative. (st)w = s (tw).
String Replication
For each string w and each natural number i, the string wi is defined as:
Example: a3 = aaa, (bye)2 = byebye, a0b3 = bbb
String Reversal: For each string w, the reverse of w, written as wR, is defined as:
4. Languages
A language is a (finite or infinite) set of strings over a finite alphabet ∑. When we are talking
about more than one language, we will use the notation ∑ , to mean the alphabet from which
the strings in the language L are formed.
Let ∑ = {a, b}. ∑* = {ε, a, b, aa, ab , ba, bb, aaa, aab .... }.
Some examples of languages over ∑ are:
Φ, {ε}, {a, b}, {ε, a, aa, aaa, aaaa, aaaaa}, {ε, a, aa, aaa, aaaa, aaaaa, . . . . }
Languages are sets. So, a computational definition of a language can be given in two ways;
• a language generator, which enumerates (lists) the elements of the language, or
• a language recognizer, which decides whether or not a candidate string is in the
language and returns True if it is and False if it isn't.
For example, the logical definition. L = {x: ∃y ϵ{a, b}* (x = ya)} can be turned into either a
language generator (enumerator) or a language recognizer.
Prepared by Harivinod N www.techjourney.in Page| 5
Lecture Notes | 15CS54 – ATC | Module 1: Finite State Machines
In some cases, when considering an enumerator for a language, we may care about the order
in which the elements of L are generated. If there exists n total order D of the elements of ∑L,
then we can use D to define on L a total order called lexicographic order (written <L.):
• Shorter strings precede longer ones: ∀x ( ∀y (( |x| < |y|) (x < L y))) and
• Of strings that are the same length sort them in dictionary order using D.
Let L= {w ϵ {a, b}*; all a's precede all b's}. The lexicographic enumeration of Lis:
ε, a. b. aa. ab. bb. aaa. aab. abb. bbb. aaaa, aaab. aabb. abbb. bbbb. aaaaa ....
Concatenation
Let L1 and L2 be two languages defined over some alphabet ∑. Then their concatenation.
written L1L2 is:
The language {ε} is the identity for concatenation of languages. So for all languages L,
L{ε} = {ε}L = L.
The language Φ is a zero for concatenation of languages. So, for all languages L, LΦ = ΦL =
Φ. That Φ is a zero follows from the definition of the concatenation of two languages as the set
consisting of all strings that can he formed by selecting some string ‘s’ from the first language
and some string ‘l’ from the second language and then concatenating them together. There are
no ways to select a string from the empty set.
Concatenation on languages is associative. So, for all languages L1L2 and L3:
((L1L2)L3 = L1 (L2L3)).
Reverse
Let L be a language defined over some alphabet ∑. Then the reverse of L , written LR is:
LR = {w ϵ ∑*: w = xR for some x ϵ L}.
In other words, LR is the set of strings that can be formed by taking some string in L and
reversing it
Kleene Star
Definition: The Kleene star denoted by Σ*, is a unary operator on a set of symbols or strings,
Σ, that gives the infinite set of all possible strings of all possible lengths over Σ including ε.
Representation: Σ* = Σ0 U Σ1 U Σ2 U……. where Σp is the set of all possible strings of length
p.
Example: If Σ = {a, b}, Σ*= {λ, a, b, aa, ab, ba, bb,………..}
Turing machine may require time that grows exponentially (or faster) with the length
of the input string.
• Decidability: There exist procedures to answer many useful questions about finite state
machines. For example, does an FSM accept some particular string? Is an FSM
minimal? Are two FSMs identical? A subset of those questions can be answered for
pushdown automata. None of them can be answered for Turing machines.
• Clarity: There exist tools that enable designers to draw and analyze finite state
machines. Every regular language can also be described using the regular expression
pattern language. Every context-free language, in addition to being recognizable by
some pushdown automaton, can be described with a context-free grammar
Note: Refer class notes for problems on construction of DFSM for some languages.