Professional Documents
Culture Documents
Chapter 1 Introd. To Automata
Chapter 1 Introd. To Automata
E
-
= E
+
{c}
Chapter 1 - 21
1.5 Central Concepts of
Automata Theory
1.5.2 Strings
Concatenation of two strings x and y --- xy
Example ---
if x = 01101, y = 110, then
xy = 01101110, xx = x
2
= 0110101101,
c is the identity for concatenation
since cw = wc = w.
Chapter 1 - 22
1.5 Central Concepts of
Automata Theory
1.5.2 Strings (supplemental)
Power of a string ---
Defined by concatenation ---
x
i
= xxx (x concatenated i times)
Defined by recursion ---
x
0
= c (by definition)
x
i
= xx
i-1
Chapter 1 - 23
1.5 Central Concepts of
Automata Theory
1.5.3 Languages
Definition ---
a language is a set of strings all chosen
from some E
*
If E is an alphabet, and L_E
*
, then L is a
language over E.
Chapter 1 - 24
1.5 Central Concepts of
Automata Theory
1.5.3 Languages
Examples ---
The set of all legal English words is a
language. Why? What is the alphabet here?
Answer: the set of all letters
A legal program of C is a language. Why?
What is the alphabet here?
Answer: a subset of the ASCII characters.
Chapter 1 - 25
1.5 Central Concepts of
Automata Theory
1.5.3 Languages
More examples of languages ---
The set of all strings of n 0s followed by n 1s
for n> 0:
{c, 01, 0011, 000111, }
E
*
is an infinite language for any alphabet E.
Chapter 1 - 26
1.5 Central Concepts of
Automata Theory
1.5.3 Languages
More examples of languages (contd) ---
| = the empty language (not the empty string c)
is a language over any alphabet.
{c} is a language over any alphabet (consisting
of only one string, the empty string c).
Chapter 1 - 27
1.5 Central Concepts of
Automata Theory
1.5.3 Languages
Ways to describe languages (1/3) ---
Description by exhaustive listing ---
L1 = {a, ab, abc} (finite language; listed one by one)
L2 = {a, ab, abb, abbb, ...} (infinite language; listed
partially)
L3 = L(ab*) (infinite language; expressed by a regular
expression)
Chapter 1 - 28
1.5 Central Concepts of
Automata Theory
1.5.3 Languages
Ways to define languages (2/3) ---
Description by generic elements ---
L4 = {x | x is over V = {a, b}, begins with a,
followed by any number of b, possible none}
(note: L4 = L3 = L2)
Chapter 1 - 29
1.5 Central Concepts of
Automata Theory
1.5.3 Languages
Ways to define languages (3/3) ---
Description by integer parameters ---
L5 = {ab
n
| n > 0}
(note: L5 = L4 = L3 = L2)
*** b
n
= power of a symbol
Chapter 1 - 30
1.5 Central Concepts of
Automata Theory
1.5.3a Operations on Languages (supplemental)(1/2)
Languages are sets, and operations of sets may be
applied to them:
(1) union --- AB = {a | a e A or a e B}
(2) intersection --- AB = {a | a e A and a eB}
(3) difference --- A B = {a | a e A and a e B}
A
Chapter 1 - 31
1.5 Central Concepts of
Automata Theory
1.5.3a Operations on Languages (supplemental)(2/2)
Languages are sets, and operations of sets may be
applied to them:
(4) product --- A B = {(a, b) | a e A and b e B}
(5) complement --- = {a | a e U and a e A}
(6) power set --- 2
A
= {B | B c A}
Note: U is the universal set, like E
-
which is the closure of an
alphabet
A
Chapter 1 - 32
1.5 Central Concepts of
Automata Theory
1.5.3b More Operations on Languages
(supplemental)(1/2)
Concatenation of two languages L
1
and L
2
---
L
1
L
2
= {x
1
x
2
| x
1
e L
1
and x
2
e L
2
}
Power of a language L ---
Defined directly ---
L
k
= {x
1
x
2
x
k
| x
1
, x
2
, , x
k
e L}
Defined by recursion ---
L
0
= {c}
L
i
= LL
i-1
A
Chapter 1 - 33
1.5 Central Concepts of
Automata Theory
1.5.3b More Operations on Languages
(supplemental)(2/2)
Closure of language L ---
L
*
= = L
0
L
1
L
2
Positive closure of a language L ---
L
+
= L
-
L
0
= L
-
{c}
A
0
i
i
L
=
Chapter 1 - 34
1.5 Central Concepts of
Automata Theory
1.5.4 Problems
A problem in automata theory ---
a question of deciding whether a given string is
a member of some particular language.
That is, if E is an alphabet, and L is a
language over E, the problem L is:
given a string w in E
*
, decide if w e L or not.