SlideShare a Scribd company logo
1 of 41
1
Welcome to CS105
and
Happy and fruitful New Year
‫טובה‬ ‫שנה‬
(Happy New Year)
Staff
Instructor: Amos Israeli room 2-106 .
Office Hours: Fri 10-12 or by arrangement
Tel#: 534-886
e-mail: aisraeli “at” cs.ucsd.edu
TA: Scott Yilek room B-240a
Office Hours: Mon 4-5:30
e-mail: syilek “at” cs.ucsd.edu
• Web Page:
http://www.cse.ucsd.edu/classes/fa08/cse105
2
Meeting Times
Lectures: Tue, Thu 3:30p - 4:50p WLH 2111
Note: Thu Oct 9 Lecture is canceled, there
may be a make-up lecture by quarter’s end.
Sections: Mon, 1:00p - 1:50p WLH 2209 – Scott
Tue, 3:00p - 3:50p WLH 2209 – Amos
Note: Students should come to both sections.
Mid-term: Thu Oct 23 3:30p WLH 2111
Final: Tue Dec 9 11:30a - 2:20p TBA
3
Homework
There will be 5-6 assignments.
Assignments will be given on Monday’s section
and must be returned by the Thu lecture one
week later.
First assignment will be given next Monday and
must be returned on Wed Oct 8 or in Scott’s
mailbox on Thu Oct 9th.
4
Academic Integrity
• You are encouraged to discuss the
assignments problems among yourselves.
• Each student must hand in her/his own
solution.
• You must Adhere to all rules of Academic
Integrity of CS Dept. UCSD and others.
(Meaning: no cheating or copying from any
source)
5
Grading
• Assignments: 20%
• Midterm: 30% - 0% (students are allowed to
drop it), open book, open notes.
• Final: 50% - 80%, open book, open notes.
6
Grading
• A: (85-100)
• B: (70-84)
• C: (55-69)
• D: (40-54)
• F: (0-39)
7
Bibliography
8
Required: Michael Sipser: Introduction to the
Theory of Computation, Second Edition,
Thomson.
9
Introduction to Computability
Theory
Lecture1: Finite Automata and Regular
Languages
Prof. Amos Israeli
(
‫פרופ‬
'
‫ישראלי‬ ‫עמוס‬
)
Introduction
Computer Science stems from two starting
points:
Mathematics: What can be computed?
And what cannot be computed?
Electrical Engineering: How can we build
computers?
Not in this course.
10
Introduction
Computability Theory deals with the profound
mathematical basis for Computer Science, yet
it has some interesting practical ramifications
that I will try to point out sometimes.
The question we will try to answer in this course
is:
“What can be computed? What Cannot be
computed and where is the line between the
two?”
11
Computational Models
A Computational Model is a mathematical
object (Defined on paper) that enables us to
reason about computation and to study the
properties and limitations of computing.
We will deal with Three principal computational
models in increasing order of Computational
Power.
12
Computational Models
We will deal with three principal models of
computations:
1. Finite Automaton (in short FA).
recognizes Regular Languages .
2. Stack Automaton.
recognizes Context Free Languages .
3. Turing Machines (in short TM).
recognizes Computable Languages .
13
Alan Turing - A Short Detour
Dr. Alan Turing is one of the founders of Computer
Science (he was an English Mathematician).
Important facts:
1. “Invented” Turing machines.
2. “Invented” the Turing Test.
3. Broke the German submarine transmission
coding machine “Enigma”.
4. Was arraigned for being gay and committed
suicide soon after.
14
Finite Automata - A Short Example
• The control of a washing machine is a very
simple example of a finite automaton.
• The most simple washing machine accepts
quarters and operation does not start until at
least 3 quarters were inserted.
Thanks: Vadim Lyubasehvsky
Now on PostDoc in Tel-Aviv
Finite Automata - A Short Example
• The control of a washing machine is a very
simple example of a finite automaton.
• The most simple washing machine accepts
quarters and operation does not start until at
least 3 quarters were inserted.
• The second washing machine accepts 50 cents
coins as well.
Finite Automata - A Short Example
• The control of a washing machine is a very
simple example of a finite automaton.
• The most simple washing machine accepts
quarters and operation does not start until at
least 3 quarters were inserted.
• The second washing machine accepts 50 cents
coins as well.
• The most complex washing machine accepts
$1 coins too.
}
,
,
{ 1
0 q
q
q
Q s

Finite Automaton - An Example
21
s
q
1
q
0
q
0
1
States:
,
0,1
0,1
,
Initial State: s
q
Final State: 0
q
Finite Automaton – An Example
22
s
q
1
q
0
q
0
1
,
0,1
0,1
,
Accepted words: ,...
001
,
000
,
01
,
00
,
0
Transition Function:   0
0
, q
qs 
   1
1
, q
qs 

    0
0
0 1
,
0
, q
q
q 
 
     1
1
1 1
,
0
, q
q
q 


Alphabet: .
 
1
,
0 Note: Each state has all transitions .
A finite automaton is a 5-tupple
where:
1. is a finite set called the states.
2. is a finite set called the alphabet.
3. is the transition function.
4. is the start state, and
5. is the set of accept states.
Finite Automaton – Formal Definition
23
,
,
 
F
q
Q ,
,
,
, 0


Q

Q
Q 


:

Q
q 
0
Q
F 
1. Each state has a single transition for each
symbol in the alphabet.
2. Every FA has a computation for every finite
string over the alphabet.
Observations
24
,
,
1. accepts all words (strings) ending with 1.
The language recognized by , called
satisfies: .
   
1
with
ends
|
2 w
w
M
L 
Examples
25
2
M
2
M
 
2
M
L
How to do it
1. Find some simple examples (short accepted and
rejected words)
2. Think what should each state “remember”
(represent).
3. Draw the states with a proper name.
4. Draw transitions that preserve the states’
“memory”.
5. Validate or correct.
6. Write a correctness argument.
The automaton
Correctness Argument:
The FA’s states encode the last input bit and
is the only accepting state. The transition
function preserves the states encoding.
1
q
1. accepts all words (strings) ending with 1.
.
2. accepts all words ending with 0.
2’. accepts all words ending with 0 and
the empty word .
This is the Complement Automaton of .
Examples
28
2
M
   
1
with
ends
|
2 w
w
M
L 
3
M
4
M

2
M
1. accepts all words (strings) ending with 1.
.
2. accepts all words ending with 0.
3. accepts all strings over alphabet
that start and end with the same symbol .
Examples
29
2
M
   
1
with
ends
|
2 w
w
M
L 
3
M
4
M  
b
a,
4. accepts all words of the form
where are integers and .
5. accepts all words in .
Examples (cont)
30
5
M
6
M  
10
,
01
,
00
,
1
,
0
n
m
1
0
0
, 
n
m
n
m,







4
of
multiple
a
is
value
binary
whose
strings
bit
3
L
• Definition: A language is a set of strings over
some alphabet .
• Examples:
–
–
–
Languages
31
 
1110001
,
10
,
1
,
0
1 
L
 
integers
positive
are
,
|
1
0
2 m
n
L n
m

• A language of an FA, , , is the set of
words (strings) that accepts.
• If we say that recognizes .
• If is recognized by some finite
automaton , is a Regular Language.
Languages
32
,
M  
M
L
M
 
M
L
La  M La
La
A La
Q1: How do you prove that a language is regular?
A1: By presenting an FA, , satisfying .
Q2: How do you prove that a language is not
regular?
A2: Hard! to be answered on Week3 of the course.
Q3: Why is it important?
A3: Recognition of a regular language requires a
controller with bounded Memory.
Some Questions
33
M  
M
L
La 
La
La
Let and be 2 regular languages above the
same alphabet, . We define the 3 Regular
Operations:
• Union: .
• Concatenation: .
• Star: .
The Regular Operations
34
A B
 
B
x
A
x
x
B
A 


 or
|
 
B
y
A
x
xy
B
A 

 and
|

 
A
x
k
x
x
x
A k
k 

 and
0
|
,...,
, 2
1
*

• given a language one can verify it is regular by
presenting an FA that accept the language.
• Regular Operations give us a systematic way of
constructing languages that are apriority
regular. (That is: No verification is required).
The Regular Operations
35
•
• .
• .
The Regular Operations - Examples
36
 
boy
girl,

B
 
bad
good
A ,

 
boy
girl
bad
good
B
A ,
,
,


 
badboy
badgirl
goodboy
goodgirl
B
A ,
,
,









,...
,
,
,
,
,
,
*
bad
badbadgood
odbad
goodgoodgo
goodbad
goodgood
bad
good
A

The class of Regular languages, above the same
alphabet, is closed under the union operation.
Meaning: The union of two regular languages
is Regular.
.
Theorem
37
Example
Consider , and
.
The union set is the set of all bit strings that
either start with 1, or end with 0.
Each of these sets can be recognized by an FA
with 3 states.
Can you construct an FA that recognizes the
union set?
 
1
with
starts
|
1 w
w
L 
 
0
with
ends
|
2 w
w
L 
If and are regular, each has its own
recognizing automaton and ,
respectively.
In order to prove that the language is
regular we have to construct an FA that
accepts exactly the words in .
Note: cannot apply followed by .
Proof idea
39
1
A 2
A
1
N 2
N
2
1 A
A 
2
1 A
A 
1
N 2
N
• We construct an FA that simulates the
computations of, and simultaneously.
• Each state of the simulating FA represents a
pair of states of and of
respectively.
• Can you define the transition function and the
final state(s) of the simulating FA?
Proof idea
40
1
N 2
N
1
N 2
N
In this talk we:
1. Motivated the course.
2. Defined Finite Automata (Latin Pl. form of
automaton).
3. Learned how to deal with construction of
automata and how to come up with a
correctness argument.
Wrap up
41
1
A

More Related Content

Similar to Lecture1.pptxjendfkdmdmmdmmedhf bf fbbd ed

Similar to Lecture1.pptxjendfkdmdmmdmmedhf bf fbbd ed (20)

Automata
AutomataAutomata
Automata
 
Automata
AutomataAutomata
Automata
 
intro.ppt
intro.pptintro.ppt
intro.ppt
 
a simple idealized machine used to recognize patterns within input taken from...
a simple idealized machine used to recognize patterns within input taken from...a simple idealized machine used to recognize patterns within input taken from...
a simple idealized machine used to recognize patterns within input taken from...
 
Presentation (5).pdf
Presentation (5).pdfPresentation (5).pdf
Presentation (5).pdf
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
Flat unit 1
Flat unit 1Flat unit 1
Flat unit 1
 
Automata Theory
Automata TheoryAutomata Theory
Automata Theory
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
Theory of computation:Finite Automata, Regualr Expression, Pumping Lemma
Theory of computation:Finite Automata, Regualr Expression, Pumping LemmaTheory of computation:Finite Automata, Regualr Expression, Pumping Lemma
Theory of computation:Finite Automata, Regualr Expression, Pumping Lemma
 
Dynamic Programming - Laughlin Lunch and Learn
Dynamic Programming - Laughlin Lunch and LearnDynamic Programming - Laughlin Lunch and Learn
Dynamic Programming - Laughlin Lunch and Learn
 
IntroToAutomataTheory.pptx
IntroToAutomataTheory.pptxIntroToAutomataTheory.pptx
IntroToAutomataTheory.pptx
 
Pumping lemma for regular set h1
Pumping lemma for regular set h1Pumping lemma for regular set h1
Pumping lemma for regular set h1
 
Finite automata
Finite automataFinite automata
Finite automata
 
Finite automata
Finite automataFinite automata
Finite automata
 
hghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggghghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggg
 
Digital Electronics basics book1_pdf.pdf
Digital Electronics basics book1_pdf.pdfDigital Electronics basics book1_pdf.pdf
Digital Electronics basics book1_pdf.pdf
 
QB104545.pdf
QB104545.pdfQB104545.pdf
QB104545.pdf
 
akaleshchinese.pptx
akaleshchinese.pptxakaleshchinese.pptx
akaleshchinese.pptx
 

Recently uploaded

VIP Kolkata Call Girl Rajarhat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Rajarhat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Rajarhat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Rajarhat 👉 8250192130 Available With Roomdivyansh0kumar0
 
Call Us🔝⇛+91-97111🔝47426 Call In girls Munirka (DELHI)
Call Us🔝⇛+91-97111🔝47426 Call In girls Munirka (DELHI)Call Us🔝⇛+91-97111🔝47426 Call In girls Munirka (DELHI)
Call Us🔝⇛+91-97111🔝47426 Call In girls Munirka (DELHI)jennyeacort
 
self respect is very important in this crual word where everyone in just thin...
self respect is very important in this crual word where everyone in just thin...self respect is very important in this crual word where everyone in just thin...
self respect is very important in this crual word where everyone in just thin...afaqsaeed463
 
原版1:1复刻密西西比大学毕业证Mississippi毕业证留信学历认证
原版1:1复刻密西西比大学毕业证Mississippi毕业证留信学历认证原版1:1复刻密西西比大学毕业证Mississippi毕业证留信学历认证
原版1:1复刻密西西比大学毕业证Mississippi毕业证留信学历认证jdkhjh
 
Introduction to LPC - Facility Design And Re-Engineering
Introduction to LPC - Facility Design And Re-EngineeringIntroduction to LPC - Facility Design And Re-Engineering
Introduction to LPC - Facility Design And Re-Engineeringthomas851723
 
Fifteenth Finance Commission Presentation
Fifteenth Finance Commission PresentationFifteenth Finance Commission Presentation
Fifteenth Finance Commission Presentationmintusiprd
 
Simplifying Complexity: How the Four-Field Matrix Reshapes Thinking
Simplifying Complexity: How the Four-Field Matrix Reshapes ThinkingSimplifying Complexity: How the Four-Field Matrix Reshapes Thinking
Simplifying Complexity: How the Four-Field Matrix Reshapes ThinkingCIToolkit
 
Unlocking Productivity and Personal Growth through the Importance-Urgency Matrix
Unlocking Productivity and Personal Growth through the Importance-Urgency MatrixUnlocking Productivity and Personal Growth through the Importance-Urgency Matrix
Unlocking Productivity and Personal Growth through the Importance-Urgency MatrixCIToolkit
 
LPC Operations Review PowerPoint | Operations Review
LPC Operations Review PowerPoint | Operations ReviewLPC Operations Review PowerPoint | Operations Review
LPC Operations Review PowerPoint | Operations Reviewthomas851723
 
Reflecting, turning experience into insight
Reflecting, turning experience into insightReflecting, turning experience into insight
Reflecting, turning experience into insightWayne Abrahams
 
Board Diversity Initiaive Launch Presentation
Board Diversity Initiaive Launch PresentationBoard Diversity Initiaive Launch Presentation
Board Diversity Initiaive Launch Presentationcraig524401
 
Farmer Representative Organization in Lucknow | Rashtriya Kisan Manch
Farmer Representative Organization in Lucknow | Rashtriya Kisan ManchFarmer Representative Organization in Lucknow | Rashtriya Kisan Manch
Farmer Representative Organization in Lucknow | Rashtriya Kisan ManchRashtriya Kisan Manch
 
ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...
ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...
ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...AgileNetwork
 
LPC Warehouse Management System For Clients In The Business Sector
LPC Warehouse Management System For Clients In The Business SectorLPC Warehouse Management System For Clients In The Business Sector
LPC Warehouse Management System For Clients In The Business Sectorthomas851723
 
Measuring True Process Yield using Robust Yield Metrics
Measuring True Process Yield using Robust Yield MetricsMeasuring True Process Yield using Robust Yield Metrics
Measuring True Process Yield using Robust Yield MetricsCIToolkit
 
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...Pooja Nehwal
 

Recently uploaded (17)

VIP Kolkata Call Girl Rajarhat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Rajarhat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Rajarhat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Rajarhat 👉 8250192130 Available With Room
 
Call Us🔝⇛+91-97111🔝47426 Call In girls Munirka (DELHI)
Call Us🔝⇛+91-97111🔝47426 Call In girls Munirka (DELHI)Call Us🔝⇛+91-97111🔝47426 Call In girls Munirka (DELHI)
Call Us🔝⇛+91-97111🔝47426 Call In girls Munirka (DELHI)
 
self respect is very important in this crual word where everyone in just thin...
self respect is very important in this crual word where everyone in just thin...self respect is very important in this crual word where everyone in just thin...
self respect is very important in this crual word where everyone in just thin...
 
原版1:1复刻密西西比大学毕业证Mississippi毕业证留信学历认证
原版1:1复刻密西西比大学毕业证Mississippi毕业证留信学历认证原版1:1复刻密西西比大学毕业证Mississippi毕业证留信学历认证
原版1:1复刻密西西比大学毕业证Mississippi毕业证留信学历认证
 
Introduction to LPC - Facility Design And Re-Engineering
Introduction to LPC - Facility Design And Re-EngineeringIntroduction to LPC - Facility Design And Re-Engineering
Introduction to LPC - Facility Design And Re-Engineering
 
Fifteenth Finance Commission Presentation
Fifteenth Finance Commission PresentationFifteenth Finance Commission Presentation
Fifteenth Finance Commission Presentation
 
Simplifying Complexity: How the Four-Field Matrix Reshapes Thinking
Simplifying Complexity: How the Four-Field Matrix Reshapes ThinkingSimplifying Complexity: How the Four-Field Matrix Reshapes Thinking
Simplifying Complexity: How the Four-Field Matrix Reshapes Thinking
 
Unlocking Productivity and Personal Growth through the Importance-Urgency Matrix
Unlocking Productivity and Personal Growth through the Importance-Urgency MatrixUnlocking Productivity and Personal Growth through the Importance-Urgency Matrix
Unlocking Productivity and Personal Growth through the Importance-Urgency Matrix
 
LPC Operations Review PowerPoint | Operations Review
LPC Operations Review PowerPoint | Operations ReviewLPC Operations Review PowerPoint | Operations Review
LPC Operations Review PowerPoint | Operations Review
 
Reflecting, turning experience into insight
Reflecting, turning experience into insightReflecting, turning experience into insight
Reflecting, turning experience into insight
 
Board Diversity Initiaive Launch Presentation
Board Diversity Initiaive Launch PresentationBoard Diversity Initiaive Launch Presentation
Board Diversity Initiaive Launch Presentation
 
Farmer Representative Organization in Lucknow | Rashtriya Kisan Manch
Farmer Representative Organization in Lucknow | Rashtriya Kisan ManchFarmer Representative Organization in Lucknow | Rashtriya Kisan Manch
Farmer Representative Organization in Lucknow | Rashtriya Kisan Manch
 
ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...
ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...
ANIn Gurugram April 2024 |Can Agile and AI work together? by Pramodkumar Shri...
 
LPC Warehouse Management System For Clients In The Business Sector
LPC Warehouse Management System For Clients In The Business SectorLPC Warehouse Management System For Clients In The Business Sector
LPC Warehouse Management System For Clients In The Business Sector
 
sauth delhi call girls in Defence Colony🔝 9953056974 🔝 escort Service
sauth delhi call girls in Defence Colony🔝 9953056974 🔝 escort Servicesauth delhi call girls in Defence Colony🔝 9953056974 🔝 escort Service
sauth delhi call girls in Defence Colony🔝 9953056974 🔝 escort Service
 
Measuring True Process Yield using Robust Yield Metrics
Measuring True Process Yield using Robust Yield MetricsMeasuring True Process Yield using Robust Yield Metrics
Measuring True Process Yield using Robust Yield Metrics
 
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
Pooja Mehta 9167673311, Trusted Call Girls In NAVI MUMBAI Cash On Payment , V...
 

Lecture1.pptxjendfkdmdmmdmmedhf bf fbbd ed

  • 1. 1 Welcome to CS105 and Happy and fruitful New Year ‫טובה‬ ‫שנה‬ (Happy New Year)
  • 2. Staff Instructor: Amos Israeli room 2-106 . Office Hours: Fri 10-12 or by arrangement Tel#: 534-886 e-mail: aisraeli “at” cs.ucsd.edu TA: Scott Yilek room B-240a Office Hours: Mon 4-5:30 e-mail: syilek “at” cs.ucsd.edu • Web Page: http://www.cse.ucsd.edu/classes/fa08/cse105 2
  • 3. Meeting Times Lectures: Tue, Thu 3:30p - 4:50p WLH 2111 Note: Thu Oct 9 Lecture is canceled, there may be a make-up lecture by quarter’s end. Sections: Mon, 1:00p - 1:50p WLH 2209 – Scott Tue, 3:00p - 3:50p WLH 2209 – Amos Note: Students should come to both sections. Mid-term: Thu Oct 23 3:30p WLH 2111 Final: Tue Dec 9 11:30a - 2:20p TBA 3
  • 4. Homework There will be 5-6 assignments. Assignments will be given on Monday’s section and must be returned by the Thu lecture one week later. First assignment will be given next Monday and must be returned on Wed Oct 8 or in Scott’s mailbox on Thu Oct 9th. 4
  • 5. Academic Integrity • You are encouraged to discuss the assignments problems among yourselves. • Each student must hand in her/his own solution. • You must Adhere to all rules of Academic Integrity of CS Dept. UCSD and others. (Meaning: no cheating or copying from any source) 5
  • 6. Grading • Assignments: 20% • Midterm: 30% - 0% (students are allowed to drop it), open book, open notes. • Final: 50% - 80%, open book, open notes. 6
  • 7. Grading • A: (85-100) • B: (70-84) • C: (55-69) • D: (40-54) • F: (0-39) 7
  • 8. Bibliography 8 Required: Michael Sipser: Introduction to the Theory of Computation, Second Edition, Thomson.
  • 9. 9 Introduction to Computability Theory Lecture1: Finite Automata and Regular Languages Prof. Amos Israeli ( ‫פרופ‬ ' ‫ישראלי‬ ‫עמוס‬ )
  • 10. Introduction Computer Science stems from two starting points: Mathematics: What can be computed? And what cannot be computed? Electrical Engineering: How can we build computers? Not in this course. 10
  • 11. Introduction Computability Theory deals with the profound mathematical basis for Computer Science, yet it has some interesting practical ramifications that I will try to point out sometimes. The question we will try to answer in this course is: “What can be computed? What Cannot be computed and where is the line between the two?” 11
  • 12. Computational Models A Computational Model is a mathematical object (Defined on paper) that enables us to reason about computation and to study the properties and limitations of computing. We will deal with Three principal computational models in increasing order of Computational Power. 12
  • 13. Computational Models We will deal with three principal models of computations: 1. Finite Automaton (in short FA). recognizes Regular Languages . 2. Stack Automaton. recognizes Context Free Languages . 3. Turing Machines (in short TM). recognizes Computable Languages . 13
  • 14. Alan Turing - A Short Detour Dr. Alan Turing is one of the founders of Computer Science (he was an English Mathematician). Important facts: 1. “Invented” Turing machines. 2. “Invented” the Turing Test. 3. Broke the German submarine transmission coding machine “Enigma”. 4. Was arraigned for being gay and committed suicide soon after. 14
  • 15. Finite Automata - A Short Example • The control of a washing machine is a very simple example of a finite automaton. • The most simple washing machine accepts quarters and operation does not start until at least 3 quarters were inserted.
  • 16. Thanks: Vadim Lyubasehvsky Now on PostDoc in Tel-Aviv
  • 17. Finite Automata - A Short Example • The control of a washing machine is a very simple example of a finite automaton. • The most simple washing machine accepts quarters and operation does not start until at least 3 quarters were inserted. • The second washing machine accepts 50 cents coins as well.
  • 18.
  • 19. Finite Automata - A Short Example • The control of a washing machine is a very simple example of a finite automaton. • The most simple washing machine accepts quarters and operation does not start until at least 3 quarters were inserted. • The second washing machine accepts 50 cents coins as well. • The most complex washing machine accepts $1 coins too.
  • 20.
  • 21. } , , { 1 0 q q q Q s  Finite Automaton - An Example 21 s q 1 q 0 q 0 1 States: , 0,1 0,1 , Initial State: s q Final State: 0 q
  • 22. Finite Automaton – An Example 22 s q 1 q 0 q 0 1 , 0,1 0,1 , Accepted words: ,... 001 , 000 , 01 , 00 , 0 Transition Function:   0 0 , q qs     1 1 , q qs       0 0 0 1 , 0 , q q q         1 1 1 1 , 0 , q q q    Alphabet: .   1 , 0 Note: Each state has all transitions .
  • 23. A finite automaton is a 5-tupple where: 1. is a finite set called the states. 2. is a finite set called the alphabet. 3. is the transition function. 4. is the start state, and 5. is the set of accept states. Finite Automaton – Formal Definition 23 , ,   F q Q , , , , 0   Q  Q Q    :  Q q  0 Q F 
  • 24. 1. Each state has a single transition for each symbol in the alphabet. 2. Every FA has a computation for every finite string over the alphabet. Observations 24 , ,
  • 25. 1. accepts all words (strings) ending with 1. The language recognized by , called satisfies: .     1 with ends | 2 w w M L  Examples 25 2 M 2 M   2 M L
  • 26. How to do it 1. Find some simple examples (short accepted and rejected words) 2. Think what should each state “remember” (represent). 3. Draw the states with a proper name. 4. Draw transitions that preserve the states’ “memory”. 5. Validate or correct. 6. Write a correctness argument.
  • 27. The automaton Correctness Argument: The FA’s states encode the last input bit and is the only accepting state. The transition function preserves the states encoding. 1 q
  • 28. 1. accepts all words (strings) ending with 1. . 2. accepts all words ending with 0. 2’. accepts all words ending with 0 and the empty word . This is the Complement Automaton of . Examples 28 2 M     1 with ends | 2 w w M L  3 M 4 M  2 M
  • 29. 1. accepts all words (strings) ending with 1. . 2. accepts all words ending with 0. 3. accepts all strings over alphabet that start and end with the same symbol . Examples 29 2 M     1 with ends | 2 w w M L  3 M 4 M   b a,
  • 30. 4. accepts all words of the form where are integers and . 5. accepts all words in . Examples (cont) 30 5 M 6 M   10 , 01 , 00 , 1 , 0 n m 1 0 0 ,  n m n m,
  • 31.        4 of multiple a is value binary whose strings bit 3 L • Definition: A language is a set of strings over some alphabet . • Examples: – – – Languages 31   1110001 , 10 , 1 , 0 1  L   integers positive are , | 1 0 2 m n L n m 
  • 32. • A language of an FA, , , is the set of words (strings) that accepts. • If we say that recognizes . • If is recognized by some finite automaton , is a Regular Language. Languages 32 , M   M L M   M L La  M La La A La
  • 33. Q1: How do you prove that a language is regular? A1: By presenting an FA, , satisfying . Q2: How do you prove that a language is not regular? A2: Hard! to be answered on Week3 of the course. Q3: Why is it important? A3: Recognition of a regular language requires a controller with bounded Memory. Some Questions 33 M   M L La  La La
  • 34. Let and be 2 regular languages above the same alphabet, . We define the 3 Regular Operations: • Union: . • Concatenation: . • Star: . The Regular Operations 34 A B   B x A x x B A     or |   B y A x xy B A    and |    A x k x x x A k k    and 0 | ,..., , 2 1 * 
  • 35. • given a language one can verify it is regular by presenting an FA that accept the language. • Regular Operations give us a systematic way of constructing languages that are apriority regular. (That is: No verification is required). The Regular Operations 35
  • 36. • • . • . The Regular Operations - Examples 36   boy girl,  B   bad good A ,    boy girl bad good B A , , ,     badboy badgirl goodboy goodgirl B A , , ,          ,... , , , , , , * bad badbadgood odbad goodgoodgo goodbad goodgood bad good A 
  • 37. The class of Regular languages, above the same alphabet, is closed under the union operation. Meaning: The union of two regular languages is Regular. . Theorem 37
  • 38. Example Consider , and . The union set is the set of all bit strings that either start with 1, or end with 0. Each of these sets can be recognized by an FA with 3 states. Can you construct an FA that recognizes the union set?   1 with starts | 1 w w L    0 with ends | 2 w w L 
  • 39. If and are regular, each has its own recognizing automaton and , respectively. In order to prove that the language is regular we have to construct an FA that accepts exactly the words in . Note: cannot apply followed by . Proof idea 39 1 A 2 A 1 N 2 N 2 1 A A  2 1 A A  1 N 2 N
  • 40. • We construct an FA that simulates the computations of, and simultaneously. • Each state of the simulating FA represents a pair of states of and of respectively. • Can you define the transition function and the final state(s) of the simulating FA? Proof idea 40 1 N 2 N 1 N 2 N
  • 41. In this talk we: 1. Motivated the course. 2. Defined Finite Automata (Latin Pl. form of automaton). 3. Learned how to deal with construction of automata and how to come up with a correctness argument. Wrap up 41 1 A

Editor's Notes

  1. 1
  2. 9