SlideShare a Scribd company logo
Theory of Computation - Lecture 3
Regular Languages


What is a computer?

Complicated, we need idealized computer for
managing mathematical theories...





Hence: Computational Models.
Comp. Models vary, depending on the
features we want them to focus on.
Simplest Comp. Model is Finite State
Machine, or Finite Automaton
Dr. Maamoun Ahmed
Finite Automaton




Good models for computers with extremely
limited memories.
With such limited memories, what can such
computers do? Give examples of such
computers!

…..
Example – Automatic Door

Door

Front pad

Rear pad
FSM/FA of Auto-door
FRONT
REAR
BOTH

REAR
BOTH
NIETHER
FRONT

CLOSED

OPEN

NEITHER
Cont.








How many bits required for auto-door
implementation?
More examples: Elevator, what are the
states and inputs?
Dishwasher, Washing machine,
Thermostats, digital watches and
calculators, etc....
Finite Automata was in mind when all of
above were designed!
Closer look at Finite Automata


Abstracting, application-independent:

Example: A finite automaton called M1 with 3
DD SSt
states:
iai tata
g ete
a
1

0

q1

q2

q3

0,1

0

rgr
am
am

1
Closer Look – Cont.


Start State



Accept State



Transitions

- When 1101 is entered from the input to Start State
(one by one, L2R), the output will be either
Accept/Reject or for now, Yes/No respectively.


Will 1101 output Accept or Reject in our
example?

What about 1? 01?11?101001001?
What about 100? 0100? 1000000?






What strings will M1 accept? What will it
reject?
Can you describe the language consisting
of all strings that M1 accepts?
…..Go on!
Formal definition of a FA
Why do we need a formal definition?
1- It is precise: Uncertain whether some FA allowed
to have 0 accept states or not? Formal definition
helps you decide.
2- It provides Notations, and they help you think
and express your thoughts clearly.




Formal definition says that FA is a list of five
objects: Set of states, input alphabet, rules for
moving, start state, and accept states
What do we call a list of 5 elements ?
Formal definition of FA – cont.




We define a FA to be a 5-tuple consisting
of these five parts.
Transition function ( δ) defines the rules of
moving.

Ex.: 2 states x, y. and an arrow from x to y
with a label=1, then moving from x to y is
ruled by reading 1 as an input, which can
be written as : δ(x,1)=y
Formal definition of FA


A finite automaton is a 5-tuple (Q, ∑ , δ, q0,
F) where:



Q is a finite set called the states



∑ is a finite set called the alphabet





δ:Q X ∑ → Q is the transition function
q0 ∈ Q is the start state, and
F ⊆ Q is the set of accept
states(sometimes called Final states).
Example


Go back to slide no.6 (M1 FA), we can
describe M1 formally by writing

M1 = (Q, ∑, δ, q1, F), where:
1. Q = {q1, q2, q3}
2. ∑ = {0,1}
3. δ is described as

0

1

q1

q1

q2

q2

q3

q2

q3

q2

q2
Example – cont.
4. q1 is the start state, and
5. F = {q2}






Note: A is a set of all strings that machine M
accepts, we say: A is the language of machine
M and write L(M)=A. We say: M recognizes A.
A machine may accept several strings, but it
always recognizes only one language.
If the machine accepts no strings, it still
recognizes one language, the empty language ϕ
Example – cont.


So, in our example let:

A = {w | w contains at least one 1 and an
even number of 0s follows the last 1}.
Then L(M1) = A, or equivalently, M1
recognizes A.


Examples of FA (1.7 – 1.15) pages 37-40

More Related Content

What's hot

Turing Machines (TM)
Turing Machines (TM)Turing Machines (TM)
Turing Machines (TM)
parmeet834
 
Limit and continuity (2)
Limit and continuity (2)Limit and continuity (2)
Limit and continuity (2)
Digvijaysinh Gohil
 
Limits
LimitsLimits
Limits
sarcia
 
Bending 3
Bending 3Bending 3
Bending 3
aero103
 
Limits
LimitsLimits
Turing machine Introduction
Turing machine IntroductionTuring machine Introduction
Turing machine Introduction
Aram Rafeq
 
Turing machine
Turing machineTuring machine
Turing machine
MuhammadSamranTanvee
 
Math 170 notation
Math 170 notationMath 170 notation
Math 170 notation
Tyler Murphy
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
AniketKandara1
 

What's hot (9)

Turing Machines (TM)
Turing Machines (TM)Turing Machines (TM)
Turing Machines (TM)
 
Limit and continuity (2)
Limit and continuity (2)Limit and continuity (2)
Limit and continuity (2)
 
Limits
LimitsLimits
Limits
 
Bending 3
Bending 3Bending 3
Bending 3
 
Limits
LimitsLimits
Limits
 
Turing machine Introduction
Turing machine IntroductionTuring machine Introduction
Turing machine Introduction
 
Turing machine
Turing machineTuring machine
Turing machine
 
Math 170 notation
Math 170 notationMath 170 notation
Math 170 notation
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 

Viewers also liked

Preparedness fair
Preparedness fairPreparedness fair
Preparedness fair
ShekharH
 
Ramboll BIM 101
Ramboll BIM 101Ramboll BIM 101
Ramboll BIM 101
Graham H Stewart
 
Cielo C Up Consulting
Cielo C Up ConsultingCielo C Up Consulting
Cielo C Up Consultingpaolouggio
 
Developing and maintaining a cert program
Developing and maintaining a cert programDeveloping and maintaining a cert program
Developing and maintaining a cert program
ShekharH
 
Edinburgh Revit User Group - BIM Level 2 to LOD Presentation
Edinburgh Revit User Group - BIM Level 2 to LOD PresentationEdinburgh Revit User Group - BIM Level 2 to LOD Presentation
Edinburgh Revit User Group - BIM Level 2 to LOD Presentation
Graham H Stewart
 
Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5
Dr. Maamoun Ahmed
 
Theory of Computation - Lectures 6 & 7
Theory of Computation - Lectures 6 & 7Theory of Computation - Lectures 6 & 7
Theory of Computation - Lectures 6 & 7
Dr. Maamoun Ahmed
 
Theory of Computation - Strings and Languages and Proofs (Lecture 2)
Theory of Computation  - Strings and Languages and Proofs (Lecture 2)Theory of Computation  - Strings and Languages and Proofs (Lecture 2)
Theory of Computation - Strings and Languages and Proofs (Lecture 2)
Dr. Maamoun Ahmed
 
Ramboll - BIM - Now It's Serious
Ramboll - BIM - Now It's SeriousRamboll - BIM - Now It's Serious
Ramboll - BIM - Now It's Serious
Graham H Stewart
 
Aalto DoD-group G
Aalto DoD-group GAalto DoD-group G
Aalto DoD-group G
tonikauppila
 
Aalto DoD-group C
Aalto DoD-group CAalto DoD-group C
Aalto DoD-group C
tonikauppila
 
Forum Lago Maggiore 23.09.2011, Charles Barras
Forum Lago Maggiore 23.09.2011, Charles BarrasForum Lago Maggiore 23.09.2011, Charles Barras
Forum Lago Maggiore 23.09.2011, Charles Barrasstornimattia
 
Aalto DoD-group B
Aalto DoD-group BAalto DoD-group B
Aalto DoD-group B
tonikauppila
 
Aalto DoD-group H
Aalto DoD-group HAalto DoD-group H
Aalto DoD-group H
tonikauppila
 
Aalto DoD-group I
Aalto DoD-group IAalto DoD-group I
Aalto DoD-group I
tonikauppila
 
Aalto DoD-group D
Aalto DoD-group DAalto DoD-group D
Aalto DoD-group D
tonikauppila
 
Realm Java 2.2.0: Build better apps, faster apps
Realm Java 2.2.0: Build better apps, faster appsRealm Java 2.2.0: Build better apps, faster apps
Realm Java 2.2.0: Build better apps, faster apps
Savvycom Savvycom
 

Viewers also liked (20)

Preparedness fair
Preparedness fairPreparedness fair
Preparedness fair
 
Ramboll BIM 101
Ramboll BIM 101Ramboll BIM 101
Ramboll BIM 101
 
Cielo C Up Consulting
Cielo C Up ConsultingCielo C Up Consulting
Cielo C Up Consulting
 
Developing and maintaining a cert program
Developing and maintaining a cert programDeveloping and maintaining a cert program
Developing and maintaining a cert program
 
Edinburgh Revit User Group - BIM Level 2 to LOD Presentation
Edinburgh Revit User Group - BIM Level 2 to LOD PresentationEdinburgh Revit User Group - BIM Level 2 to LOD Presentation
Edinburgh Revit User Group - BIM Level 2 to LOD Presentation
 
Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5
 
Theory of Computation - Lectures 6 & 7
Theory of Computation - Lectures 6 & 7Theory of Computation - Lectures 6 & 7
Theory of Computation - Lectures 6 & 7
 
Theory of Computation - Strings and Languages and Proofs (Lecture 2)
Theory of Computation  - Strings and Languages and Proofs (Lecture 2)Theory of Computation  - Strings and Languages and Proofs (Lecture 2)
Theory of Computation - Strings and Languages and Proofs (Lecture 2)
 
Ramboll - BIM - Now It's Serious
Ramboll - BIM - Now It's SeriousRamboll - BIM - Now It's Serious
Ramboll - BIM - Now It's Serious
 
Aalto DoD-group G
Aalto DoD-group GAalto DoD-group G
Aalto DoD-group G
 
Libro1
Libro1Libro1
Libro1
 
Aalto DoD-group C
Aalto DoD-group CAalto DoD-group C
Aalto DoD-group C
 
Libro1
Libro1Libro1
Libro1
 
Forum Lago Maggiore 23.09.2011, Charles Barras
Forum Lago Maggiore 23.09.2011, Charles BarrasForum Lago Maggiore 23.09.2011, Charles Barras
Forum Lago Maggiore 23.09.2011, Charles Barras
 
Aalto DoD-group B
Aalto DoD-group BAalto DoD-group B
Aalto DoD-group B
 
Aalto DoD-group H
Aalto DoD-group HAalto DoD-group H
Aalto DoD-group H
 
Aalto DoD-group I
Aalto DoD-group IAalto DoD-group I
Aalto DoD-group I
 
Aalto DoD-group D
Aalto DoD-group DAalto DoD-group D
Aalto DoD-group D
 
Realm Java 2.2.0: Build better apps, faster apps
Realm Java 2.2.0: Build better apps, faster appsRealm Java 2.2.0: Build better apps, faster apps
Realm Java 2.2.0: Build better apps, faster apps
 
StringBuilder
StringBuilderStringBuilder
StringBuilder
 

Similar to Theory of Computation - Lecture 3

@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
FariyaTasneem1
 
Automaton
AutomatonAutomaton
Automaton
SudipKambli
 
Unit iv
Unit ivUnit iv
Unit iv
TPLatchoumi
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theory
NYversity
 
Ch2 finite automaton
Ch2 finite automatonCh2 finite automaton
Ch2 finite automaton
meresie tesfay
 
01. Theory of Computing
01. Theory of Computing01. Theory of Computing
01. Theory of Computing
rabiul souvon
 
Theoryofcomp science
Theoryofcomp scienceTheoryofcomp science
Theoryofcomp science
Raghu nath
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
Prof. Dr. K. Adisesha
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
Prof. Dr. K. Adisesha
 
flat unit1
flat unit1flat unit1
flat unit1
Janhavi Vishwanath
 
Deterministic finite automata
Deterministic finite automata Deterministic finite automata
Deterministic finite automata
Muhammad Love Kian
 
A Formal Model and an Algorithm for Generating the Permutations of a Multiset
A Formal Model and an Algorithm for Generating the Permutations of a MultisetA Formal Model and an Algorithm for Generating the Permutations of a Multiset
A Formal Model and an Algorithm for Generating the Permutations of a Multiset
Vincenzo De Florio
 
Dfa h11
Dfa h11Dfa h11
Dfa h11
Rajendran
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
Techglyphs
 
Mba ebooks ! Edhole
Mba ebooks ! EdholeMba ebooks ! Edhole
Mba ebooks ! Edhole
Edhole.com
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! Edhole
Edhole.com
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
parmeet834
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar report
Yashwant Dagar
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
NAMRATA BORKAR
 
Mc0082 theory of computer science
Mc0082  theory of computer scienceMc0082  theory of computer science
Mc0082 theory of computer science
smumbahelp
 

Similar to Theory of Computation - Lecture 3 (20)

@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
 
Automaton
AutomatonAutomaton
Automaton
 
Unit iv
Unit ivUnit iv
Unit iv
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theory
 
Ch2 finite automaton
Ch2 finite automatonCh2 finite automaton
Ch2 finite automaton
 
01. Theory of Computing
01. Theory of Computing01. Theory of Computing
01. Theory of Computing
 
Theoryofcomp science
Theoryofcomp scienceTheoryofcomp science
Theoryofcomp science
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
flat unit1
flat unit1flat unit1
flat unit1
 
Deterministic finite automata
Deterministic finite automata Deterministic finite automata
Deterministic finite automata
 
A Formal Model and an Algorithm for Generating the Permutations of a Multiset
A Formal Model and an Algorithm for Generating the Permutations of a MultisetA Formal Model and an Algorithm for Generating the Permutations of a Multiset
A Formal Model and an Algorithm for Generating the Permutations of a Multiset
 
Dfa h11
Dfa h11Dfa h11
Dfa h11
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
 
Mba ebooks ! Edhole
Mba ebooks ! EdholeMba ebooks ! Edhole
Mba ebooks ! Edhole
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! Edhole
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Turing machine seminar report
Turing machine seminar reportTuring machine seminar report
Turing machine seminar report
 
Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 
Mc0082 theory of computer science
Mc0082  theory of computer scienceMc0082  theory of computer science
Mc0082 theory of computer science
 

Recently uploaded

Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 

Recently uploaded (20)

Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 

Theory of Computation - Lecture 3

  • 1. Theory of Computation - Lecture 3 Regular Languages  What is a computer? Complicated, we need idealized computer for managing mathematical theories...    Hence: Computational Models. Comp. Models vary, depending on the features we want them to focus on. Simplest Comp. Model is Finite State Machine, or Finite Automaton Dr. Maamoun Ahmed
  • 2. Finite Automaton   Good models for computers with extremely limited memories. With such limited memories, what can such computers do? Give examples of such computers! …..
  • 3. Example – Automatic Door Door Front pad Rear pad
  • 5. Cont.     How many bits required for auto-door implementation? More examples: Elevator, what are the states and inputs? Dishwasher, Washing machine, Thermostats, digital watches and calculators, etc.... Finite Automata was in mind when all of above were designed!
  • 6. Closer look at Finite Automata  Abstracting, application-independent: Example: A finite automaton called M1 with 3 DD SSt states: iai tata g ete a 1 0 q1 q2 q3 0,1 0 rgr am am 1
  • 7. Closer Look – Cont.  Start State  Accept State  Transitions - When 1101 is entered from the input to Start State (one by one, L2R), the output will be either Accept/Reject or for now, Yes/No respectively.  Will 1101 output Accept or Reject in our example? What about 1? 01?11?101001001? What about 100? 0100? 1000000?
  • 8.    What strings will M1 accept? What will it reject? Can you describe the language consisting of all strings that M1 accepts? …..Go on!
  • 9. Formal definition of a FA Why do we need a formal definition? 1- It is precise: Uncertain whether some FA allowed to have 0 accept states or not? Formal definition helps you decide. 2- It provides Notations, and they help you think and express your thoughts clearly.   Formal definition says that FA is a list of five objects: Set of states, input alphabet, rules for moving, start state, and accept states What do we call a list of 5 elements ?
  • 10. Formal definition of FA – cont.   We define a FA to be a 5-tuple consisting of these five parts. Transition function ( δ) defines the rules of moving. Ex.: 2 states x, y. and an arrow from x to y with a label=1, then moving from x to y is ruled by reading 1 as an input, which can be written as : δ(x,1)=y
  • 11. Formal definition of FA  A finite automaton is a 5-tuple (Q, ∑ , δ, q0, F) where:  Q is a finite set called the states  ∑ is a finite set called the alphabet    δ:Q X ∑ → Q is the transition function q0 ∈ Q is the start state, and F ⊆ Q is the set of accept states(sometimes called Final states).
  • 12. Example  Go back to slide no.6 (M1 FA), we can describe M1 formally by writing M1 = (Q, ∑, δ, q1, F), where: 1. Q = {q1, q2, q3} 2. ∑ = {0,1} 3. δ is described as 0 1 q1 q1 q2 q2 q3 q2 q3 q2 q2
  • 13. Example – cont. 4. q1 is the start state, and 5. F = {q2}    Note: A is a set of all strings that machine M accepts, we say: A is the language of machine M and write L(M)=A. We say: M recognizes A. A machine may accept several strings, but it always recognizes only one language. If the machine accepts no strings, it still recognizes one language, the empty language ϕ
  • 14. Example – cont.  So, in our example let: A = {w | w contains at least one 1 and an even number of 0s follows the last 1}. Then L(M1) = A, or equivalently, M1 recognizes A.  Examples of FA (1.7 – 1.15) pages 37-40