SlideShare a Scribd company logo
1 of 56
Download to read offline
1
Automata Theory
Dr. Muhammad Saleem Vighio (PhD, Denmark)
Associate Professor,
Information Technology, Quaid-e-Awam University of
Engineering, Science & Technology, Nawabshah
Lecture 01 and 02
Monday, April 08th 2017
• Course C.Hs:
• 04 C.Hs:
- Theoretical work
- Practical work
• Recommended Text Books:
• Introduction to Automata Theory, Languages and Computation
J.E. Hopcroft, R. Motwani, J.D. Ullman
3rd Edition (Addison Wesley/Pearson)
• Introduction to the Theory of Computation, 2nd Ed.
Michael Sipser
• Introduction to Computer Theory
Daniel I.A. Cohen
• Theory of Automata, Formal Languages and Computation
S. P. Eugene Xavier
• Online Literature
Course Introduction
• Teaching plan:
• 02 tests:
- At the end of 20th and 45th lectures respectively
• Class exercises
• Short presentations
• Practical exercises
Course Introduction
Lecture slides/announcements/results can be found at
course home page:
http://saleem.quest.edu.pk/
Course Introduction
• During the lecture:
• Be punctual/regular
• Concentrate on the lecture
• Remain active and interactive
• Try to find/ask (research) questions
• Think in terms of “why”, “how”
During the Course
• In studying this subject, seek to determine:
• What can and cannot be computed ?
• How quickly ?
• With how much memory ? and
• On which type of computational model ?
What to Seek?
• Introduction
• Regular Languages and their descriptors
- Finite state automata
- Non-deterministic automata
- Regular expressions
- Algorithms to decide questions about regular languages,
e.g., is it empty?
- Closure properties of regular languages.
• Context Free Languages and their descriptors
- Context free grammars
- Pushdown automata
• Turing Machines and TM Variants
• Decidable and Undecidable Languages
• Time and Space Complexities
Course Outline
• Introduction
• Models of Computation
• Languages
Lecture Outline
9
What is Automata Theory?
• Study of abstract computing devices, or “machines”
• Automaton = an abstract computing device
Note: A “device” need not even be a physical hardware!
• A fundamental question in computer science:
 Find out what different models of machines can do and
cannot do
 The theory of computation
• Computability vs. Complexity
Computation
• Computation is a general term for any type of
information processing that can be
represented as an algorithm precisely
(mathematically).
Examples:
• Adding two numbers in our brains, on a piece of
paper or using a calculator.
• Converting a decimal number to its binary
presentation or vice versa.
• Finding the greatest common divisors of two
numbers.
• …
• The theory of computation studies
• whether (computability theory), and
• how efficiently (complexity theory)
certain problems can be solved on a computer, or rather on a model
of a computer.
• Several equivalent models of computational devices can be used:
• Finite automata.
• Pushdown automata
• Simple while programming language (pseudo-code).
• Turing machines.
• ...
Theory of Computation
Theory of Computation: A
Historical Perspective
1930s • Alan Turing studies Turing machines
• Decidability
• Halting problem
1940-1950s • “Finite automata” machines studied
• Noam Chomsky proposes the
“Chomsky Hierarchy” for formal
languages
1969 Cook introduces “intractable” problems
or “NP-Hard” problems
1970- Modern computer science: compilers,
computational & complexity theory evolve
13
Models of Computation
14
Computation
CPU memory
15
CPU
input memory
output memory
Program memory
temporary memory
16
CPU
input memory
output memory
Program memory
temporary memory
3
)( xxf 
compute xx
compute xx 2
Example:
17
CPU
input memory
output memory
Program memory
temporary memory
3
)( xxf 
compute xx
compute xx 2
2x
18
CPU
input memory
output memory
Program memory
temporary memory
3
)( xxf 
compute xx
compute xx 2
2x
42*2 z
82*)(  zxf
19
CPU
input memory
output memoryProgram memory
temporary memory
3
)( xxf 
compute xx
compute xx 2
2x
42*2 z
82*)(  zxf
8)( xf
20
Automaton
CPU
input memory
output memory
Program memory
temporary memory
Automaton
21
Different Kinds of Automata
Automata are distinguished by the temporary memory
• Finite Automata: no temporary memory
• Pushdown Automata: stack
• Turing Machines: random access memory
22
input memory
output memory
temporary memory
Finite
Automaton
Finite Automaton
Example: Vending Machines
(small computing power)
23
input memory
output memory
Stack
Pushdown
Automaton
Pushdown Automaton
Example: Compilers for Programming Languages
(medium computing power)
Push, Pop
24
input memory
output memory
Random Access Memory
Turing
Machine
Turing Machine
Examples: Any Algorithm
(highest computing power)
25
Finite
Automata
Pushdown
Automata
Turing
Machine
Power of Automata
Less power More power
Solve more
computational problems
26
Languages
27
A language is a set of strings
String: A sequence of letters
Examples: “cat”, “dog”, “house”, …
Defined over an alphabet:
 zcba ,,,, 
28
Alphabets and Strings
We will use small alphabets:
Strings
abbaw
bbbaaav
abu



 ba,
baaabbbaaba
baba
abba
ab
a
29
String Operations: Concatenation
m
n
bbbv
aaaw


21
21


bbbaaa
abba
mn bbbaaawv  2121
Concatenation
abbabbbaaa
30
12aaaw n
R

naaaw 21 ababaaabbb
Reverse
bbbaaababa
String Operations: Reverse
31
String Operations: String Length
Length:
naaaw 21
nw 
1
2
4



a
aa
abbaExamples
32
String Operations:
Length of Concatenation
vuuv 
853
8
5,
3,




vuuv
aababaabuv
vabaabv
uaabuExamples
33
String Operations: Empty String
A string with no letters: 
abbaabbaabba
www





 0Observations:
34
String Operations: Substring
Substring of string:
a subsequence of consecutive characters
String Substring
bbab
b
abba
ab
abbab
abbab
abbab
abbab
35
String Operations: Prefix and Suffix
abbab
abbab
abba
abb
ab
a


b
ab
bab
bbab
abbab uvw 
prefix
suffix
prefixes Suffixes
Example:
36
String Operations: Power
 
n
n
wwww 
  abbaabbaabba 2
0
w
  0
abba
Example:
Definition:
37
String Operations: The * Operation
: the set of all possible strings from
alphabet
*

 
 ,,,,,,,,,*
,
aabaaabbbaabaaba
ba


38
String Operations: The + Operation
: the set of all possible strings from
alphabet except



 
 ,,,,,,,,,*
,
aabaaabbbaabaaba
ba



*
 ,,,,,,,, aabaaabbbaabaaba

39
Languages
A language is any subset of *
 
 ,,,,,,,,*
,
aaabbbaabaaba
ba


 
 
},,,,,{
,,
aaaaaaabaababaabba
aabaaa


Example:
Languages:
40
Note that:
}{}{ 
0}{ 
1}{ 
0
Sets
Set size
Set size
String length
41
Another Language Example
An infinite language }0:{  nbaL nn
aaaaabbbbb
aabb
ab

L Labb
42
Operations on Languages
The usual set operations
Complement:
   
   
     aaaaaabbbaaaaaba
ababbbaaaaaba
aaaabbabaabbbaaaaaba
,,,,
}{,,,
},,,{,,,





LL  *
   ,,,,,,, aaabbabaabbaa 
43
Operations on Languages: Reverse
Definition: }:{ LwwL RR

   ababbaabababaaabab R
,,,, 
}0:{
}0:{


nabL
nbaL
nnR
nn
Examples:
44
Operations on Languages: Concatenation
Definition:  2121 ,: LyLxxyLL 
  
 baaabababaaabbaaaab
aabbaaba
,,,,,
,,,

Example:
45
Operations on Languages: Power
Definition:

n
n
LLLL 
     
 bbbbbababbaaabbabaaabaaa
babababa
,,,,,,,
,,,, 3

 
   



0
0
,, aaabbaa
L
Example:
Special Case:
46
More Examples
}0:{  nbaL nn
}0,:{2
 mnbabaL mmnn
2
Laabbaaabbb
47
Operations on Languages:
Star-Closure (Kleene *)
Definition:
Example:
 210
* LLLL 
 















,,,,
,,,,
,,
,
*,
abbbbabbaaabbaaa
bbbbbbaabbaa
bba
bba

48
Operations on Languages:
Positive Closure
Definition:
 

*
21
L
LLL 
 











,,,,
,,,,
,,
,
abbbbabbaaabbaaa
bbbbbbaabbaa
bba
bba
• Recommended Tools:
• UPPAAL
http://www.uppaal.org/
• Tool for the modelling, simulation and verification of
different types of computational algorithms: real-
time, embedded, and concurrent systems e.g.,
embedded processors in mobile phones, microwave
ovens, sensor nodes communicating with the
environment, traffic control systems and so on.
ToC: Course Introduction
INPUT
UPPAAL
 Introduction To Autumata Theory
 Introduction To Autumata Theory
 Introduction To Autumata Theory
 Introduction To Autumata Theory
 Introduction To Autumata Theory
 Introduction To Autumata Theory

More Related Content

What's hot

Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"Ra'Fat Al-Msie'deen
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Animesh Chaturvedi
 
0.0 Introduction to theory of computation
0.0 Introduction to theory of computation0.0 Introduction to theory of computation
0.0 Introduction to theory of computationSampath Kumar S
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia Khalid
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptxSyed Zaid Irshad
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of AlgorithmsBulbul Agrawal
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysisDattatray Gandhmal
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languagesparmeet834
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite AutomataRatnakar Mikkili
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentationfazli khaliq
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introductionwahab khan
 
Context free grammars
Context free grammarsContext free grammars
Context free grammarsRonak Thakkar
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expressionAnimesh Chaturvedi
 
Basic Foundations of Automata Theory
Basic Foundations of Automata TheoryBasic Foundations of Automata Theory
Basic Foundations of Automata Theorysaugat86
 

What's hot (20)

Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
 
0.0 Introduction to theory of computation
0.0 Introduction to theory of computation0.0 Introduction to theory of computation
0.0 Introduction to theory of computation
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptx
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of Algorithms
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysis
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
COMPILER DESIGN
COMPILER DESIGNCOMPILER DESIGN
COMPILER DESIGN
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
 
Chomsky Hierarchy.ppt
Chomsky Hierarchy.pptChomsky Hierarchy.ppt
Chomsky Hierarchy.ppt
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introduction
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expression
 
Basic Foundations of Automata Theory
Basic Foundations of Automata TheoryBasic Foundations of Automata Theory
Basic Foundations of Automata Theory
 

Similar to Introduction To Autumata Theory

On the Necessity and Inapplicability of Python
On the Necessity and Inapplicability of PythonOn the Necessity and Inapplicability of Python
On the Necessity and Inapplicability of PythonTakeshi Akutsu
 
On the necessity and inapplicability of python
On the necessity and inapplicability of pythonOn the necessity and inapplicability of python
On the necessity and inapplicability of pythonYung-Yu Chen
 
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.pptBCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.pptKirti Verma
 
1 MODULE 1.1 AND 1.2-Introduction.ppt
1 MODULE 1.1 AND 1.2-Introduction.ppt1 MODULE 1.1 AND 1.2-Introduction.ppt
1 MODULE 1.1 AND 1.2-Introduction.pptVivek Parashar
 
Resonance Introduction at SacPy
Resonance Introduction at SacPyResonance Introduction at SacPy
Resonance Introduction at SacPymoorepants
 
Introduction to Python programming 1.pptx
Introduction to Python programming 1.pptxIntroduction to Python programming 1.pptx
Introduction to Python programming 1.pptxJoshuaAnnan5
 
6-9-2017-slides-vFinal.pptx
6-9-2017-slides-vFinal.pptx6-9-2017-slides-vFinal.pptx
6-9-2017-slides-vFinal.pptxSimRelokasi2
 
Algorithms - a brief introduction
Algorithms - a brief introductionAlgorithms - a brief introduction
Algorithms - a brief introductionGiacomo Belocchi
 
Introduction to Computer Architecture
Introduction to Computer ArchitectureIntroduction to Computer Architecture
Introduction to Computer ArchitectureKSundarAPIICSE
 
M.tech admission in india
M.tech admission in indiaM.tech admission in india
M.tech admission in indiaEdhole.com
 
M.tech admission in india
M.tech admission in indiaM.tech admission in india
M.tech admission in indiaEdhole.com
 
Stroustrup c++0x overview
Stroustrup c++0x overviewStroustrup c++0x overview
Stroustrup c++0x overviewVaibhav Bajaj
 

Similar to Introduction To Autumata Theory (20)

Lecture 1 (bce-7)
Lecture   1 (bce-7)Lecture   1 (bce-7)
Lecture 1 (bce-7)
 
Acm icpc-briefing-prof-nbv
Acm icpc-briefing-prof-nbvAcm icpc-briefing-prof-nbv
Acm icpc-briefing-prof-nbv
 
Paradigms
ParadigmsParadigms
Paradigms
 
Plc part 1
Plc part 1Plc part 1
Plc part 1
 
Unit no_1.pptx
Unit no_1.pptxUnit no_1.pptx
Unit no_1.pptx
 
Mcs lec2
Mcs lec2Mcs lec2
Mcs lec2
 
On the Necessity and Inapplicability of Python
On the Necessity and Inapplicability of PythonOn the Necessity and Inapplicability of Python
On the Necessity and Inapplicability of Python
 
On the necessity and inapplicability of python
On the necessity and inapplicability of pythonOn the necessity and inapplicability of python
On the necessity and inapplicability of python
 
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.pptBCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
 
1 MODULE 1.1 AND 1.2-Introduction.ppt
1 MODULE 1.1 AND 1.2-Introduction.ppt1 MODULE 1.1 AND 1.2-Introduction.ppt
1 MODULE 1.1 AND 1.2-Introduction.ppt
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Resonance Introduction at SacPy
Resonance Introduction at SacPyResonance Introduction at SacPy
Resonance Introduction at SacPy
 
Introduction to Python programming 1.pptx
Introduction to Python programming 1.pptxIntroduction to Python programming 1.pptx
Introduction to Python programming 1.pptx
 
6-9-2017-slides-vFinal.pptx
6-9-2017-slides-vFinal.pptx6-9-2017-slides-vFinal.pptx
6-9-2017-slides-vFinal.pptx
 
Algorithms - a brief introduction
Algorithms - a brief introductionAlgorithms - a brief introduction
Algorithms - a brief introduction
 
Lec 01 introduction
Lec 01   introductionLec 01   introduction
Lec 01 introduction
 
Introduction to Computer Architecture
Introduction to Computer ArchitectureIntroduction to Computer Architecture
Introduction to Computer Architecture
 
M.tech admission in india
M.tech admission in indiaM.tech admission in india
M.tech admission in india
 
M.tech admission in india
M.tech admission in indiaM.tech admission in india
M.tech admission in india
 
Stroustrup c++0x overview
Stroustrup c++0x overviewStroustrup c++0x overview
Stroustrup c++0x overview
 

More from Abdul Rehman

Introduction Relational Marketing
Introduction Relational Marketing Introduction Relational Marketing
Introduction Relational Marketing Abdul Rehman
 
Software Engineering
Software Engineering Software Engineering
Software Engineering Abdul Rehman
 
Query optimization in SQL
Query optimization in SQLQuery optimization in SQL
Query optimization in SQLAbdul Rehman
 
computer System UNit Every thing
computer System UNit Every thingcomputer System UNit Every thing
computer System UNit Every thingAbdul Rehman
 
Education system in Pakistan
Education system in PakistanEducation system in Pakistan
Education system in PakistanAbdul Rehman
 
How to write a letter
How to write a letterHow to write a letter
How to write a letterAbdul Rehman
 
Writing good paragraphs ppt
Writing good paragraphs pptWriting good paragraphs ppt
Writing good paragraphs pptAbdul Rehman
 
programming c language.
programming c language. programming c language.
programming c language. Abdul Rehman
 

More from Abdul Rehman (8)

Introduction Relational Marketing
Introduction Relational Marketing Introduction Relational Marketing
Introduction Relational Marketing
 
Software Engineering
Software Engineering Software Engineering
Software Engineering
 
Query optimization in SQL
Query optimization in SQLQuery optimization in SQL
Query optimization in SQL
 
computer System UNit Every thing
computer System UNit Every thingcomputer System UNit Every thing
computer System UNit Every thing
 
Education system in Pakistan
Education system in PakistanEducation system in Pakistan
Education system in Pakistan
 
How to write a letter
How to write a letterHow to write a letter
How to write a letter
 
Writing good paragraphs ppt
Writing good paragraphs pptWriting good paragraphs ppt
Writing good paragraphs ppt
 
programming c language.
programming c language. programming c language.
programming c language.
 

Recently uploaded

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Recently uploaded (20)

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

Introduction To Autumata Theory

  • 1. 1 Automata Theory Dr. Muhammad Saleem Vighio (PhD, Denmark) Associate Professor, Information Technology, Quaid-e-Awam University of Engineering, Science & Technology, Nawabshah Lecture 01 and 02 Monday, April 08th 2017
  • 2. • Course C.Hs: • 04 C.Hs: - Theoretical work - Practical work • Recommended Text Books: • Introduction to Automata Theory, Languages and Computation J.E. Hopcroft, R. Motwani, J.D. Ullman 3rd Edition (Addison Wesley/Pearson) • Introduction to the Theory of Computation, 2nd Ed. Michael Sipser • Introduction to Computer Theory Daniel I.A. Cohen • Theory of Automata, Formal Languages and Computation S. P. Eugene Xavier • Online Literature Course Introduction
  • 3. • Teaching plan: • 02 tests: - At the end of 20th and 45th lectures respectively • Class exercises • Short presentations • Practical exercises Course Introduction
  • 4. Lecture slides/announcements/results can be found at course home page: http://saleem.quest.edu.pk/ Course Introduction
  • 5. • During the lecture: • Be punctual/regular • Concentrate on the lecture • Remain active and interactive • Try to find/ask (research) questions • Think in terms of “why”, “how” During the Course
  • 6. • In studying this subject, seek to determine: • What can and cannot be computed ? • How quickly ? • With how much memory ? and • On which type of computational model ? What to Seek?
  • 7. • Introduction • Regular Languages and their descriptors - Finite state automata - Non-deterministic automata - Regular expressions - Algorithms to decide questions about regular languages, e.g., is it empty? - Closure properties of regular languages. • Context Free Languages and their descriptors - Context free grammars - Pushdown automata • Turing Machines and TM Variants • Decidable and Undecidable Languages • Time and Space Complexities Course Outline
  • 8. • Introduction • Models of Computation • Languages Lecture Outline
  • 9. 9 What is Automata Theory? • Study of abstract computing devices, or “machines” • Automaton = an abstract computing device Note: A “device” need not even be a physical hardware! • A fundamental question in computer science:  Find out what different models of machines can do and cannot do  The theory of computation • Computability vs. Complexity
  • 10. Computation • Computation is a general term for any type of information processing that can be represented as an algorithm precisely (mathematically). Examples: • Adding two numbers in our brains, on a piece of paper or using a calculator. • Converting a decimal number to its binary presentation or vice versa. • Finding the greatest common divisors of two numbers. • …
  • 11. • The theory of computation studies • whether (computability theory), and • how efficiently (complexity theory) certain problems can be solved on a computer, or rather on a model of a computer. • Several equivalent models of computational devices can be used: • Finite automata. • Pushdown automata • Simple while programming language (pseudo-code). • Turing machines. • ... Theory of Computation
  • 12. Theory of Computation: A Historical Perspective 1930s • Alan Turing studies Turing machines • Decidability • Halting problem 1940-1950s • “Finite automata” machines studied • Noam Chomsky proposes the “Chomsky Hierarchy” for formal languages 1969 Cook introduces “intractable” problems or “NP-Hard” problems 1970- Modern computer science: compilers, computational & complexity theory evolve
  • 15. 15 CPU input memory output memory Program memory temporary memory
  • 16. 16 CPU input memory output memory Program memory temporary memory 3 )( xxf  compute xx compute xx 2 Example:
  • 17. 17 CPU input memory output memory Program memory temporary memory 3 )( xxf  compute xx compute xx 2 2x
  • 18. 18 CPU input memory output memory Program memory temporary memory 3 )( xxf  compute xx compute xx 2 2x 42*2 z 82*)(  zxf
  • 19. 19 CPU input memory output memoryProgram memory temporary memory 3 )( xxf  compute xx compute xx 2 2x 42*2 z 82*)(  zxf 8)( xf
  • 20. 20 Automaton CPU input memory output memory Program memory temporary memory Automaton
  • 21. 21 Different Kinds of Automata Automata are distinguished by the temporary memory • Finite Automata: no temporary memory • Pushdown Automata: stack • Turing Machines: random access memory
  • 22. 22 input memory output memory temporary memory Finite Automaton Finite Automaton Example: Vending Machines (small computing power)
  • 23. 23 input memory output memory Stack Pushdown Automaton Pushdown Automaton Example: Compilers for Programming Languages (medium computing power) Push, Pop
  • 24. 24 input memory output memory Random Access Memory Turing Machine Turing Machine Examples: Any Algorithm (highest computing power)
  • 25. 25 Finite Automata Pushdown Automata Turing Machine Power of Automata Less power More power Solve more computational problems
  • 27. 27 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet:  zcba ,,,, 
  • 28. 28 Alphabets and Strings We will use small alphabets: Strings abbaw bbbaaav abu     ba, baaabbbaaba baba abba ab a
  • 30. 30 12aaaw n R  naaaw 21 ababaaabbb Reverse bbbaaababa String Operations: Reverse
  • 31. 31 String Operations: String Length Length: naaaw 21 nw  1 2 4    a aa abbaExamples
  • 32. 32 String Operations: Length of Concatenation vuuv  853 8 5, 3,     vuuv aababaabuv vabaabv uaabuExamples
  • 33. 33 String Operations: Empty String A string with no letters:  abbaabbaabba www       0Observations:
  • 34. 34 String Operations: Substring Substring of string: a subsequence of consecutive characters String Substring bbab b abba ab abbab abbab abbab abbab
  • 35. 35 String Operations: Prefix and Suffix abbab abbab abba abb ab a   b ab bab bbab abbab uvw  prefix suffix prefixes Suffixes Example:
  • 36. 36 String Operations: Power   n n wwww    abbaabbaabba 2 0 w   0 abba Example: Definition:
  • 37. 37 String Operations: The * Operation : the set of all possible strings from alphabet *     ,,,,,,,,,* , aabaaabbbaabaaba ba  
  • 38. 38 String Operations: The + Operation : the set of all possible strings from alphabet except       ,,,,,,,,,* , aabaaabbbaabaaba ba    *  ,,,,,,,, aabaaabbbaabaaba 
  • 39. 39 Languages A language is any subset of *    ,,,,,,,,* , aaabbbaabaaba ba       },,,,,{ ,, aaaaaaabaababaabba aabaaa   Example: Languages:
  • 40. 40 Note that: }{}{  0}{  1}{  0 Sets Set size Set size String length
  • 41. 41 Another Language Example An infinite language }0:{  nbaL nn aaaaabbbbb aabb ab  L Labb
  • 42. 42 Operations on Languages The usual set operations Complement:              aaaaaabbbaaaaaba ababbbaaaaaba aaaabbabaabbbaaaaaba ,,,, }{,,, },,,{,,,      LL  *    ,,,,,,, aaabbabaabbaa 
  • 43. 43 Operations on Languages: Reverse Definition: }:{ LwwL RR     ababbaabababaaabab R ,,,,  }0:{ }0:{   nabL nbaL nnR nn Examples:
  • 44. 44 Operations on Languages: Concatenation Definition:  2121 ,: LyLxxyLL      baaabababaaabbaaaab aabbaaba ,,,,, ,,,  Example:
  • 45. 45 Operations on Languages: Power Definition:  n n LLLL         bbbbbababbaaabbabaaabaaa babababa ,,,,,,, ,,,, 3           0 0 ,, aaabbaa L Example: Special Case:
  • 46. 46 More Examples }0:{  nbaL nn }0,:{2  mnbabaL mmnn 2 Laabbaaabbb
  • 47. 47 Operations on Languages: Star-Closure (Kleene *) Definition: Example:  210 * LLLL                   ,,,, ,,,, ,, , *, abbbbabbaaabbaaa bbbbbbaabbaa bba bba 
  • 48. 48 Operations on Languages: Positive Closure Definition:    * 21 L LLL               ,,,, ,,,, ,, , abbbbabbaaabbaaa bbbbbbaabbaa bba bba
  • 49. • Recommended Tools: • UPPAAL http://www.uppaal.org/ • Tool for the modelling, simulation and verification of different types of computational algorithms: real- time, embedded, and concurrent systems e.g., embedded processors in mobile phones, microwave ovens, sensor nodes communicating with the environment, traffic control systems and so on. ToC: Course Introduction