0% found this document useful (0 votes)
79 views

Theory of Automata Chapter 1

The document discusses automata theory and formal languages. It defines key concepts like automata, alphabets, strings, words, languages, and describes different ways to define languages including descriptive definition and recursive definition. It also discusses different types of automata like physical, software, and algorithmic automata and mentions that automata theory studies abstract machines and computation problems that can be solved using these machines.

Uploaded by

Jaleed Abdullah
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Theory of Automata Chapter 1

The document discusses automata theory and formal languages. It defines key concepts like automata, alphabets, strings, words, languages, and describes different ways to define languages including descriptive definition and recursive definition. It also discusses different types of automata like physical, software, and algorithmic automata and mentions that automata theory studies abstract machines and computation problems that can be solved using these machines.

Uploaded by

Jaleed Abdullah
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

T HE O R Y O F A U T O M ATA

CHAPTER 2
WHAT DOES AUTOMATA MEAN?

“SOMETHING THAT WORKS AUTOMATICALLY”

• IT IS THE PLURAL OF AUTOMATON


• MACHINE CAN BE CALLED “PROBLEM SOLVER”
TWO CATEGORIES OF MACHINES

• INTELLIGENT
• AUTOMATION
THEORY OF AUTOMATA

• Theory of automata is a theoretical branch of computer science and mathematical. It is the study
of abstract machines and the computation problems that can be solved using these machines. The
abstract machine is called the automata.

• The main motivation behind developing the automata theory was to develop methods to describe
and analyse the dynamic behaviour of discrete systems.
ASSIGNMENT

• DIFFERENTIATE INTELLIGENT AND AUTOMATION ??


• APPLICATION AND USES OF AUTOMATION ??
FORMS OF AUTOMATA

• PHYSICAL AUTOMATA
• SOFTWARE AUTOMATA
• ALGORITHMIC AUTOMATA
LANGUAGE
• A certain specified set of strings of characters from alphabets will be called language.
• A language is a collection of appropriate string. A language which is formed over Σ can
be finite or infinite.

• L1 = {set of string of length 2}


• = {Aa, bb, ba, bb} finite language

• L2 = {set of all strings starts with 'a'}


• = {A, aa, aaa, abb, abbb, ababb} infinite language
INTRODUCTION TO LANGUAGES

There are two types of languages

• Formal languages (syntactic languages)


Based on strict predefined grammar rules (all programming languages)

• Informal languages (semantic languages)


All spoken Languages based on grammar rules like s + V + O
ALPHABETS
Definition

• A finite non-empty set of symbols (called letters), is called an alphabet. It is denoted by Σ ( greek letter sigma).
Example

• Σ = {a,b}

• Σ = {0,1} (important as this is the language which the computer understands.)

• Σ = {i,j,k}

• Note certain version of language ALGOL has 113 letters.

• Σ (alphabet) includes letters, digits and a variety of operators including sequential operators such as goto and If
SYMBOLS

• Symbols are an entity or individual objects, which can be any letter, alphabet or any picture.
Example:

• 1, a, b, #
STRINGS
• It is a finite collection of symbols from the alphabet. The string is denoted by w.

• Concatenation of finite number of letters from the alphabet is called a string

Example

• If Σ = {a,b} then

• A, abab, aaabb, ababababababababab

Empty string or null string

• Sometimes a string with no symbol at all is used, denoted by (small greek letter lambda) λ or (capital greek Letter lambda) Λ, is called an
empty string or null string.

Length of String

• The number of symbols in a string w is called the length of a string. It is denoted by |w|.

• w = 010 Number of Sting |w| = 3


WORDS
Definition

• Words are strings belonging to some language.


• Example
• If Σ= {x} then a language L can be defined as
• L={xn : n=1,2,3,…..} Or l={x,xx,xxx,….}
• Here x,xx,… are the words of l
• All words are strings, but not all strings are words.
VALID/IN-VALID ALPHABETS
While defining an alphabet, an alphabet may contain letters consisting of group of symbols for example Σ1= {B, Ab, bab, d}.

• Now consider an alphabet Σ2= {B, ba, bab, d} and a string bababb.

• This string can be tokenized in two different ways

• (Ba), (bab), (B)

• (B), (abab), (B)

• Which shows that the second group cannot be identified as a string, defined over

• Σ = {a, b}.

• As when this string is scanned by the compiler (lexical analyzer), first symbol b is identified as a letter Belonging to Σ, while for the
second letter the lexical analyzer would not be able to identify, so while defining An alphabet it should be kept in mind that ambiguity
should not be created.
LENGTH OF STRINGS
Definition

• The length of string s, denoted by |s|, is the number of letters in the string.
Example

• Σ={a,b} S=ababa |S|=5


Example

• Σ= {B, aB, bab, d} S=BaBbabBd

• Tokenizing=(B), (aB), (bab), (B), (d) |S|=5


REVERSE OF A STRING
• Definition
• The reverse of a string s denoted by rev(s) or sr, is obtained by writing the letters of s in reverse order.
Example

• If s=abc is a string defined over σ={a,b,c} Then rev(s) or sr = cba


Example

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


• s=BaBbabBd
• Rev(s)=dBbabaBB
DEFINING LANGUAGES

The languages can be defined in different ways , such as

• descriptive definition,
• recursive definition,
• using Regular expressions(re) and using finite automaton(fa) etc.
1. Descriptive definition of language
• The language is defined, describing the conditions imposed on its words.
Example

• The language L of strings of odd length, defined over σ={a}, can be written as

• L={a, aaa, aaaaa,…..}


Example

• The language L of strings that does not start with a, defined over Σ ={a,b,c}, can be written as

• L ={Λ, b, c, ba, bb, bc, ca, cb, cc, …}


Example

• The language EVEN-EVEN, of strings with even number of a’s and even number of b’s, defined over Σ={a,b}, can be written as

• {Λ, aa, bb, aaaa,aabb,abab, abba, baab, baba, bbaa, bbbb,…}

You might also like