Course Overview: - What Are The Practical Benefits/application of Formal Languages and Automata Theory?
Course Overview: - What Are The Practical Benefits/application of Formal Languages and Automata Theory?
1
What do computers really do?
– Take an input, process, and produce correct output.
• Output?
• Anything else?
3
Formal Language
4
Finite State Machine
……..
0 1 1 0 0
Finite
Control
• Tape, broken into cells
• Tape head.
• Finite control, i.e., a program, containing the position of the read head,
current symbol being scanned, and the current “state”, etc.
• A string is placed on the tape, read head is positioned at the left end, and
the machine reads the string one symbol at a time until all symbols have
been read,
• and then either accepts or rejects the input (to be in the language or not)
5
Hierarchy of languages
Recursive Languages
Context-Free Languages
Regular Languages
6
General Topics
• Abstract machine models of computation (e.g., Deterministic Finite Automata,
Non-deterministic FA, Turing Machine)
7
Language: Definitions
• Symbol – An atomic unit, such as a digit, character, lower-case letter, etc.
Sometimes a word. [Formal language does not deal with the “meaning” of
the symbols.]
concatenation: wz = 0110111
length: |w| = 4 |x| = 6 but |u| = 0
reversal: yR = aa0
8
• Some special sets of strings:
• Example:
Σ = {0, 1}
Σ* = {ε, 0, 1, 00, 01, 10, 11, 000, 001,…}
Σ+ = {0, 1, 00, 01, 10, 11, 000, 001,…}
Σ = {0, 1}
L = {x | x is
in Σ* and x contains an even number of 0’s}
Σ = {0, 1, 2,…, 9, .}
L = {x | x is in Σ* and x forms a finite length real number}
= {0, 1.5, 9.326,…}
Σ = {English words}
L = {x | x Σ* and x is a syntactically correct English sentence}
10