0% found this document useful (0 votes)
9 views22 pages

Week 1

The document outlines the fundamental concepts of automata theory, including definitions of alphabets, strings, and operations on strings such as concatenation and reversal. It also discusses languages formed from alphabets, providing examples of specific languages like prime numbers and even/odd numbers. Additionally, it highlights the significance of problems in automata theory, particularly in determining membership of strings in specific languages.

Uploaded by

Suhail
Copyright
© © All Rights Reserved
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)
9 views22 pages

Week 1

The document outlines the fundamental concepts of automata theory, including definitions of alphabets, strings, and operations on strings such as concatenation and reversal. It also discusses languages formed from alphabets, providing examples of specific languages like prime numbers and even/odd numbers. Additionally, it highlights the significance of problems in automata theory, particularly in determining membership of strings in specific languages.

Uploaded by

Suhail
Copyright
© © All Rights Reserved
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/ 22

Central Concepts of

Automata Theory

1
Alphabets
• An alphabet is a finite, nonempty set of
symbols
Σ = {0,1}, the binary alphabet
Σ = {𝑎, 𝑏, … , 𝑧}, the set of all lowercase letters

2
Strings
• A string is a finite sequence of symbols
chosen from some alphabet

01101 is a string from the binary alphabet Σ = {0,1}

3
Alphabets and Strings
• We will use small alphabets:   a, b

• Strings
a
ab u  ab
abba v  bbbaaa
baba w  abba
aaabbbaabab
4
Examples:
  {0,1,2,,9}
Decimal numbers alphabet

102345 567463386
Binary numbers alphabet   {0,1}
100010001 101101111
Unary numbers alphabet   {1}
1 11 111 1111 11111
5
Length of a String
w  a1a2 an

Length: w n

Examples: abba  4
aa  2
a 1
6
Empty String
• A string with no letters (length zero) is
denoted: 𝜀

7
String Operations
w  a1a2  an
v  b1b2 bm

Concatenation:
wv  a1a2 anb1b2 bm
Reverse:

w  an  a2 a1
R

8
Length of Concatenation

uv  u  v

Example: u  aab, u  3
v  abaab, v  5

uv  aababaab  8
uv  u  v  3  5  8
9
Substring
Substring of string: a subsequence of
consecutive characters

String Substring
abbab ab
abbab abba
abbab b
abbab bbab
10
Powers of an Alphabet
Σ 𝑘 : the set of strings of length k, each of
whose symbols is in Σ

Σ = 0, 1
Σ0 = 𝜀
Σ1 = 0, 1
Σ2 = 00, 01, 10, 11
Σ3 = 000, 001, 010, 011, 100, 101, 110, 111

11
The * Operation
 *
: the set of all strings over an alphabet 
Σ = 0, 1
Σ ∗ = Σ 0 ∪ Σ1 ∪ Σ 2 ∪ ⋯

Σ∗ = {𝜀, 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, … }

12
The + Operation
 : the set of all strings over an alphabet 

except 𝜀
Σ = 0, 1
Σ + = Σ1 ∪ Σ 2 ∪ ⋯
Σ + = {0, 1, 00, 01, 10, 11, 000, 001, 010, 011, … }

Σ∗ = Σ + ∪ {𝜀}

13
Languages
A language over alphabet  is any subset of 
*

Example:
Σ = 𝑎, 𝑏
Σ ∗ = 𝜀, 𝑎, 𝑏, 𝑎𝑎, 𝑎𝑏, 𝑏𝑎, 𝑏𝑏, 𝑎𝑎𝑎, …
Languages:

𝜀
𝑎, 𝑎𝑎, 𝑎𝑎𝑏
𝜀, 𝑎𝑏𝑏𝑎, 𝑏𝑎𝑏𝑎, 𝑎𝑎, 𝑎𝑏, 𝑎𝑎𝑎𝑎𝑎𝑎
14
More Language Examples

Alphabet   {a, b}
An infinite language L  {a b | n  0}
n n

𝜀 bbabb L
ab abb L
L
aabb
aaaaabbbbb
15
Prime numbers
Numbers divisible by 1 and itself

Alphabet   {0,1,2,,9}
Language:

PRIMES  {x | x   and x is prime}


*

PRIMES  {2,3,5,7,11,13,17,}

16
Even and odd numbers

Alphabet   {0,1,2,,9}
Languages:
EVEN  {x | x   and x is even}
*

EVEN  {0,2,4,6,}

ODD  {x | x   and x is odd}


*

ODD  {1,3,5,7,}
17
Addition (of unary numbers)

Alphabet:   {1,, }
Language:
ADDITION  {x  y  z | x  1 , y  1 , z  1 ,
n m k

n  m  k , n  1, m  1}
11  111  11111 ADDITION
111 111  111 ADDITION
ADDITION  {1  1  11,1  11  111,11  1  111,11  11  1111, ...}
18
Squares (of unary numbers)

Alphabet:   {1, #}
Language:
SQUARES  {x#y | x  1 ,y  1 , m  n }
n m 2

11#1111 SQUARES
111#1111 SQUARES
SQUARES  {1#1,11#1111,111#111111111, ...}
19
Two special languages

Empty language Language with


empty string
{ } or 
{𝜀 }
Size of a language (number of elements):
| {} | 0
| 𝜀| 1
| a, aa, ab| 3
| {𝜀 , aa, bb, abba, baba} | 5
20
Note that:

Sets   { }  {𝜀 }

Set size {}    0

Set size {𝜀 }  1


String length 𝜀  0
21
Problems in automata theory
• A problem is the question whether a given
string is a member of some particular
language.
– Given a string 𝑤 ∈ Σ ∗ , decide whether or not
𝑤∈𝐿
• Example:
– The problem of testing primality can be
expressed by the language 𝐿𝑝 consisting of all
binary strings whose value as a binary number
is a prime.

28

You might also like