0% found this document useful (0 votes)
39 views16 pages

Course Organization

The document discusses the organization of a course on automata theory, languages, and computation that will cover chapters from a textbook as well as additional topics like Moore/Mealy machines and the Myhill-Nerode theorem. It notes that exercise sessions will be important and provides an example of the man, wolf, goat, and cabbage problem to illustrate modeling state transitions with a finite automaton.

Uploaded by

Sudipta Mitra
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views16 pages

Course Organization

The document discusses the organization of a course on automata theory, languages, and computation that will cover chapters from a textbook as well as additional topics like Moore/Mealy machines and the Myhill-Nerode theorem. It notes that exercise sessions will be important and provides an example of the man, wolf, goat, and cabbage problem to illustrate modeling state transitions with a finite automaton.

Uploaded by

Sudipta Mitra
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Course organization

Textbook J.E. Hopcroft, R. Motwani, J.D. Ullman Introduction to


Automata Theory, Languages, and Computation Second Edition,
Addison-Wesley, New York, 2001
We shall cover Chapters 1-7
I will add (at least): Moore/Mealy machines, Myhill-Nerode
Theorem, abstract state (another algorithm for computing minimal
automata)
Exercise Sessions: very important

1
Where does it come from?
Neurophysiologist Warren McCulloch and logician Walter Pitts
“A logical calculus of the ideas immanent in nervous activity”
Bull. Math. Biophysics 5 (1943), pp. 115-133
Developed models of neural networks based on their understanding
of neurology
Rich paper: neural newtorks with feedback loops, and attempt to
model the nervous structure

2
Where does it come from?
Work of the logician Church on checking and designing circuit
The model of Pitts-McCulloch was simplified by Kleene (1956)
Rabin and Scott present finite state machine as a simplification of
Turing machine
Ken Thompson used the notion of regular expressions introduced
by Kleene in the UNIX system
“Regular Expression Search Algorithm”
Comm. Assoc. Comp. Mach., Vol. 11, 6, pp. 419–422, 1968.

3
Applications
• software for finding patterns in large bodies of text (such as
collection of web pages)
• software for designing circuits
• lexical analyser of compilers
• model-checking, modelling and verification of embedded systems,
software model-checking
• model of real machines: watches, telephone, lock for cars, . . .
• application in genetics, regular pattern in the language of protein
• application in linguistic, building of large dictionnary, spell
programs, search

4
Motivation
• Automata The word “Automata” is the plural of “automaton”
which simply means any machine
• Mathematical model of what a (finite-state) machine is
• Good illustration of basic mathematical concepts, set theory and
proofs (important in computer science)
“Historically, regular expressions are one of computer science’s
shining examples of how using good theory leads to good programs.
Today, regular expressions have also become a shining example of
how ignoring good theory leads to bad programs. The regular
expression implementations used by today’s popular tools are
significantly slower than the ones used in many of those
thirty-year-old Unix tools.”

5
Example: on/off switch
Simplest non trivial finite automaton
Push
start
OFF ON
Push
States represented by circles
One state is the start state
Arcs labelled by observable events

6
Example: parity counter
The states can be thought of as the “memory” of the machine
p0

p1 off on p1

p0

Two events: p0 and p1


The machine don’t do anything for the event p1
The machine counts the parity of the number of p0 s
finite-state automata → finite memory

7
Functional description
In functional programming, we have two functions f1 , f0 and the
input is a finite list, which can be represented by N = 0 | S N
f1 (S n) = f0 n, f0 (S n) = f1 n
f1 0 = 1, f0 0 = 0
Then f1 n = 1 iff n is even

8
Functional description
For the parity machine we have the data type T = p0 T | p1 T | 0
and two functions g1 , g0
g1 (p0 n) = g0 n, g0 (p0 n) = g1 n
g1 (p1 n) = g1 n, g0 (p1 n) = g0 n
g1 0 = 1, g0 0 = 0
Then g1 n = 1 iff n contains an even number of constructor p0

9
Example: A Simple Traffic Signal
YR
1 0,1

0 GR RG

0,1 0,1

RY

Transitions: 0 (no traffic detected), 1 (traffic detected)


The states represent a situation: GR one traffic light is Green and
the other is Red

10
Example: vending machine
A (very) simple vending machine
choc
0 1
5 kr
What happens if we are in state 0 and ask for a chocolate??

11
Example: vending machine
A more complex vending machine

10 kr
5 kr 5 kr
0 1 2
small

large
In state 1: the machine “remembers” that we have given 5 kr

12
Alphabet of a machine
Definitions: The alphabet of a given machine is the set of
(observable) events of this machine
A possible behavior of a machine is a finite sequence of events
Some alphabets
• on/off switch Σ = {Push}
• simple vending machine Σ = {5kr, choc}
• complex vending machine
Σ = {5kr, 10kr, large, small}
• parity counter Σ = {p0 , p1 }
Not necessarily “linguistic” applications. In biology, the DNA
alphabet is {A, C, G, T }

13
Behaviour of a machine
• on/off switch:
Push, Push Push, Push Push Push, . . .
• simple vending machine:
5kr choc 5kr choc . . .
• parity counter p0 p1 or p0 p0 p1 p0 · · ·
The choice of the alphabet usually involves deliberate simplifications
For instance: no exact timing (however there exists also more
complex notions such as timed automata or hybrid automata; we
shall not deal with these automata in this course)
Finite automata provide a simple mathematical model of complex
machines (or software)

14
Example: Man, wolf, goat and cabbage problem
A man with a wolf, goat and cabbage is on the left bank of a river.
There is a boat large enough to carry the man and only one of the
other three. The man wish to cross to the right bank.
However if the man leaves the wolf and goat unattended on either
shore, the wolf surely eat the goat.
Similarly, if the goat and the cabbage are left unattended, the goat
will eat the cabbage.
Puzzle: Is it possible to cross the river without the goat or cabbage
being eaten?
We write all the possible transitions, and look for possible paths
between two nodes

15
Example: Man, wolf, goat and cabbage problem

start g m

MWGC/0 g
WC/MG m
MWC/G
c
w

w c
C/MWG W/MGC

g g g g

MGC/W MWG/C
c w

g c w
m
0/MWGC MG/WC G/MWC
g m

16

You might also like