SlideShare a Scribd company logo
1
Finite Automata
What Are They?
An Example: Scoring in Tennis
Courtesy: Jeff Ullman
2
What is a Finite Automaton?
A formal system.
Remembers only a finite amount of
information.
Information represented by its state.
State changes in response to inputs.
Rules that tell how the state changes in
response to inputs are called transitions.
Courtesy: Jeff Ullman
3
Informal Explanation
Finite automata are finite collections of
states with transition rules that take
you from one state to another.
Original application was sequential
switching circuits, where the “state”
was the settings of internal bits.
Today, several kinds of software can be
modeled by FA.
Courtesy: Jeff Ullman
4
Representing FA
Simplest representation is often a
graph.
 Nodes = states.
 Arcs indicate state transitions.
 Labels on arcs tell what causes the
transition.
Courtesy: Jeff Ullman
5
Tennis
 Like ping-pong, except you are very
tiny and stand on the table.
 Match = 3-5 sets.
 Set = 6 or more games.
Courtesy: Jeff Ullman
6
Scoring a Game
One person serves throughout.
To win, you must score at least 4
points.
You also must win by at least 2 points.
Inputs are s = “server wins point” and
o = “opponent wins point.”
Courtesy: Jeff Ullman
7
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
Courtesy: Jeff Ullman
8
Acceptance of Inputs
Given a sequence of inputs (input
string ), start in the start state and
follow the transition from each symbol
in turn.
Input is accepted if you wind up in a
final (accepting) state after all inputs
have been read.
Courtesy: Jeff Ullman
9
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
10
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
11
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
12
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
13
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
14
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
15
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
16
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
17
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
18
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
19
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
20
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s
*
Courtesy: Jeff Ullman
21
Example: Processing a String
Love
Start
Love-15
15-Love
s
o
Love-30
15-all
30-Love
s
s
o
o
Love-40
15-30
30-15
40-Love
s
s
s
o
o
o
Server
Wins
Opp’nt
Wins
s
o
40-15
15-40
30-all
s
s
s
o
o
o
30-40
40-30
s
s
s
o
o
o
deuce
s
s
o
o
Ad-out
Ad-in
s
o
s
o
s
o
s o s o s o s o s o s s *
Courtesy: Jeff Ullman
22
Example: Recognizing Strings
Ending in “ing”
nothing Saw i
i
Not i
Saw ing
g
i
Not i or g
Saw in
n
i
Not i or n
Start
Courtesy: Jeff Ullman
23
Automata to Code
 In C/C++, make a piece of code for
each state. This code:
1. Reads the next input.
2. Decides on the next state.
3. Jumps to the beginning of the code for
that state.
Courtesy: Jeff Ullman
24
Example: Automata to Code
2: /* i seen */
c = getNextInput();
if (c == ’n’) goto 3;
else if (c == ’i’) goto 2;
else goto 1;
3: /* ”in” seen */
. . .
Courtesy: Jeff Ullman
25
Language of an Automaton
The set of strings accepted by an
automaton A is the language of A.
Denoted L(A).
Different sets of final states -> different
languages.
Example: As designed, L(Tennis) =
strings that determine the winner.
Courtesy: Jeff Ullman

More Related Content

More from Shiraz316

K neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationK neareast neighbor algorithm presentation
K neareast neighbor algorithm presentation
Shiraz316
 
Khi 087 revised dt report
Khi 087 revised dt reportKhi 087 revised dt report
Khi 087 revised dt report
Shiraz316
 
Khi 117 revised dt report
Khi 117 revised dt reportKhi 117 revised dt report
Khi 117 revised dt report
Shiraz316
 
Khi 164 revised dt report
Khi 164 revised dt reportKhi 164 revised dt report
Khi 164 revised dt report
Shiraz316
 
Khi 054 revised dt report
Khi 054 revised dt reportKhi 054 revised dt report
Khi 054 revised dt report
Shiraz316
 
Khi 061 revised dt report
Khi 061 revised dt reportKhi 061 revised dt report
Khi 061 revised dt report
Shiraz316
 
Khi 022 revised dt report
Khi 022 revised dt reportKhi 022 revised dt report
Khi 022 revised dt report
Shiraz316
 
Khi 113 revised dt report
Khi 113 revised dt reportKhi 113 revised dt report
Khi 113 revised dt report
Shiraz316
 
Khi 156 revised dt report
Khi 156 revised dt reportKhi 156 revised dt report
Khi 156 revised dt report
Shiraz316
 
Khi 142 revised dt report
Khi 142 revised dt reportKhi 142 revised dt report
Khi 142 revised dt report
Shiraz316
 
Khi 316 revised dt report
Khi 316 revised dt reportKhi 316 revised dt report
Khi 316 revised dt report
Shiraz316
 
Khi 186 revised dt report
Khi 186 revised dt reportKhi 186 revised dt report
Khi 186 revised dt report
Shiraz316
 
Khi 052 revised dt report
Khi 052 revised dt reportKhi 052 revised dt report
Khi 052 revised dt report
Shiraz316
 
Khi 151 revised dt report
Khi 151 revised dt reportKhi 151 revised dt report
Khi 151 revised dt report
Shiraz316
 
Khi 150 revised dt report
Khi 150 revised dt reportKhi 150 revised dt report
Khi 150 revised dt report
Shiraz316
 
Khi 078 revised dt report
Khi 078 revised dt reportKhi 078 revised dt report
Khi 078 revised dt report
Shiraz316
 
LTE quick introduction session Training
LTE quick introduction session TrainingLTE quick introduction session Training
LTE quick introduction session Training
Shiraz316
 
LTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceLTE Sales Training for CPE Device
LTE Sales Training for CPE Device
Shiraz316
 
Witribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEWitribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTE
Shiraz316
 
Network entry success rate
Network entry success rateNetwork entry success rate
Network entry success rate
Shiraz316
 

More from Shiraz316 (20)

K neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationK neareast neighbor algorithm presentation
K neareast neighbor algorithm presentation
 
Khi 087 revised dt report
Khi 087 revised dt reportKhi 087 revised dt report
Khi 087 revised dt report
 
Khi 117 revised dt report
Khi 117 revised dt reportKhi 117 revised dt report
Khi 117 revised dt report
 
Khi 164 revised dt report
Khi 164 revised dt reportKhi 164 revised dt report
Khi 164 revised dt report
 
Khi 054 revised dt report
Khi 054 revised dt reportKhi 054 revised dt report
Khi 054 revised dt report
 
Khi 061 revised dt report
Khi 061 revised dt reportKhi 061 revised dt report
Khi 061 revised dt report
 
Khi 022 revised dt report
Khi 022 revised dt reportKhi 022 revised dt report
Khi 022 revised dt report
 
Khi 113 revised dt report
Khi 113 revised dt reportKhi 113 revised dt report
Khi 113 revised dt report
 
Khi 156 revised dt report
Khi 156 revised dt reportKhi 156 revised dt report
Khi 156 revised dt report
 
Khi 142 revised dt report
Khi 142 revised dt reportKhi 142 revised dt report
Khi 142 revised dt report
 
Khi 316 revised dt report
Khi 316 revised dt reportKhi 316 revised dt report
Khi 316 revised dt report
 
Khi 186 revised dt report
Khi 186 revised dt reportKhi 186 revised dt report
Khi 186 revised dt report
 
Khi 052 revised dt report
Khi 052 revised dt reportKhi 052 revised dt report
Khi 052 revised dt report
 
Khi 151 revised dt report
Khi 151 revised dt reportKhi 151 revised dt report
Khi 151 revised dt report
 
Khi 150 revised dt report
Khi 150 revised dt reportKhi 150 revised dt report
Khi 150 revised dt report
 
Khi 078 revised dt report
Khi 078 revised dt reportKhi 078 revised dt report
Khi 078 revised dt report
 
LTE quick introduction session Training
LTE quick introduction session TrainingLTE quick introduction session Training
LTE quick introduction session Training
 
LTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceLTE Sales Training for CPE Device
LTE Sales Training for CPE Device
 
Witribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEWitribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTE
 
Network entry success rate
Network entry success rateNetwork entry success rate
Network entry success rate
 

Recently uploaded

New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...
IJECEIAES
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
obonagu
 

Recently uploaded (20)

New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 

Finite Automata

  • 1. 1 Finite Automata What Are They? An Example: Scoring in Tennis Courtesy: Jeff Ullman
  • 2. 2 What is a Finite Automaton? A formal system. Remembers only a finite amount of information. Information represented by its state. State changes in response to inputs. Rules that tell how the state changes in response to inputs are called transitions. Courtesy: Jeff Ullman
  • 3. 3 Informal Explanation Finite automata are finite collections of states with transition rules that take you from one state to another. Original application was sequential switching circuits, where the “state” was the settings of internal bits. Today, several kinds of software can be modeled by FA. Courtesy: Jeff Ullman
  • 4. 4 Representing FA Simplest representation is often a graph.  Nodes = states.  Arcs indicate state transitions.  Labels on arcs tell what causes the transition. Courtesy: Jeff Ullman
  • 5. 5 Tennis  Like ping-pong, except you are very tiny and stand on the table.  Match = 3-5 sets.  Set = 6 or more games. Courtesy: Jeff Ullman
  • 6. 6 Scoring a Game One person serves throughout. To win, you must score at least 4 points. You also must win by at least 2 points. Inputs are s = “server wins point” and o = “opponent wins point.” Courtesy: Jeff Ullman
  • 8. 8 Acceptance of Inputs Given a sequence of inputs (input string ), start in the start state and follow the transition from each symbol in turn. Input is accepted if you wind up in a final (accepting) state after all inputs have been read. Courtesy: Jeff Ullman
  • 9. 9 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 10. 10 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 11. 11 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 12. 12 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 13. 13 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 14. 14 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 15. 15 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 16. 16 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 17. 17 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 18. 18 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 19. 19 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 20. 20 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 21. 21 Example: Processing a String Love Start Love-15 15-Love s o Love-30 15-all 30-Love s s o o Love-40 15-30 30-15 40-Love s s s o o o Server Wins Opp’nt Wins s o 40-15 15-40 30-all s s s o o o 30-40 40-30 s s s o o o deuce s s o o Ad-out Ad-in s o s o s o s o s o s o s o s o s s * Courtesy: Jeff Ullman
  • 22. 22 Example: Recognizing Strings Ending in “ing” nothing Saw i i Not i Saw ing g i Not i or g Saw in n i Not i or n Start Courtesy: Jeff Ullman
  • 23. 23 Automata to Code  In C/C++, make a piece of code for each state. This code: 1. Reads the next input. 2. Decides on the next state. 3. Jumps to the beginning of the code for that state. Courtesy: Jeff Ullman
  • 24. 24 Example: Automata to Code 2: /* i seen */ c = getNextInput(); if (c == ’n’) goto 3; else if (c == ’i’) goto 2; else goto 1; 3: /* ”in” seen */ . . . Courtesy: Jeff Ullman
  • 25. 25 Language of an Automaton The set of strings accepted by an automaton A is the language of A. Denoted L(A). Different sets of final states -> different languages. Example: As designed, L(Tennis) = strings that determine the winner. Courtesy: Jeff Ullman